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 {
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
| function | public | System.Types.pas SystemTypes.h |
System.Types | TRectF |
Description
Rounds the location and size of the current rectangle to the specified AScale value.
AScaleis the scale of scene.APlaceBetweenPixelsis set toTrueby default. WhenPlaceBetweenPixelsisTrue, the resulting TRectF moves to half the scale.
SnapToPixel returns the current TRectF object after the transformation.