Declarations ​
pascal
procedure DrawTo(Dst: TCustomBitmap32); overload;
procedure DrawTo(Dst: TCustomBitmap32; DstX, DstY: Integer); overload;
procedure DrawTo(hDst: HDC; DstX: Integer = 0; DstY: Integer = 0); overload;
procedure DrawTo(hDst: HDC; const DstRect, SrcRect: TRect); overload;Overload Details
Overload 1 ​
pascal
procedure DrawTo(Dst: TCustomBitmap32); overload;Draws this entire bitmap onto destination bitmap at (0, 0).
| Parameter | Type | Description |
|---|---|---|
Dst | TCustomBitmap32 | Destination bitmap. |
Overload 2 ​
pascal
procedure DrawTo(Dst: TCustomBitmap32; DstX, DstY: Integer); overload;Draws this entire bitmap onto destination bitmap at (DstX, DstY).
| Parameter | Type | Description |
|---|---|---|
Dst | TCustomBitmap32 | Destination bitmap. |
DstX, DstY | Integer | Destination coordinates. |
Overload 3 ​
pascal
procedure DrawTo(hDst: HDC; DstX: Integer = 0; DstY: Integer = 0); overload;Renders this bitmap onto a target GDI device context (HDC) at top-left position (DstX, DstY).
| Parameter | Type | Description |
|---|---|---|
hDst | HDC | Target GDI device context handle. |
DstX, DstY | Integer | Top-left destination coordinates. |
Overload 4 ​
pascal
procedure DrawTo(hDst: HDC; const DstRect, SrcRect: TRect); overload;Stretches a sub-rectangle of this bitmap onto a target GDI device context (HDC) rectangle.
| Parameter | Type | Description |
|---|---|---|
hDst | HDC | Target GDI device context handle. |
DstRect | TRect | Target destination rectangle on HDC. |
SrcRect | TRect | Source sub-rectangle on this bitmap. |
Description ​
DrawTo renders this bitmap surface directly onto another bitmap or an external OS GDI device context (hDst).
Example ​
pascal
// Paint bitmap onto Form's Canvas handle in OnPaint event
Bitmap.DrawTo(Form.Canvas.Handle, 0, 0);