To export a dwg drawing to a raster image file:
- Get the device for bitmap creation.
- Load the RxRasterServices module.
- Set the raster image parameters (e.g., width, height, bits per pixel, etc.).
- Call the saveRasterImage() method of the raster services object.
For more details, see sources of TD_RasterExport module (Kernel\Exports\RasterExport\).