System.Types.TRectF.Fit
Delphi
function Fit(const BoundsRect: TRectF): Single; // deprecated 'Please consider using FitInto instead.';
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Types.pas | System.Types | TRectF |
Description
Resizes the dimensions of the current rectangle object to best fit (keeping the rectangle proportions) into the specified rectangle.
Fit returns the implemented scaling ratio. If the returned value < 1, then the current rectangle is not resized.
Fit resizes the dimensions of the current rectangular object to best fit (keeping the current rectangle proportions) into the specified BoundsRect
rectangle:
- If any dimension of the current rectangle is larger than the
BoundsRect
rectangle, then decrease the current rectangle size (keeping current rectangle proportions--the ratio between the width and height) to fit all the current rectangle in theBoundsRect
rectangle. That is, either the width of the current scaled rectangle is equal to the width of theBoundsRect
rectangle or the height of the current scaled rectangle is equal to the height of theBoundsRect
rectangle. All the current rectangle should be placed into the specifiedBoundsRect
rectangle. The current rectangle is placed centered in theBoundsRect
rectangle. - If the original current rectangle is smaller than the
BoundsRect
rectangle, then the current rectangle is not resized. The current rectangle is placed centered in theBoundsRect
rectangle.