TdxGPImage.StretchDraw(TdxGPCanvas,TRect,TRect,TdxGPImageAttributes,IdxColorPalette) Method
Draws a portion of the stored image on a specified GDI+ API-based canvas.
Declaration
procedure StretchDraw(ACanvas: TdxGPCanvas; const ADest: TRect; const ASource: TRect; AAttributes: TdxGPImageAttributes; AColorPalette: IdxColorPalette = nil); overload;
Parameters
Name | Type |
---|---|
ACanvas | TdxGPCanvas |
ADest | TRect |
ASource | TRect |
AAttributes | TdxGPImageAttributes |
AColorPalette | IdxColorPalette |
Remarks
Call either of the overloaded procedure variants to upscale or downscale a rectangular portion of the stored image to draw it within a rectangular area of a destination GDI+ API-based canvas passed as the ACanvas parameter.
Use the ASource and ADest parameters to define a portion of the stored image and a destination rectangle on the target canvas. Pass all required GDI+ image attributes as the AAttributes parameter to apply color adjustment and gamma correction to the drawn image.
You can pass a color palette as the optional AColorPalette parameter to use its named colors instead of a stored vector image’s own colors to draw outlines and fill closed polygons. The StretchDraw procedure ignores the AColorPalette parameter value if the image container stores a bitmap.
Note
The StretchDraw procedure scales the stored image properly only if both its width and height are at least two pixels.