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 {
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.
AScaleis the scale of scene.APlaceBetweenPixelsis set toTrueby default. WhenPlaceBetweenPixelsisTrue, the resulting TPointF moves to half the scale.
SnapToPixel returns the current TPointF object after the transformation.