TTMSFNCGraphics.GetAspectSize Method
Calculates the destination width and height that fit a bitmap into a new bounding box, applying aspect-ratio, stretch, and cropping rules.
API unit family: TMSFNCGraphics
Declaring type: TTMSFNCGraphics
Syntax
class procedure GetAspectSize;
Parameters
| Name | Description |
|---|---|
AWidth |
Receives the calculated destination width. |
AHeight |
Receives the calculated destination height. |
AOriginalWidth |
Original bitmap width in pixels. |
AOriginalHeight |
Original bitmap height in pixels. |
ANewWidth |
Available destination width in pixels. |
ANewHeight |
Available destination height in pixels. |
AAspectRatio |
When True, preserves the original aspect ratio. Default is True. |
AStretch |
When True, stretches to fill the destination. Default is False. |
ACropping |
When True, sizes the result to fill the destination entirely, potentially cropping. Default is False. |