Visual Basic (Declaration) | |
---|---|
Public Property PaintEngine As RasterPaintEngine |
Visual Basic (Usage) | Copy Code |
---|---|
|
C# | |
---|---|
public RasterPaintEngine PaintEngine {get; set;} |
Managed Extensions for C++ | |
---|---|
public: __property RasterPaintEngine get_PaintEngine(); public: __property void set_PaintEngine( RasterPaintEngine value ); |
C++/CLI | |
---|---|
public: property RasterPaintEngine PaintEngine { RasterPaintEngine get(); void set (RasterPaintEngine value); } |
Return Value
A RasterPaintEngine enumeration value that specifies the paint engine to use when displaying images.When the RasterPaintEngine.Gdi engine is used, the RasterImage.Paint method internally will call the Win32 API functions to paint the image.
When the RasterPaintEngine.GdiPlus engine is used, the RasterImage.Paint method internally will call the GDI+ Graphics.DrawImage methods to paint the image. Note that if the RasterImage object is not fully compatible with GDI+, the framework will internally convert the object into a suitable format. This may result in some of the internal image data to be altered.
When the RasterPaintEngine.GdiPlus2 engine is used, the RasterImage.Paint method internally will call the GDI+ Graphics.DrawImage methods to paint the image. Note that when using this engine, the RasterImage object data is guaranteed not to be altered or changed in any way.
Using a particular paint engine depends on the RasterImage object and your specific needs:
RasterPaintEngine.Gdi is generally faster than RasterPaintEngine.GdiPlus or RasterPaintEngine.GdiPlus2 If the RasterImage object is not GDI+ compatible, and you want to preserve the image state and data when painting, use either RasterPaintEngine.Gdi or RasterPaintEngine.GdiPlus2. (refer to RasterImage.TestGdiPlusCompatible for more information). If you need to use GDI+ specific features (for example, if the RasterImage has a transparent color), then use either RasterPaintEngine.GdiPlus or RasterPaintEngine.GdiPlus2.
When RasterPaintEngine.GdiPlus or RasterPaintEngine.GdiPlus2 engine is used, the following properties are ignored when painting images:
Property | Notes |
---|---|
RasterOperation | Raster operations (ROP) are not supported in GDI+ |
UsePaintPalette | Palette is automatically used. |
PaintDisplayMode | Resample/Bicubic scaling and other speed/quality algorithm is controlled by the Graphics object itself. (Only with RasterPaintEngine.GdiPlus). |
Target Platforms: Microsoft .NET Framework 2.0, Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family