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
AWidth
orAHeight
parameters, 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 specifiedAWidth
andAHeight
. That is, either the scaled current image's width is equal to the specifiedAWidth
or the scaled current image's height is equal to the specifiedAHeight
. All the current image should be placed into the rectangle having the specifiedAWidth
andAHeight
. The current image is drawn centered in the rectangle. - If the original current image is smaller than a rectangle with the specified
AWidth
andAHeight
, then the current image is not resized. The current image is drawn centered in the rectangle.