ITMSFNCCustomPDFGraphicsLib.DrawImage Method
Draws a bitmap at the specified point and returns its drawn bounds.
API unit family: TMSFNCPDFGraphicsLib
Declaring type: ITMSFNCCustomPDFGraphicsLib
Overloads
Overload 1
Draws a bitmap at the specified point and returns its drawn bounds.
function DrawImage(ABitmap: TTMSFNCBitmapHelperClass; Point: TPointF; ImageType: TTMSFNCPDFGraphicsLibImageType = itOriginal; Quality: Single = 1.0): TRectF; overload;
Parameters
| Name | Description |
|---|---|
ABitmap |
Bitmap to draw. |
Point |
Top-left position of the image in PDF coordinate units. |
ImageType |
Controls whether the image is rendered at original size or fitted. |
Quality |
JPEG compression quality from 0.0 (lowest) to 1.0 (highest). |
Returns
Rectangle occupied by the drawn image in PDF coordinate units.
Overload 2
Draws a bitmap over a background color at the specified point.
function DrawImage(ABitmap: TTMSFNCBitmapHelperClass; ABackgroundColor: TTMSFNCGraphicsColor; Point: TPointF; ImageType: TTMSFNCPDFGraphicsLibImageType = itOriginal; Quality: Single = 1.0): TRectF; overload;
Parameters
| Name | Description |
|---|---|
ABitmap |
Bitmap to draw. |
ABackgroundColor |
Color painted behind transparent pixels. |
Point |
Top-left position of the image in PDF coordinate units. |
ImageType |
Controls whether the image is rendered at original size or fitted. |
Quality |
JPEG compression quality from 0.0 (lowest) to 1.0 (highest). |
Returns
Rectangle occupied by the drawn image in PDF coordinate units.
Overload 3
Draws a bitmap scaled to fill the specified rectangle.
function DrawImage(ABitmap: TTMSFNCBitmapHelperClass; Rect: TRectF; Stretch: Boolean = True; AspectRatio: Boolean = True; ImageType: TTMSFNCPDFGraphicsLibImageType = itOriginal; Quality: Single = 1.0; Center: Boolean = True): TRectF; overload;
Parameters
| Name | Description |
|---|---|
ABitmap |
Bitmap to draw. |
Rect |
Target rectangle in PDF coordinate units. |
Stretch |
When True, scales the image to fill the rectangle. |
AspectRatio |
When True, preserves the image aspect ratio while stretching. |
ImageType |
Controls the image rendering mode. |
Quality |
JPEG compression quality from 0.0 to 1.0. |
Center |
When True, centers the image within the rectangle. |
Returns
Rectangle occupied by the drawn image in PDF coordinate units.
Overload 4
Draws a bitmap over a background color and scaled to fill the specified rectangle.
function DrawImage(ABitmap: TTMSFNCBitmapHelperClass; ABackgroundColor: TTMSFNCGraphicsColor; Rect: TRectF; Stretch: Boolean = True; AspectRatio: Boolean = True; ImageType: TTMSFNCPDFGraphicsLibImageType = itOriginal; Quality: Single = 1.0; Center: Boolean = True): TRectF; overload;
Parameters
| Name | Description |
|---|---|
ABitmap |
Bitmap to draw. |
ABackgroundColor |
Color painted behind transparent pixels. |
Rect |
Target rectangle in PDF coordinate units. |
Stretch |
When True, scales the image to fill the rectangle. |
AspectRatio |
When True, preserves the image aspect ratio while stretching. |
ImageType |
Controls the image rendering mode. |
Quality |
JPEG compression quality from 0.0 to 1.0. |
Center |
When True, centers the image within the rectangle. |
Returns
Rectangle occupied by the drawn image in PDF coordinate units.