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