To rasterize a vector drawing, use the Rasterize Method of ImGearVectPage Class. This creates a copy of the drawing in bitmap form. For example:
C# | ![]() |
---|---|
if (igPage is ImGearVectorPage) igPage = ((ImGearVectorPage)igPage).Rasterize(); |
To control the size of the rasterized bitmap, you can do one of following:
- Before loading the vector drawing, set the Width filter control parameter of the format filter used to load the drawing to the desired width of the rasterized image in pixels. (The height will be calculated automatically based on the aspect ratio of the drawing.)
- Call the Resize Method of ImGearProcessing Class before calling the Rasterize Method. This will allow you to specify the rasterized dimensions in pixels.