FMX.Graphics.TBitmap.Resize

From RAD Studio API Documentation
Jump to: navigation, search

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


See Also