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 theADesignatedArearectangle and centers the scaled rectangle inADesignatedArea. Then PlaceInto aligns the obtained rectangle in theADesignatedArearectangle according to the specifiedAHorzAlignandAVertAlign. By default, PlaceInto centers the scaled rectangle in theADesignatedArearectangle. - Otherwise, PlaceInto just aligns the current rectangle in the
ADesignatedArearectangle according to the specifiedAHorzAlignandAVertAlign. By default, PlaceInto centers the scaled rectangle in theADesignatedArearectangle. - PlaceInto returns the current rectangle if any of the
ADesignatedAreadimensions is zero.