System.Types.TRectF.SnapToPixel
Delphi
function SnapToPixel(const AScale: Single; const APlaceBetweenPixels: Boolean = True): TRectF;
C++
TRectF SnapToPixel(float Scale,
bool PlaceBetweenPixels = true) const _ALWAYS_INLINE {
プロパティ
種類 | 可視性 | ソース | ユニット | 親 |
---|---|---|---|---|
function | public | System.Types.pas SystemTypes.h |
System.Types | TRectF |
説明
現在の四角形の位置をサイズを、指定された AScale 値に丸めます。
AScale
は、シーンのスケールです。APlaceBetweenPixels
は、デフォルトでは、True
に設定されます。PlaceBetweenPixels
がTrue
の場合、結果の TRectF はスケールの半分に移動します。
SnapToPixel は、変換後の現在の TRectF オブジェクトを返します。