TTMSFNCGraphics.GetBitmapDrawRectangle Method
Returns the actual drawing rectangle for
ABitmapwithin the double-coordinate bounding box, applying the same layout rules asDrawBitmap.
API unit family: TMSFNCGraphics
Declaring type: TTMSFNCGraphics
Overloads
Overload 1
Returns the actual drawing rectangle for
ABitmapwithin the double-coordinate bounding box, applying the same layout rules asDrawBitmap.
function GetBitmapDrawRectangle(ALeft, ATop, ARight, ABottom: Double; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True; AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False): TRectF; overload; virtual;
Parameters
| Name | Description |
|---|---|
ALeft |
Left edge of the bounding box in floating-point pixels. |
ATop |
Top edge of the bounding box in floating-point pixels. |
ARight |
Right edge of the bounding box in floating-point pixels. |
ABottom |
Bottom edge of the bounding box in floating-point pixels. |
ABitmap |
Bitmap whose layout rectangle is calculated. |
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, the rectangle fills the entire bounding box. Default is False. |
Returns
The floating-point rectangle within the bounding box where the bitmap would be rendered.
Overload 2
Returns the actual drawing rectangle for
ABitmapwithin aTRectFbounding box, applying the same layout rules asDrawBitmap.
function GetBitmapDrawRectangle(ARect: TRectF; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True; AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False): TRectF; overload; virtual;
Parameters
| Name | Description |
|---|---|
ARect |
Bounding box to lay out the bitmap within. |
ABitmap |
Bitmap whose layout rectangle is calculated. |
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, the rectangle fills the entire bounding box. Default is False. |
Returns
The floating-point rectangle within the bounding box where the bitmap would be rendered.
Overload 3
Returns the actual drawing rectangle for
ABitmapwithin the integer-coordinate bounding box, applying the same layout rules asDrawBitmap.
function GetBitmapDrawRectangle(ALeft, ATop, ARight, ABottom: Integer; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True; AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False): TRect; overload; virtual;
Parameters
| Name | Description |
|---|---|
ALeft |
Left edge of the bounding box in integer pixels. |
ATop |
Top edge of the bounding box in integer pixels. |
ARight |
Right edge of the bounding box in integer pixels. |
ABottom |
Bottom edge of the bounding box in integer pixels. |
ABitmap |
Bitmap whose layout rectangle is calculated. |
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, the rectangle fills the entire bounding box. Default is False. |
Returns
The integer rectangle within the bounding box where the bitmap would be rendered.
Overload 4
Returns the actual drawing rectangle for
ABitmapwithin aTRectbounding box, applying the same layout rules asDrawBitmap.
function GetBitmapDrawRectangle(ARect: TRect; ABitmap: TTMSFNCBitmapHelperClass; AAspectRatio: Boolean = True; AStretch: Boolean = False; ACenter: Boolean = True; ACropping: Boolean = False): TRect; overload; virtual;
Parameters
| Name | Description |
|---|---|
ARect |
Bounding box to lay out the bitmap within, in integer pixels. |
ABitmap |
Bitmap whose layout rectangle is calculated. |
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, the rectangle fills the entire bounding box. Default is False. |
Returns
The integer rectangle within the bounding box where the bitmap would be rendered.