FMX.Grid.TGlyphColumn.GlyphPlaceIntoBounds
Delphi
function GlyphPlaceIntoBounds(const Index: TImageIndex; const Bounds: TRectF; const Scale: Single): TRectF;
C++
System::Types::TRectF __fastcall GlyphPlaceIntoBounds(const System::Uitypes::TImageIndex Index, const System::Types::TRectF &Bounds, const float Scale);
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | FMX.Grid.pas FMX.Grid.hpp |
FMX.Grid | TGlyphColumn |
説明
Index
のイメージを描画する四角形を返します。Index
のイメージの元の四角形を拡大し、配置します。その際、四角形の縦横比はそのままに、Bounds
の四角形に最もフィットするようにします。
GlyphPlaceIntoBounds あh、次のようなアルゴリズムを実装します:
- 現在の TGlyphColumn オブジェクトの Stretch プロパティが
False
の場合、GlyphPlaceIntoBounds は、Scale
= 1
で拡大された、対象のコレクションのIndex
のイメージのすべてのレイヤから、最大の四角形を取得します。その後、GlyphPlaceIntoBounds は、取得した四角形を、縦横比を維持しつつ、指定されたBounds
四角形に最も合うよう拡大します。その後、GlyphPlaceIntoBounds はこの四角形を、現在の列のデフォルトの整列パラメータを使用して、Bounds
四角形の中に配置します。GlyphPlaceIntoBounds は、取得した四角形を返します。 - 現在の TGlyphColumn オブジェクトの Stretch プロパティが
True
の場合、GlyphPlaceIntoBounds は、対象のコレクションでIndex
のイメージのすべてのレイヤから、最も大きい四角形を、そのレイヤで使用されている Scale で取得します。その後、GlyphPlaceIntoBounds は、取得した四角形を、縦横比を維持しつつ、指定されたBounds
四角形に最も合うよう拡大します。 その後、GlyphPlaceIntoBounds はこの四角形を、現在の列のデフォルトの整列パラメータを使用して、Bounds
四角形の中に配置します。 GlyphPlaceIntoBounds は、取得した四角形を返します。
関連項目
- FMX.ImgList.TCustomImageList.BestSize
- FMX.Grid.TGlyphColumn.Stretch
- FMX.Grid.TColumn.RectPlaceIntoBounds