Point Types
From Graphics32
Point Types
Graphics32 uses coordinate system with an origin at the top-left corner. Due to performance considerations, other coordinate systems are not supported and not planned in future versions.
Point coordinates are defined with following structures:
TPoint
type TPoint = Windows.TPoint;
type PPoint = ^TPoint;
A point with integer coordinates. TPoint type, is redeclared from Windows.pas unit. It is compatible with all Delphi/Windows API calls.
TFloatPoint
type TFloatPoint = record
X, Y: Single;
end;
type PFloatPoint = ^TFloatPoint;
Defines a point with single-precision floating-point coordinates.
TFixedPoint
type TFixedPoint = record
X, Y: TFixed;
end;
type PFixedPoint = ^TFixedPoint;
TFixedPoint is bitwise-compatible with TPointFx type from Windows.pas, which is used by some API calls. TFixedPoint is not assignment-compatible with TPointFX, however, appropriate data in memory may be safely referenced by both types and it is still possible to assign between these types using, for example, Move procedure from System.pas.
TArrayOfPoint
type TArrayOfPoint = array of TPoint;
A dynamic array of TPoint.
TArrayOfFloatPoint
type TArrayOfFloatPoint = array of TFloatPoint;
A dynamic array of TFloatPoint.
TArrayOfFixedPoint
type TArrayOfFixedPoint = array of TFixedPoint;
A dynamic array of TFixedPoint.
TArrayOfArrayOfPoint
type TArrayOfArrayOfPoint = array of TArrayOfPoint;
TArrayOfArrayOfFloatPoint
type TArrayOfArrayOfFloatPoint = array of TArrayOfFloatPoint;
TArrayOfArrayOfFixedPoint
type TArrayOfArrayOfFixedPoint = array of TArrayOfFixedPoint;
Maybe last three types look a little cumbersome, but they are what it says: dynamic arrays of dynamic arrays of points. These are the types used in PolyPolyline and PolyPolygon functions to define shapes constructed of several outlines.
See Also
Creating Points, PolyPolygon, PolyPolyline, TFixed
Copyright ©2000-2007 Alex Denisov and Contributors - Graphics32 v1.8.3 - Build on 4-March-2007