Record TPointFHelper

Hierarchy
Fields
Properties

Unit

Declaration

type TPointFHelper = record helper for TPointF

Description

Helper for TPointF structure providing additional functionality for point manipulation

Overview

Methods

Public function Ceiling: TPoint;
Public function Floor: TPoint;
Public function IsEmpty: boolean;
Public function Length: Single;
Public function Round: TPoint;
Public function Truncate: TPoint;
Public procedure Normalize;
Public procedure Offset(const apt: TPoint); overload;
Public procedure Offset(const apt: TPointF); overload;
Public procedure Offset(dx, dy: longint); overload;
Public procedure Offset(dx, dy: single); overload;
Public procedure Scale(AScale: single);

Description

Methods

Public function Ceiling: TPoint;

Rounds the coordinates of the point to the nearest integer towards positive infinity

Public function Floor: TPoint;

Rounds the coordinates of the point to the nearest integer towards negative infinity

Public function IsEmpty: boolean;

Determines if the point is empty (has special coordinates EmptyPointF)

Public function Length: Single;

Calculates the length (magnitude) of the point from the origin

Public function Round: TPoint;

Rounds the coordinates of the point to the nearest integer

Public function Truncate: TPoint;

Truncates the coordinates of the point, discarding fractional part

Public procedure Normalize;

Normalizes the point (modifies it to a unit length)

Public procedure Offset(const apt: TPoint); overload;

Offsets the point by another point (TPoint)

Public procedure Offset(const apt: TPointF); overload;

Offsets the point by another point (TPointF)

Public procedure Offset(dx, dy: longint); overload;

Offsets the point by specified distances in the X (dx) and Y (dy) directions (integer values)

Public procedure Offset(dx, dy: single); overload;

Offsets the point by specified distances in the X (dx) and Y (dy) directions (single values)

Public procedure Scale(AScale: single);

Scales the point as a vector from the origin) by a specified factor