Skip to content
Member Filters
Show Inherited
Show Protected
Show abstract
GR32🞂TBitmap32🞂DrawToMethodPublic

TBitmap32.DrawTo

Draws this bitmap onto a destination bitmap or GDI device context (HDC).

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).

ParameterTypeDescription
DstTCustomBitmap32Destination bitmap.

Overload 2 ​

pascal
procedure DrawTo(Dst: TCustomBitmap32; DstX, DstY: Integer); overload;

Draws this entire bitmap onto destination bitmap at (DstX, DstY).

ParameterTypeDescription
DstTCustomBitmap32Destination bitmap.
DstX, DstYIntegerDestination 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).

ParameterTypeDescription
hDstHDCTarget GDI device context handle.
DstX, DstYIntegerTop-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.

ParameterTypeDescription
hDstHDCTarget GDI device context handle.
DstRectTRectTarget destination rectangle on HDC.
SrcRectTRectSource 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);