TdxCustomSmartImage.StretchDraw(HDC,TRect,Byte,IdxColorPalette) Method
Paints the stored image within the destination rectangle of the specified device context.
Declaration
procedure StretchDraw(DC: HDC; const ADest: TRect; AAlpha: Byte = 255; APalette: IdxColorPalette = nil); overload;
Parameters
Name | Type |
---|---|
DC | HDC |
ADest | TRect |
AAlpha | Byte |
APalette | IdxColorPalette |
Remarks
Call the first two overloaded procedure variants to upscale or downscale the rectangular portion of the stored image passed as the ASource parameter to fill the destination area passed as the ADest parameter. The third variant uses the entire stored image as the source fragment.
To paint an image, pass a handle to the required device context as the DC parameter. The resulting image is opaque by default, but you can use the optional AAlpha parameter to blend the destination area with its background.
The optional APalette parameter allows you to paint outlines and fill enclosed polygons of a stored vector image using the named colors stored in a palette. All overloaded procedure variants ignore the provided color palette if the Smart Image container stores a bitmap.
Note
The stored image is properly scaled only if its both width and height are at least two pixels.