Table of Contents

TTMSFNCGraphics.DrawBitmap Method

Draws ABitmap into the double-coordinate bounding box, optionally preserving aspect ratio, stretching, centering, or cropping.

API unit family: TMSFNCGraphics Declaring type: TTMSFNCGraphics

Overloads

Overload 1

Draws ABitmap into the double-coordinate bounding box, optionally preserving aspect ratio, stretching, centering, or cropping.

procedure DrawBitmap;

Parameters

Name Description
ALeft Left edge of the destination bounding box in floating-point pixels.
ATop Top edge of the destination bounding box in floating-point pixels.
ARight Right edge of the destination bounding box in floating-point pixels.
ABottom Bottom edge of the destination bounding box in floating-point pixels.
ABitmap Bitmap to draw.
AAspectRatio When True, preserves the bitmap's aspect ratio. Default is True.
AStretch When True, stretches the bitmap to fill the bounding box. Default is False.
ACenter When True, centers the bitmap within the bounding box. Default is True.
ACropping When True, crops the bitmap to fill the bounding box entirely. Default is False.

Overload 2

Draws ABitmap into a TRectF bounding box, optionally preserving aspect ratio, stretching, centering, or cropping.

procedure DrawBitmap;

Parameters

Name Description
ARect Destination bounding box on the canvas.
ABitmap Bitmap to draw.
AAspectRatio When True, preserves the bitmap's aspect ratio. Default is True.
AStretch When True, stretches the bitmap to fill the bounding box. Default is False.
ACenter When True, centers the bitmap within the bounding box. Default is True.
ACropping When True, crops the bitmap to fill the bounding box entirely. Default is False.

Overload 3

Draws ABitmap into the integer-coordinate bounding box, optionally preserving aspect ratio, stretching, centering, or cropping.

procedure DrawBitmap;

Parameters

Name Description
ALeft Left edge of the destination bounding box in integer pixels.
ATop Top edge of the destination bounding box in integer pixels.
ARight Right edge of the destination bounding box in integer pixels.
ABottom Bottom edge of the destination bounding box in integer pixels.
ABitmap Bitmap to draw.
AAspectRatio When True, preserves the bitmap's aspect ratio. Default is True.
AStretch When True, stretches the bitmap to fill the bounding box. Default is False.
ACenter When True, centers the bitmap within the bounding box. Default is True.
ACropping When True, crops the bitmap to fill the bounding box entirely. Default is False.

Overload 4

Draws ABitmap into a TRect bounding box, optionally preserving aspect ratio, stretching, centering, or cropping.

procedure DrawBitmap;

Parameters

Name Description
ARect Destination bounding box on the canvas, in integer pixels.
ABitmap Bitmap to draw.
AAspectRatio When True, preserves the bitmap's aspect ratio. Default is True.
AStretch When True, stretches the bitmap to fill the bounding box. Default is False.
ACenter When True, centers the bitmap within the bounding box. Default is True.
ACropping When True, crops the bitmap to fill the bounding box entirely. Default is False.

Overload 5

Draws a bitmap at the specified integer position, using the bitmap's own width and height.

procedure DrawBitmap(ALeft, ATop: Integer; ABitmap: TTMSFNCBitmapHelperClass); overload; virtual;

Parameters

Name Description
ALeft Left edge of the bitmap's destination position in integer pixels.
ATop Top edge of the bitmap's destination position in integer pixels.
ABitmap Bitmap to draw.

Overload 6

Draws a bitmap at the specified floating-point position, using the bitmap's own width and height.

procedure DrawBitmap(ALeft, ATop: Single; ABitmap: TTMSFNCBitmapHelperClass); overload; virtual;

Parameters

Name Description
ALeft Left edge of the bitmap's destination position in floating-point pixels.
ATop Top edge of the bitmap's destination position in floating-point pixels.
ABitmap Bitmap to draw.