Table of Contents

ITMSFNCCustomPDFGraphicsLib.DrawImageWithName Method

Draws a named bitmap from the bitmap container at the specified point and returns its drawn bounds.

API unit family: TMSFNCPDFGraphicsLib Declaring type: ITMSFNCCustomPDFGraphicsLib

Overloads

Overload 1

Draws a named bitmap from the bitmap container at the specified point and returns its drawn bounds.

function DrawImageWithName(AName: string; Point: TPointF; ImageType: TTMSFNCPDFGraphicsLibImageType = itOriginal; Quality: Single = 1.0): TRectF; overload;

Parameters

Name Description
AName Name of the bitmap in the container.
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 named bitmap from the container over a background color at the specified point.

function DrawImageWithName(AName: string; ABackgroundColor: TTMSFNCGraphicsColor; Point: TPointF; ImageType: TTMSFNCPDFGraphicsLibImageType = itOriginal; Quality: Single = 1.0): TRectF; overload;

Parameters

Name Description
AName Name of the bitmap in the container.
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 named bitmap from the container scaled to fill the specified rectangle.

function DrawImageWithName(AName: string; Rect: TRectF; Stretch: Boolean = True; AspectRatio: Boolean = True; ImageType: TTMSFNCPDFGraphicsLibImageType = itOriginal; Quality: Single = 1.0; Center: Boolean = True): TRectF; overload;

Parameters

Name Description
AName Name of the bitmap in the container.
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 named bitmap from the container over a background color and scaled to fill the specified rectangle.

function DrawImageWithName(AName: string; 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
AName Name of the bitmap in the container.
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.