FMX.Graphics.TBitmap.Resize
Delphi
procedure Resize(const AWidth, AHeight: Integer);
C++
void __fastcall Resize(const int AWidth, const int AHeight);
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
procedure function |
public | FMX.Graphics.pas FMX.Graphics.hpp |
FMX.Graphics | TBitmap |
Description
Resizes the dimensions of the current TBitmap.
Resize resizes the Width and Height dimension properties of the current TBitmap object to best fit into the rectangle with the specified AWidth width and AHeight height.
Resize resizes the dimensions of the current TBitmap image to best fit (keeping the current image proportions) into a rectangle with the specified AWidth and AHeight parameters:
- If any dimension of the current TBitmap image is larger than the specified
AWidthorAHeightparameters, then decrease the current image size (keeping current image proportions--the ratio between the width and height) to fit all the current image in the rectangle with the specifiedAWidthandAHeight. That is, either the scaled current image's width is equal to the specifiedAWidthor the scaled current image's height is equal to the specifiedAHeight. All the current image should be placed into the rectangle having the specifiedAWidthandAHeight. The current image is drawn centered in the rectangle. - If the original current image is smaller than a rectangle with the specified
AWidthandAHeight, then the current image is not resized. The current image is drawn centered in the rectangle.

