System.Types.TRectF.PlaceInto
Delphi
function PlaceInto(const ADesignatedArea: TRectF; const AHorzAlign: THorzRectAlign = THorzRectAlign.Center;
const AVertAlign: TVertRectAlign = TVertRectAlign.Center): TRectF;
C++
inline TRectF TRectF::PlaceInto(const TRectF& DesignatedArea,
THorzRectAlign HorzAlign,
TVertRectAlign VertAlign) const {
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | System.Types.pas SystemTypes.h |
System.Types | TRectF |
Description
If any dimension of the current rectangle is greater than the corresponding dimension of the ADesignatedArea
rectangle, then the current rectangle is scaled down to best fit the ADesignatedArea
rectangle. The obtained rectangle is aligned in ADesignatedArea
.
PlaceInto implements the following behavior:
- If the width or height of the current rectangle is greater than the corresponding dimension of
ADesignatedArea
. Then PlaceInto scales down the current rectangle (preserving the current rectangle proportions – the ratio between the width and height) to fit in theADesignatedArea
rectangle and centers the scaled rectangle inADesignatedArea
. Then PlaceInto aligns the obtained rectangle in theADesignatedArea
rectangle according to the specifiedAHorzAlign
andAVertAlign
. By default, PlaceInto centers the scaled rectangle in theADesignatedArea
rectangle. - Otherwise, PlaceInto just aligns the current rectangle in the
ADesignatedArea
rectangle according to the specifiedAHorzAlign
andAVertAlign
. By default, PlaceInto centers the scaled rectangle in theADesignatedArea
rectangle. - PlaceInto returns the current rectangle if any of the
ADesignatedArea
dimensions is zero.