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:
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.
type TFloatPoint = record
X, Y: Single;
end;
type PFloatPoint = ^TFloatPoint;
Defines a point with single-precision floating-point coordinates.
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.
type TArrayOfPoint = array of TPoint;
A dynamic array of TPoint.
type TArrayOfFloatPoint = array of TFloatPoint;
A dynamic array of TFloatPoint.
type TArrayOfFixedPoint = array of TFixedPoint;
A dynamic array of TFixedPoint.
type TArrayOfArrayOfPoint = array of TArrayOfPoint;
type TArrayOfArrayOfFloatPoint = array of TArrayOfFloatPoint;
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.
Creating Points, TFixed, PolyPolygon, PolyPolyline
Copyright ©2000-2024 Alex Denisov and the Graphics32 Team - Graphics32 2.0 - Help file built on 18 Feb 2024