System.Types.TPointF.SnapToPixel

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function SnapToPixel(const AScale: Single; const APlaceBetweenPixels: Boolean = True): TPointF;

C++

TPointF SnapToPixel(float Scale,
                    bool PlaceBetweenPixels = true) const _ALWAYS_INLINE {

Properties

Type Visibility Source Unit Parent
function public
System.Types.pas
SystemTypes.h
System.Types TPointF

Description

Rounds the current TPointF object to the specified scale value. For scale values less than 1, Scale is set to 1.

  • AScale is the scale of scene.
  • APlaceBetweenPixels is set to True by default. When PlaceBetweenPixels is True, the resulting TPointF moves to half the scale.

SnapToPixel returns the current TPointF object after the transformation.

See Also