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.
AScale
is the scale of scene.APlaceBetweenPixels
is set toTrue
by default. WhenPlaceBetweenPixels
isTrue
, the resulting TRectF moves to half the scale.
SnapToPixel returns the current TRectF object after the transformation.