System.Types.TPointF.SnapToPixel

提供: RAD Studio API Documentation
移動先: 案内検索

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 未満のスケール値については、Scale1 に設定されます。

  • AScale は、シーンのスケールです。
  • APlaceBetweenPixels は、デフォルトでは、True に設定されます。PlaceBetweenPixelsTrue の場合、結果の TPointF はスケールの半分に移動します。

SnapToPixel は、変換後の現在の TPointF オブジェクトを返します。

関連項目