System.Types.TRectF.SnapToPixel

From RAD Studio API Documentation
Jump to: navigation, search

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 to True by default. When PlaceBetweenPixels is True, the resulting TRectF moves to half the scale.

SnapToPixel returns the current TRectF object after the transformation.

See Also