Sign in Join
FPDoc Onlineexperiment

TPoint record

In unit Types

Point in a plane.

Declaration

pascal
TPoint = packed record

Description

TPoint is a generic definition of a point in a 2-dimensional discrete plane, where X indicates the horizontal position, and Y the vertical position (positions usually measured in pixels), and 0,0 is the origin of the plane.

Usually, the origin is the upper-left corner of the screen, with Y increasing as one moves further down the screen - this is opposite to the mathematical view where Y increases as one moves upwards.

The coordinates are integers, (32-bit, signed) so the coordinate system runs from -MaxInt to MaxInt.

See also

Methods

Zeropublic
Addpublic
Distancepublic
IsZeropublic
Subtractpublic
SetLocationpublic
Offsetpublic
Anglepublic
PointInCirclepublic
equal(TPoint,TPoint):Booleanpublic
notequal(TPoint,TPoint):Booleanpublic
add(TPoint,TPoint):TPointpublic
subtract(TPoint,TPoint):TPointpublic
assign(TSmallPoint):TPointpublic
explicit(TPoint):TSmallPointpublic

Fields

XpublicHorizontal position.
YpublicVertical position.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.