Sign in Join
Wiki copytemporary

BGRABitmap Geometry types: what changed

Revision 1 to 2. Removed lines have a minus sign; added lines have a plus sign.

OldNewLine
1-Here are all the basic geometry types used in [[BGRABitmap]] library. They are provided by _BGRABitmapTypes_ unit.
2-
3-## Contents
4-
5- * 1 Geometry types
6- * 1.1 2D points
7- * 1.2 3D points
8- * 1.3 Rectangles
9- * 1.4 Paths
10- * 1.5 Polygon filling
11- * 1.6 Arrows
12- * 1.7 Gradients
13- * 1.8 Bézier curves
1+Here are all the basic geometry types used in [[BGRABitmap]] library. They are provided by *BGRABitmapTypes* unit.
142
153### Geometry types
164
175#### 2D points
186
19-_TPoint_ = BGRAClasses.TPoint;
20----
21-| Represents a point with X and Y integer coordinates
22-| **const** EmptyPoint : TPoint = (X: -2147483648; Y: -2147483648);
23-| | A constant representing an empty point (with minimum possible integer values for X and Y) that can be used as a separator in a list of TPoint
24-| **function** IsEmptyPoint(**const** APoint: TPoint): boolean;
25-| | Checks if the given point is equivalent to EmptyPoint
26-**const** EmptySingle = single(-3.402823e38);
27-| Value indicating that there is nothing in the single-precision floating point value. It is also used as a separator in lists
28-_PPointF_ = ^BGRAClasses.TPointF;
29-| Pointer to a TPointF structure
30-_TPointF_ = BGRAClasses.TPointF;
31-| Contains a point with single-precision floating point coordinates
32-| **const** EmptyPointF: TPointF = (x: -3.402823e38; y: -3.402823e38);
33-| | Value indicating that there is an empty TPointF structure. It is also used as a separator in lists of points
34-| **function** PointF(x, y: single): TPointF; **overload** ;
35-| | Creates a new structure with values _x_ and _y_
36-| **function** PointF(pt: TPoint): TPointF; **overload** ;
37-| | Creates a new structure converting integer values to single-precision floating-point coordinates
38-| **function** isEmptyPointF(**const** pt: TPointF): boolean;
39-| | Checks if the structure is empty (equal to EmptyPointF)
40-| **operator** = (**const** pt1, pt2: TPointF): boolean; **inline** ;
41-| | Checks if both _x_ and _y_ are equal
42-| **operator** \+ (**const** pt1, pt2: TPointF): TPointF; **inline** ;
43-| | Adds _x_ and _y_ components separately. It is like adding vectors
44-| **operator** \- (**const** pt1, pt2: TPointF): TPointF; **inline** ;
45-| | Subtract _x_ and _y_ components separately. It is like subtracting vectors
46-| **operator** \- (**const** pt2: TPointF): TPointF; **inline** ;
47-| | Returns a point with opposite values for _x_ and _y_ components
48-| **operator** * (**const** pt1, pt2: TPointF): single; **inline** ;
49-| | Scalar product (deprecated): multiplies _x_ and _y_ components and returns the sum
50-| **operator** ** (**const** pt1, pt2: TPointF): single; **inline** ;
51-| | Scalar product: multiplies _x_ and _y_ components and returns the sum
52-| **operator** * (**const** pt1: TPointF; factor: single): TPointF; **inline** ;
53-| | Multiplies both _x_ and _y_ by _factor_. It scales the vector represented by (_x_ , _y_)
54-| **operator** * (factor: single; **const** pt1: TPointF): TPointF; **inline** ;
55-| | Multiplies both _x_ and _y_ by _factor_. It scales the vector represented by (_x_ , _y_)
56-| **function** VectLen(**const** dx,dy: single): single; **overload** ; **inline** ;
57-| | Returns the length of the vector (_dx_ , _dy_)
58-| **function** VectLen(**const** v: TPointF): single; **overload** ;
59-| | Returns the length of the vector represented by (_x_ , _y_)
60-| **function** VectDet(**const** v1,v2: TPointF): double; **inline** ;
61-| | Computes the determinant of the two vectors (equal to the determinant of the square matrix with those vectors as columns)
62-_TPointFHelper_ = **record** **helper** **for** TPointF
63-| Helper for TPointF structure providing additional functionality for point manipulation
64-| **procedure** Offset(**const** apt: TPointF); **overload** ;
65-| | Offsets the point by another point (TPointF)
66-| **procedure** Offset(**const** apt: TPoint); **overload** ;
67-| | Offsets the point by another point (TPoint)
68-| **procedure** Offset(dx, dy: longint); **overload** ;
69-| | Offsets the point by specified distances in the X (_dx_) and Y (_dy_) directions (integer values)
70-| **procedure** Offset(dx, dy: single); **overload** ;
71-| | Offsets the point by specified distances in the X (_dx_) and Y (_dy_) directions (single values)
72-| **procedure** Scale(AScale: single);
73-| | Scales the point as a vector from the origin) by a specified factor
74-| **procedure** Normalize;
75-| | Normalizes the point (modifies it to a unit length)
76-| **function** Ceiling: TPoint;
77-| | Rounds the coordinates of the point to the nearest integer towards positive infinity
78-| **function** Truncate: TPoint;
79-| | Truncates the coordinates of the point, discarding fractional part
80-| **function** Floor: TPoint;
81-| | Rounds the coordinates of the point to the nearest integer towards negative infinity
82-| **function** Round: TPoint;
83-| | Rounds the coordinates of the point to the nearest integer
84-| **function** Length: Single;
85-| | Calculates the length (magnitude) of the point from the origin
86-| **function** IsEmpty: boolean;
87-| | Determines if the point is empty (has special coordinates EmptyPointF)
88-_ArrayOfTPointF_ = **array** **of** TPointF;
89-| Contains an array of points with single-precision floating point coordinates
90-| **function** PointsF(**const** pts: **array** **of** TPointF): ArrayOfTPointF;
91-| | Creates an array of TPointF
92-| **function** ConcatPointsF(**const** APolylines: **array** **of** ArrayOfTPointF; AInsertEmptyPointInBetween: boolean = false): ArrayOfTPointF;
93-| | Concatenates arrays of TPointF
94-| **function** PolylineLen(**const** pts: **array** **of** TPointF; AClosed: boolean = false): single;
95-| | Compute the length of the polyline contained in the array. _AClosed_ specifies if the last point is to be joined to the first one
96-_TAffineMatrix_ = **array**[1..2,1..3] **of** single;
97-| An affine matrix contains three 2D vectors: the image of x, the image of y and the translation
98-
7+*TPoint* = BGRAClasses.TPoint;
8+
9+Represents a point with X and Y integer coordinates
10+
11+**const** EmptyPoint : TPoint = (X: -2147483648; Y: -2147483648);
12+
13+A constant representing an empty point (with minimum possible integer values for X and Y) that can be used as a separator in a list of TPoint
14+
15+**function** IsEmptyPoint(**const** APoint: TPoint): boolean;
16+
17+Checks if the given point is equivalent to EmptyPoint
18+
19+**const** EmptySingle = single(-3.402823e38);
20+
21+Value indicating that there is nothing in the single-precision floating point value. It is also used as a separator in lists
22+
23+*PPointF* = ^BGRAClasses.TPointF;
24+
25+Pointer to a TPointF structure
26+
27+*TPointF* = BGRAClasses.TPointF;
28+
29+Contains a point with single-precision floating point coordinates
30+
31+**const** EmptyPointF: TPointF = (x: -3.402823e38; y: -3.402823e38);
32+
33+Value indicating that there is an empty TPointF structure. It is also used as a separator in lists of points
34+
35+**function** PointF(x, y: single): TPointF; **overload**;
36+
37+Creates a new structure with values *x* and *y*
38+
39+**function** PointF(pt: TPoint): TPointF; **overload**;
40+
41+Creates a new structure converting integer values to single-precision floating-point coordinates
42+
43+**function** isEmptyPointF(**const** pt: TPointF): boolean;
44+
45+Checks if the structure is empty (equal to EmptyPointF)
46+
47+**operator** = (**const** pt1, pt2: TPointF): boolean; **inline**;
48+
49+Checks if both *x* and *y* are equal
50+
51+**operator** + (**const** pt1, pt2: TPointF): TPointF; **inline**;
52+
53+Adds *x* and *y* components separately. It is like adding vectors
54+
55+**operator** - (**const** pt1, pt2: TPointF): TPointF; **inline**;
56+
57+Subtract *x* and *y* components separately. It is like subtracting vectors
58+
59+**operator** - (**const** pt2: TPointF): TPointF; **inline**;
60+
61+Returns a point with opposite values for *x* and *y* components
62+
63+**operator** * (**const** pt1, pt2: TPointF): single; **inline**;
64+
65+Scalar product (deprecated): multiplies *x* and *y* components and returns the sum
66+
67+**operator** ** (**const** pt1, pt2: TPointF): single; **inline**;
68+
69+Scalar product: multiplies *x* and *y* components and returns the sum
70+
71+**operator** * (**const** pt1: TPointF; factor: single): TPointF; **inline**;
72+
73+Multiplies both *x* and *y* by *factor*. It scales the vector represented by (*x*, *y*)
74+
75+**operator** * (factor: single; **const** pt1: TPointF): TPointF; **inline**;
76+
77+Multiplies both *x* and *y* by *factor*. It scales the vector represented by (*x*, *y*)
78+
79+**function** VectLen(**const** dx,dy: single): single; **overload**; **inline**;
80+
81+Returns the length of the vector (*dx*, *dy*)
82+
83+**function** VectLen(**const** v: TPointF): single; **overload**;
84+
85+Returns the length of the vector represented by (*x*, *y*)
86+
87+**function** VectDet(**const** v1,v2: TPointF): double; **inline**;
88+
89+Computes the determinant of the two vectors (equal to the determinant of the square matrix with those vectors as columns)
90+
91+*TPointFHelper* = **record** **helper** **for** TPointF
92+
93+Helper for TPointF structure providing additional functionality for point manipulation
94+
95+**procedure** Offset(**const** apt: TPointF); **overload**;
96+
97+Offsets the point by another point (TPointF)
98+
99+**procedure** Offset(**const** apt: TPoint); **overload**;
100+
101+Offsets the point by another point (TPoint)
102+
103+**procedure** Offset(dx, dy: longint); **overload**;
104+
105+Offsets the point by specified distances in the X (*dx*) and Y (*dy*) directions (integer values)
106+
107+**procedure** Offset(dx, dy: single); **overload**;
108+
109+Offsets the point by specified distances in the X (*dx*) and Y (*dy*) directions (single values)
110+
111+**procedure** Scale(AScale: single);
112+
113+Scales the point as a vector from the origin) by a specified factor
114+
115+**procedure** Normalize;
116+
117+Normalizes the point (modifies it to a unit length)
118+
119+**function** Ceiling: TPoint;
120+
121+Rounds the coordinates of the point to the nearest integer towards positive infinity
122+
123+**function** Truncate: TPoint;
124+
125+Truncates the coordinates of the point, discarding fractional part
126+
127+**function** Floor: TPoint;
128+
129+Rounds the coordinates of the point to the nearest integer towards negative infinity
130+
131+**function** Round: TPoint;
132+
133+Rounds the coordinates of the point to the nearest integer
134+
135+**function** Length: Single;
136+
137+Calculates the length (magnitude) of the point from the origin
138+
139+**function** IsEmpty: boolean;
140+
141+Determines if the point is empty (has special coordinates EmptyPointF)
142+
143+*ArrayOfTPointF* = **array** **of** TPointF;
144+
145+Contains an array of points with single-precision floating point coordinates
146+
147+**function** PointsF(**const** pts: **array** **of** TPointF): ArrayOfTPointF;
148+
149+Creates an array of TPointF
150+
151+**function** ConcatPointsF(**const** APolylines: **array** **of** ArrayOfTPointF; AInsertEmptyPointInBetween: boolean = false): ArrayOfTPointF;
152+
153+Concatenates arrays of TPointF
154+
155+**function** PolylineLen(**const** pts: **array** **of** TPointF; AClosed: boolean = false): single;
156+
157+Compute the length of the polyline contained in the array. *AClosed* specifies if the last point is to be joined to the first one
158+
159+*TAffineMatrix* = **array**\[1..2,1..3\] **of** single;
160+
161+An affine matrix contains three 2D vectors: the image of x, the image of y and the translation
162+
99163#### 3D points
100164
101-_PPoint3D_ = ^TPoint3D;
102----
103-| Pointer to a TPoint3D structure
104-_TPoint3D_ = **record**
105-| Point in 3D with single-precision floating point coordinates
106-| **procedure** Offset(**const** point3D: TPoint3D);
107-| | Offsets the point by the given 3D vector
108-| **procedure** Scale(AScale: single);
109-| | Scale the point (as a vector from the origin)
110-| **function** Point3D(x,y,z: single): TPoint3D;
111-| | Creates a new structure with values (_x_ , _y_ , _z_)
112-| **operator** = (**const** v1,v2: TPoint3D): boolean; **inline** ;
113-| | Checks if all components _x_ , _y_ and _z_ are equal
114-| **operator** \+ (**const** v1,v2: TPoint3D): TPoint3D; **inline** ;
115-| | Adds components separately. It is like adding vectors
116-| **operator** \- (**const** v1,v2: TPoint3D): TPoint3D; **inline** ;
117-| | Subtract components separately. It is like subtracting vectors
118-| **operator** \- (**const** v: TPoint3D): TPoint3D; **inline** ;
119-| | Returns a point with opposite values for all components
120-| **operator** * (**const** v1,v2: TPoint3D): single; **inline** ;
121-| | Scalar product: multiplies components and returns the sum
122-| **operator** * (**const** v1: TPoint3D; **const** factor: single): TPoint3D; **inline** ;
123-| | Multiplies components by _factor_. It scales the vector represented by (_x_ , _y_ , _z_)
124-| **operator** * (**const** factor: single; **const** v1: TPoint3D): TPoint3D; **inline** ;
125-| | Multiplies components by _factor_. It scales the vector represented by (_x_ , _y_ , _z_)
126-| **procedure** VectProduct3D(u,v: TPoint3D; **out** w: TPoint3D);
127-| | Computes the vectorial product _w_. It is perpendicular to both _u_ and _v_
128-| **procedure** Normalize3D(**var** v: TPoint3D); **inline** ;
129-| | Normalize the vector, i.e. scale it so that its length be 1
130-| **function** VectLen3D(**const** v: TPoint3D): single;
131-| | Computes the length of the vector from the origin to the point
132-_TFaceCulling_ = (
133-| Enumerates the modes of face culling in 3D rendering. Face culling is a technique used to determine which faces of a polygon are visible and should be rendered
134-| _fcNone_ ,
135-| | No face culling is applied. All faces of the polygon are rendered
136-| _fcKeepCW_ ,
137-| | Keeps only the faces that are clockwise (CW) from the viewer's perspective. Typically used to remove back faces when the convention is that CW is for front faces
138-| _fcKeepCCW_);
139-| | Keeps only the faces that are counter-clockwise (CCW) from the viewer's perspective. Typically used to remove back faces when the convention is that CCW is for front faces
140-
165+*PPoint3D* = ^TPoint3D;
166+
167+Pointer to a TPoint3D structure
168+
169+*TPoint3D* = **record**
170+
171+Point in 3D with single-precision floating point coordinates
172+
173+**procedure** Offset(**const** point3D: TPoint3D);
174+
175+Offsets the point by the given 3D vector
176+
177+**procedure** Scale(AScale: single);
178+
179+Scale the point (as a vector from the origin)
180+
181+**function** Point3D(x,y,z: single): TPoint3D;
182+
183+Creates a new structure with values (*x*, *y*, *z*)
184+
185+**operator** = (**const** v1,v2: TPoint3D): boolean; **inline**;
186+
187+Checks if all components *x*, *y* and *z* are equal
188+
189+**operator** + (**const** v1,v2: TPoint3D): TPoint3D; **inline**;
190+
191+Adds components separately. It is like adding vectors
192+
193+**operator** - (**const** v1,v2: TPoint3D): TPoint3D; **inline**;
194+
195+Subtract components separately. It is like subtracting vectors
196+
197+**operator** - (**const** v: TPoint3D): TPoint3D; **inline**;
198+
199+Returns a point with opposite values for all components
200+
201+**operator** * (**const** v1,v2: TPoint3D): single; **inline**;
202+
203+Scalar product: multiplies components and returns the sum
204+
205+**operator** * (**const** v1: TPoint3D; **const** factor: single): TPoint3D; **inline**;
206+
207+Multiplies components by *factor*. It scales the vector represented by (*x*, *y*, *z*)
208+
209+**operator** * (**const** factor: single; **const** v1: TPoint3D): TPoint3D; **inline**;
210+
211+Multiplies components by *factor*. It scales the vector represented by (*x*, *y*, *z*)
212+
213+**procedure** VectProduct3D(u,v: TPoint3D; **out** w: TPoint3D);
214+
215+Computes the vectorial product *w*. It is perpendicular to both *u* and *v*
216+
217+**procedure** Normalize3D(**var** v: TPoint3D); **inline**;
218+
219+Normalize the vector, i.e. scale it so that its length be 1
220+
221+**function** VectLen3D(**const** v: TPoint3D): single;
222+
223+Computes the length of the vector from the origin to the point
224+
225+*TFaceCulling* = (
226+
227+Enumerates the modes of face culling in 3D rendering. Face culling is a technique used to determine which faces of a polygon are visible and should be rendered
228+
229+*fcNone*,
230+
231+No face culling is applied. All faces of the polygon are rendered
232+
233+*fcKeepCW*,
234+
235+Keeps only the faces that are clockwise (CW) from the viewer's perspective. Typically used to remove back faces when the convention is that CW is for front faces
236+
237+*fcKeepCCW*);
238+
239+Keeps only the faces that are counter-clockwise (CCW) from the viewer's perspective. Typically used to remove back faces when the convention is that CCW is for front faces
240+
141241#### Rectangles
142242
143-_TRectF_ = BGRAClasses.TRectF;
144----
145-| Represents a rectangle with single-precision floating point coordinates
146-| **const** EmptyRectF : TRectF = (left:0; top:0; right:0; bottom: 0);
147-| | A constant representing an empty rectangle with all coordinates set to 0
148-| **function** RectF(Left, Top, Right, Bottom: Single): TRectF;
149-| | Creates a TRectF structure with specified left, top, right, and bottom coordinates
150-| **function** RectF(**const** ATopLeft,ABottomRight: TPointF): TRectF;
151-| | Creates a TRectF structure from two TPointF points representing the top-left and bottom-right corners
152-| **function** RectF(**const** ARect: TRect): TRectF;
153-| | Creates a TRectF structure from a TRect structure (integer coordinates converted to single precision)
154-| **function** RectWithSizeF(left,top,width,height: Single): TRectF;
155-| | Creates a TRectF structure with a specified position (left, top) and size (width, height)
156-| **function** IsEmptyRectF(**const** ARect:TRectF): boolean;
157-| | Checks if the given TRectF structure is empty (of zero size)
158-| **const** EmptyRect : TRect = (left:0; top:0; right:0; bottom: 0);
159-| | A value for an empty rectangle with integer coordinates
160-| **function** PtInRect(**const** pt: TPoint; r: TRect): boolean; **overload** ;
161-| | Checks if a point is in a rectangle with integer coordinates. This follows usual convention that _r.Right_ and _r.Bottom_ are not considered to be included in the rectangle.
162-| **function** RectWithSize(left,top,width,height: integer): TRect;
163-| | Creates a rectangle with integer coordinates with the specified _width_ and _height_
164-_TRectHelper_ = **record** **helper** **for** TRect
165-| Helper for TRect structure providing additional functionality to manipulate rectangles
166-| **function** GetHeight: integer;
167-| | Gets the height of the rectangle
168-| **function** GetIsEmpty: boolean;
169-| | Determines if the rectangle is empty (of zero size)
170-| **function** GetWidth: integer;
171-| | Gets the width of the rectangle
172-| **procedure** SetHeight(AValue: integer);
173-| | Sets the height of the rectangle
174-| **procedure** SetWidth(AValue: integer);
175-| | Sets the width of the rectangle
176-| **constructor** Create(Origin: TPoint; AWidth, AHeight: Longint); **overload** ;
177-| | Creates a rectangle with specified origin, width, and height
178-| **constructor** Create(ALeft, ATop, ARight, ABottom: Longint); **overload** ;
179-| | Creates a rectangle with specified left, top, right, and bottom coordinates
180-| **procedure** Intersect(R: TRect);
181-| | Modifies the rectangle to be the intersection of itself and another rectangle
182-| **class** **function** Intersect(R1: TRect; R2: TRect): TRect; static;
183-| | Returns the intersection of two given rectangles
184-| **function** IntersectsWith(R: TRect): Boolean;
185-| | Checks if the rectangle intersects with another rectangle
186-| **class** **function** Union(R1, R2: TRect): TRect; static;
187-| | Returns the smallest rectangle that contains both of the given rectangles
188-| **procedure** Union(R: TRect);
189-| | Modifies the rectangle to be the union of itself and another rectangle
190-| **procedure** Offset(DX, DY: Longint);
191-| | Offsets the rectangle by the given distances in the X and Y directions
192-| **procedure** Inflate(DX, DY: Longint);
193-| | Expands or contracts the rectangle by the specified amounts in both directions
194-| **function** Contains(**const** APoint: TPoint): boolean; **overload** ;
195-| | Checks if the rectangle contains a specified point
196-| **function** Contains(**const** ARect: TRect): boolean; **overload** ;
197-| | Checks if the rectangle completely contains another rectangle
198-| **property** Width: integer **read** GetWidth **write** SetWidth;
199-| | Property to get or set the width of the rectangle
200-| **property** Height: integer **read** GetHeight **write** SetHeight;
201-| | Property to get or set the height of the rectangle
202-| **property** IsEmpty: boolean **read** GetIsEmpty;
203-| | Property to check if the rectangle is empty
204-_TSize_ = BGRAClasses.TSize;
205-| Constains a size with integer with and height
206-_TSizeHelper_ = **record** **helper** **for** TSize
207-| Helper to access a size
208-| **function** GetHeight: integer;
209-| | Gets the height of the size
210-| **function** GetWidth: integer;
211-| | Gets the width of the size
212-| **property** Width: integer **read** GetWidth;
213-| | Property to get the width
214-| **property** Height: integer **read** GetHeight;
215-| | Property to get the height
216-_PRectF_ = ^TRectF;
217-| Pointer to a TRectF structure
218-_TRectFHelper_ = **record** **helper** **for** TRectF
219-| Helper for TRectF structure providing additional functionality for rectangle manipulation
220-| **class** **function** Intersect(**const** R1: TRectF; **const** R2: TRectF): TRectF; **overload** ; static;
221-| | Returns the intersection of two given rectangles
222-| **class** **function** Union(**const** R1: TRectF; **const** R2: TRectF): TRectF; **overload** ; static;
223-| | Returns the union of two given rectangles
224-| **class** **function** Union(**const** R1: TRectF; **const** R2: TRectF; ADiscardEmpty: boolean): TRectF; **overload** ; static;
225-| | Returns the union of two given rectangles, with an option to ignore empty rectangles
226-| **function** Union(**const** r: TRectF): TRectF; **overload** ;
227-| | Returns the union of itself and another rectangle
228-| **function** Union(**const** r: TRectF; ADiscardEmpty: boolean): TRectF; **overload** ;
229-| | Returns the union of itself and another rectangle, with an option to ignore empty rectangles
230-| **procedure** Include(**const** APoint: TPointF);
231-| | Expands the rectangle to include a specified point (empty points are ignored)
232-| **function** Contains(**const** APoint: TPointF; AIncludeBottomRight: boolean = false): boolean;
233-| | Checks if the rectangle contains a specified point, with an option to include or exclude the bottom-right boundary
234-| **function** IntersectsWith(**const** r: TRectF): boolean;
235-| | Checks if the rectangle intersects with another rectangle
236-| **function** IsEmpty: boolean;
237-| | Determines if the rectangle is empty (of zero size)
238-_TAffineBox_ = **object**
239-| Object representing an affine box, defined by three corner points (top-left, top-tight, bottom-left)
240-| **function** GetAsPolygon: ArrayOfTPointF;
241-| | Retrieves the affine box as an array of points (polygon representation)
242-| **function** GetBottomRight: TPointF;
243-| | Gets the bottom-right corner of the affine box
244-| **function** GetCenter: TPointF;
245-| | Calculates the center point of the affine box
246-| **function** GetHeight: single;
247-| | Calculates the height of the affine box
248-| **function** GetIsEmpty: boolean;
249-| | Determines if the affine box is empty (one of the point being empty, not just of zero size)
250-| **function** GetRectBounds: TRect;
251-| | Gets the bounding rectangle of the affine box as TRect
252-| **function** GetRectBoundsF: TRectF;
253-| | Gets the bounding rectangle of the affine box as TRectF
254-| **function** GetSurface: single;
255-| | Calculates the surface area of the affine box
256-| **function** GetWidth: single;
257-| | Calculates the width of the affine box
258-| _TopLeft_ ,
259-| | Top-left corner of the affine box
260-| _TopRight_ ,
261-| | Top-right corner of the affine box
262-| _BottomLeft_ : TPointF;
263-| | Bottom-left corner of the affine box
264-| **class** **function** EmptyBox: TAffineBox; static;
265-| | Creates an empty affine box
266-| **class** **function** AffineBox(ATopLeft, ATopRight, ABottomLeft: TPointF): TAffineBox; **overload** ; static;
267-| | Creates an affine box defined by three corner points
268-| **class** **function** AffineBox(ARectF: TRectF): TAffineBox; **overload** ; static;
269-| | Creates an affine box from a TRectF structure
270-| **procedure** Offset(AOfsX, AOfsY: single); **overload** ;
271-| | Offsets the affine box by specified X and Y amounts
272-| **procedure** Offset(AOfs: TPointF); **overload** ;
273-| | Offsets the affine box by a specified point
274-| **procedure** Inflate(AHoriz, AVert: single);
275-| | Inflates the affine box along its axes by specified horizontal and vertical amounts
276-| **function** Contains(APoint: TPointF): boolean;
277-| | Checks if a point is contained within the affine box
278-| **property** RectBounds: TRect **read** GetRectBounds;
279-| | Bounding rectangle as TRect
280-| **property** RectBoundsF: TRectF **read** GetRectBoundsF;
281-| | Bounding rectangle as TRectF
282-| **property** BottomRight: TPointF **read** GetBottomRight;
283-| | Bottom-right corner of the affine box
284-| **property** IsEmpty: boolean **read** GetIsEmpty;
285-| | Check if the affine box is empty (containing empty points, not just of zero size)
286-| **property** AsPolygon: ArrayOfTPointF **read** GetAsPolygon;
287-| | Affine box as an array of points (polygon)
288-| **property** Width: single **read** GetWidth;
289-| | Width of the affine box along its axes
290-| **property** Height: single **read** GetHeight;
291-| | Height of the affine box along its axes
292-| **property** Surface: single **read** GetSurface;
293-| | Surface area of the affine box
294-| **property** Center: TPointF **read** GetCenter;
295-| | Center point of the affine box
296-_TRoundRectangleOption_ = (
297-| Possible options for a round rectangle
298-| _rrTopLeftSquare_ ,_rrTopRightSquare_ ,_rrBottomRightSquare_ ,_rrBottomLeftSquare_ ,
299-| | specify that a corner is a square (not rounded)
300-| _rrTopLeftBevel_ ,_rrTopRightBevel_ ,_rrBottomRightBevel_ ,_rrBottomLeftBevel_ ,
301-| | specify that a corner is a bevel (cut)
302-| _rrDefault_);
303-| | default option, does nothing particular
304-| _TRoundRectangleOptions_ = **set** **of** TRoundRectangleOption;
305-| | A set of options for a round rectangle
306-
243+*TRectF* = BGRAClasses.TRectF;
244+
245+Represents a rectangle with single-precision floating point coordinates
246+
247+**const** EmptyRectF : TRectF = (left:0; top:0; right:0; bottom: 0);
248+
249+A constant representing an empty rectangle with all coordinates set to 0
250+
251+**function** RectF(Left, Top, Right, Bottom: Single): TRectF;
252+
253+Creates a TRectF structure with specified left, top, right, and bottom coordinates
254+
255+**function** RectF(**const** ATopLeft,ABottomRight: TPointF): TRectF;
256+
257+Creates a TRectF structure from two TPointF points representing the top-left and bottom-right corners
258+
259+**function** RectF(**const** ARect: TRect): TRectF;
260+
261+Creates a TRectF structure from a TRect structure (integer coordinates converted to single precision)
262+
263+**function** RectWithSizeF(left,top,width,height: Single): TRectF;
264+
265+Creates a TRectF structure with a specified position (left, top) and size (width, height)
266+
267+**function** IsEmptyRectF(**const** ARect:TRectF): boolean;
268+
269+Checks if the given TRectF structure is empty (of zero size)
270+
271+**const** EmptyRect : TRect = (left:0; top:0; right:0; bottom: 0);
272+
273+A value for an empty rectangle with integer coordinates
274+
275+**function** PtInRect(**const** pt: TPoint; r: TRect): boolean; **overload**;
276+
277+Checks if a point is in a rectangle with integer coordinates. This follows usual convention that *r.Right* and *r.Bottom* are not considered to be included in the rectangle.
278+
279+**function** RectWithSize(left,top,width,height: integer): TRect;
280+
281+Creates a rectangle with integer coordinates with the specified *width* and *height*
282+
283+*TRectHelper* = **record** **helper** **for** TRect
284+
285+Helper for TRect structure providing additional functionality to manipulate rectangles
286+
287+**function** GetHeight: integer;
288+
289+Gets the height of the rectangle
290+
291+**function** GetIsEmpty: boolean;
292+
293+Determines if the rectangle is empty (of zero size)
294+
295+**function** GetWidth: integer;
296+
297+Gets the width of the rectangle
298+
299+**procedure** SetHeight(AValue: integer);
300+
301+Sets the height of the rectangle
302+
303+**procedure** SetWidth(AValue: integer);
304+
305+Sets the width of the rectangle
306+
307+**constructor** Create(Origin: TPoint; AWidth, AHeight: Longint); **overload**;
308+
309+Creates a rectangle with specified origin, width, and height
310+
311+**constructor** Create(ALeft, ATop, ARight, ABottom: Longint); **overload**;
312+
313+Creates a rectangle with specified left, top, right, and bottom coordinates
314+
315+**procedure** Intersect(R: TRect);
316+
317+Modifies the rectangle to be the intersection of itself and another rectangle
318+
319+**class** **function** Intersect(R1: TRect; R2: TRect): TRect; static;
320+
321+Returns the intersection of two given rectangles
322+
323+**function** IntersectsWith(R: TRect): Boolean;
324+
325+Checks if the rectangle intersects with another rectangle
326+
327+**class** **function** Union(R1, R2: TRect): TRect; static;
328+
329+Returns the smallest rectangle that contains both of the given rectangles
330+
331+**procedure** Union(R: TRect);
332+
333+Modifies the rectangle to be the union of itself and another rectangle
334+
335+**procedure** Offset(DX, DY: Longint);
336+
337+Offsets the rectangle by the given distances in the X and Y directions
338+
339+**procedure** Inflate(DX, DY: Longint);
340+
341+Expands or contracts the rectangle by the specified amounts in both directions
342+
343+**function** Contains(**const** APoint: TPoint): boolean; **overload**;
344+
345+Checks if the rectangle contains a specified point
346+
347+**function** Contains(**const** ARect: TRect): boolean; **overload**;
348+
349+Checks if the rectangle completely contains another rectangle
350+
351+**property** Width: integer **read** GetWidth **write** SetWidth;
352+
353+Property to get or set the width of the rectangle
354+
355+**property** Height: integer **read** GetHeight **write** SetHeight;
356+
357+Property to get or set the height of the rectangle
358+
359+**property** IsEmpty: boolean **read** GetIsEmpty;
360+
361+Property to check if the rectangle is empty
362+
363+*TSize* = BGRAClasses.TSize;
364+
365+Constains a size with integer with and height
366+
367+*TSizeHelper* = **record** **helper** **for** TSize
368+
369+Helper to access a size
370+
371+**function** GetHeight: integer;
372+
373+Gets the height of the size
374+
375+**function** GetWidth: integer;
376+
377+Gets the width of the size
378+
379+**property** Width: integer **read** GetWidth;
380+
381+Property to get the width
382+
383+**property** Height: integer **read** GetHeight;
384+
385+Property to get the height
386+
387+*PRectF* = ^TRectF;
388+
389+Pointer to a TRectF structure
390+
391+*TRectFHelper* = **record** **helper** **for** TRectF
392+
393+Helper for TRectF structure providing additional functionality for rectangle manipulation
394+
395+**class** **function** Intersect(**const** R1: TRectF; **const** R2: TRectF): TRectF; **overload**; static;
396+
397+Returns the intersection of two given rectangles
398+
399+**class** **function** Union(**const** R1: TRectF; **const** R2: TRectF): TRectF; **overload**; static;
400+
401+Returns the union of two given rectangles
402+
403+**class** **function** Union(**const** R1: TRectF; **const** R2: TRectF; ADiscardEmpty: boolean): TRectF; **overload**; static;
404+
405+Returns the union of two given rectangles, with an option to ignore empty rectangles
406+
407+**function** Union(**const** r: TRectF): TRectF; **overload**;
408+
409+Returns the union of itself and another rectangle
410+
411+**function** Union(**const** r: TRectF; ADiscardEmpty: boolean): TRectF; **overload**;
412+
413+Returns the union of itself and another rectangle, with an option to ignore empty rectangles
414+
415+**procedure** Include(**const** APoint: TPointF);
416+
417+Expands the rectangle to include a specified point (empty points are ignored)
418+
419+**function** Contains(**const** APoint: TPointF; AIncludeBottomRight: boolean = false): boolean;
420+
421+Checks if the rectangle contains a specified point, with an option to include or exclude the bottom-right boundary
422+
423+**function** IntersectsWith(**const** r: TRectF): boolean;
424+
425+Checks if the rectangle intersects with another rectangle
426+
427+**function** IsEmpty: boolean;
428+
429+Determines if the rectangle is empty (of zero size)
430+
431+*TAffineBox* = **object**
432+
433+Object representing an affine box, defined by three corner points (top-left, top-tight, bottom-left)
434+
435+**function** GetAsPolygon: ArrayOfTPointF;
436+
437+Retrieves the affine box as an array of points (polygon representation)
438+
439+**function** GetBottomRight: TPointF;
440+
441+Gets the bottom-right corner of the affine box
442+
443+**function** GetCenter: TPointF;
444+
445+Calculates the center point of the affine box
446+
447+**function** GetHeight: single;
448+
449+Calculates the height of the affine box
450+
451+**function** GetIsEmpty: boolean;
452+
453+Determines if the affine box is empty (one of the point being empty, not just of zero size)
454+
455+**function** GetRectBounds: TRect;
456+
457+Gets the bounding rectangle of the affine box as TRect
458+
459+**function** GetRectBoundsF: TRectF;
460+
461+Gets the bounding rectangle of the affine box as TRectF
462+
463+**function** GetSurface: single;
464+
465+Calculates the surface area of the affine box
466+
467+**function** GetWidth: single;
468+
469+Calculates the width of the affine box
470+
471+*TopLeft*,
472+
473+Top-left corner of the affine box
474+
475+*TopRight*,
476+
477+Top-right corner of the affine box
478+
479+*BottomLeft*: TPointF;
480+
481+Bottom-left corner of the affine box
482+
483+**class** **function** EmptyBox: TAffineBox; static;
484+
485+Creates an empty affine box
486+
487+**class** **function** AffineBox(ATopLeft, ATopRight, ABottomLeft: TPointF): TAffineBox; **overload**; static;
488+
489+Creates an affine box defined by three corner points
490+
491+**class** **function** AffineBox(ARectF: TRectF): TAffineBox; **overload**; static;
492+
493+Creates an affine box from a TRectF structure
494+
495+**procedure** Offset(AOfsX, AOfsY: single); **overload**;
496+
497+Offsets the affine box by specified X and Y amounts
498+
499+**procedure** Offset(AOfs: TPointF); **overload**;
500+
501+Offsets the affine box by a specified point
502+
503+**procedure** Inflate(AHoriz, AVert: single);
504+
505+Inflates the affine box along its axes by specified horizontal and vertical amounts
506+
507+**function** Contains(APoint: TPointF): boolean;
508+
509+Checks if a point is contained within the affine box
510+
511+**property** RectBounds: TRect **read** GetRectBounds;
512+
513+Bounding rectangle as TRect
514+
515+**property** RectBoundsF: TRectF **read** GetRectBoundsF;
516+
517+Bounding rectangle as TRectF
518+
519+**property** BottomRight: TPointF **read** GetBottomRight;
520+
521+Bottom-right corner of the affine box
522+
523+**property** IsEmpty: boolean **read** GetIsEmpty;
524+
525+Check if the affine box is empty (containing empty points, not just of zero size)
526+
527+**property** AsPolygon: ArrayOfTPointF **read** GetAsPolygon;
528+
529+Affine box as an array of points (polygon)
530+
531+**property** Width: single **read** GetWidth;
532+
533+Width of the affine box along its axes
534+
535+**property** Height: single **read** GetHeight;
536+
537+Height of the affine box along its axes
538+
539+**property** Surface: single **read** GetSurface;
540+
541+Surface area of the affine box
542+
543+**property** Center: TPointF **read** GetCenter;
544+
545+Center point of the affine box
546+
547+*TRoundRectangleOption* = (
548+
549+Possible options for a round rectangle
550+
551+*rrTopLeftSquare*,*rrTopRightSquare*,*rrBottomRightSquare*,*rrBottomLeftSquare*,
552+
553+specify that a corner is a square (not rounded)
554+
555+*rrTopLeftBevel*,*rrTopRightBevel*,*rrBottomRightBevel*,*rrBottomLeftBevel*,
556+
557+specify that a corner is a bevel (cut)
558+
559+*rrDefault*);
560+
561+default option, does nothing particular
562+
563+*TRoundRectangleOptions* = **set** **of** TRoundRectangleOption;
564+
565+A set of options for a round rectangle
566+
307567#### Paths
308568
309-_TBGRAPenStyle_ = **array** **of** Single;
310----
311-| A pen style can be dashed, dotted, etc. It is defined as a list of floating point number. The first number is the length of the first dash, the second number is the length of the first gap, the third number is the length of the second dash... It must have an even number of values. This is used as a complement TPenStyle.
312-| **function** BGRAPenStyle(dash1, space1: single; dash2: single=0; space2: single = 0; dash3: single=0; space3: single = 0; dash4 : single = 0; space4 : single = 0): TBGRAPenStyle;
313-| | Creates a pen style with the specified length for the dashes and the spaces
314-_TSplineStyle_ = (
315-| Different types of spline. A spline is a series of points that are used as control points to draw a curve. The first point and last point may or may not be the starting and ending point
316-| _ssInside_ ,
317-| | The curve is drawn inside the polygonal envelope without reaching the starting and ending points
318-| _ssInsideWithEnds_ ,
319-| | The curve is drawn inside the polygonal envelope and the starting and ending points are reached
320-| _ssCrossing_ ,
321-| | The curve crosses the polygonal envelope without reaching the starting and ending points
322-| _ssCrossingWithEnds_ ,
323-| | The curve crosses the polygonal envelope and the starting and ending points are reached
324-| _ssOutside_ ,
325-| | The curve is outside the polygonal envelope (starting and ending points are reached)
326-| _ssRoundOutside_ ,
327-| | The curve expands outside the polygonal envelope (starting and ending points are reached)
328-| _ssVertexToSide_ ,
329-| | The curve is outside the polygonal envelope and there is a tangeant at vertices (starting and ending points are reached)
330-| _ssEasyBezier_);
331-| | The curve is rounded using Bezier curves when the angle is less than or equal to 45°
332-_PArcDef_ = ^TArcDef;
333-| Pointer to an arc definition
334-_TArcDef_ = **record**
335-| Definition of an arc of an ellipse
336-| _center_ : TPointF;
337-| | Center of the ellipse
338-| _radius_ : TPointF;
339-| | Horizontal and vertical of the ellipse before rotation
340-| _xAngleRadCW_ : single;
341-| | Rotation of the ellipse
342-| _startAngleRadCW_ , _endAngleRadCW_ : single;
343-| | Start and end angle, in radian and clockwise. See angle convention in BGRAPath
344-| _anticlockwise_ : boolean
345-| | Specifies if the arc goes anticlockwise
346-| **function** ArcDef(cx, cy, rx,ry, xAngleRadCW, startAngleRadCW, endAngleRadCW: single; anticlockwise: boolean) : TArcDef;
347-| | Creates a structure for an arc definition
348-_TArcOption_ = (
349-| Possible options for drawing an arc of an ellipse (used in BGRACanvas)
350-| _aoClosePath_ ,
351-| | Close the path by joining the ending and starting point together
352-| _aoPie_ ,
353-| | Draw a pie shape by joining the ending and starting point to the center of the ellipse
354-| _aoFillPath_);
355-| | Fills the shape
356-| _TArcOptions_ = **set** **of** TArcOption;
357-| | Set of options for drawing an arc
358-_TLineDef_ = **record**
359-| Defition of a line in the euclidian plane
360-| _origin_ : TPointF;
361-| | Some point in the line
362-| _dir_ : TPointF;
363-| | Vector indicating the direction
364-| **function** IntersectLine(line1, line2: TLineDef): TPointF; **overload** ;
365-| | Computes the intersection of two lines. If they are parallel, returns the middle of the segment between the two origins
366-| **function** IntersectLine(line1, line2: TLineDef; **out** parallel: boolean): TPointF; **overload** ;
367-| | Computes the intersection of two lines. If they are parallel, returns the middle of the segment between the two origins. The value _parallel_ is set to indicate if the lines were parallel
368-| **function** IsConvex(**const** pts: **array** **of** TPointF; IgnoreAlign: boolean = true): boolean;
369-| | Checks if the polygon formed by the given points is convex. _IgnoreAlign_ specifies that if the points are aligned, it should still be considered as convex
370-| **function** IsClockwise(**const** pts: **array** **of** TPointF): boolean;
371-| | Checks if the points follow a clockwise curve
372-| **function** IsMostlyClockwise(**const** pts: **array** **of** TPointF): boolean;
373-| | Checks if the curve is clockwise on the whole but accepting some counter-clockwise points
374-| **function** DoesQuadIntersect(pt1,pt2,pt3,pt4: TPointF): boolean;
375-| | Checks if the quad formed by the 4 given points intersects itself
376-| **function** DoesSegmentIntersect(pt1,pt2,pt3,pt4: TPointF): boolean;
377-| | Checks if two segment intersect
378-_TBGRAPathDrawProc_ = **procedure**(**const** APoints: **array** **of** TPointF; AClosed: boolean; AData: Pointer) **of** **object** ;
379-| Callback function when rendering a stroke
380-_TBGRAPathFillProc_ = **procedure**(**const** APoints: **array** **of** TPointF; AData: pointer) **of** **object** ;
381-| Callback function when filling a shape
382-_IBGRAPath_ = **interface**
383-| A path is the ability to define a contour with _moveTo_ , _lineTo_... Even if it is an interface, it must not implement reference counting.
384-| **procedure** closePath;
385-| | Closes the current path with a line to the starting point
386-| **procedure** moveTo(constref pt: TPointF);
387-| | Moves to a location, disconnected from previous points
388-| **procedure** lineTo(constref pt: TPointF);
389-| | Adds a line from the current point
390-| **procedure** polylineTo(**const** pts: **array** **of** TPointF);
391-| | Adds a polyline from the current point
392-| **procedure** quadraticCurveTo(constref cp,pt: TPointF);
393-| | Adds a quadratic Bézier curve from the current point
394-| **procedure** bezierCurveTo(constref cp1,cp2,pt: TPointF);
395-| | Adds a cubic Bézier curve from the current point
396-| **procedure** arc(constref arcDef: TArcDef);
397-| | Adds an arc. If there is a current point, it is connected to the beginning of the arc
398-| **procedure** openedSpline(**const** pts: **array** **of** TPointF; style: TSplineStyle);
399-| | Adds an opened spline. If there is a current point, it is connected to the beginning of the spline
400-| **procedure** closedSpline(**const** pts: **array** **of** TPointF; style: TSplineStyle);
401-| | Adds an closed spline. If there is a current point, it is connected to the beginning of the spline
402-| **procedure** copyTo(dest: IBGRAPath);
403-| | Copy the content of this path to the specified destination
404-| **function** getPoints: ArrayOfTPointF; **overload** ;
405-| | Returns the content of the path as an array of points
406-| **function** getPoints(AMatrix: TAffineMatrix): ArrayOfTPointF; **overload** ;
407-| | Returns the content of the path as an array of points with the transformation specified by _AMatrix_
408-| **procedure** stroke(ADrawProc: TBGRAPathDrawProc; AData: pointer); **overload** ;
409-| | Calls a given draw procedure for each sub path with computed coordinates for rendering
410-| **procedure** stroke(ADrawProc: TBGRAPathDrawProc; **const** AMatrix: TAffineMatrix; AData: pointer); **overload** ;
411-| | Calls a given draw procedure for each sub path with computed coordinates using given _AMatrix_ transformation
412-| **procedure** fill(AFillProc: TBGRAPathFillProc; AData: pointer); **overload** ;
413-| | Calls a given fill procedure for each sub path with computed coordinates for rendering
414-| **procedure** fill(AFillProc: TBGRAPathFillProc; **const** AMatrix: TAffineMatrix; AData: pointer); **overload** ;
415-| | Calls a given fill procedure for each sub path with computed coordinates using given _AMatrix_ transformation
416-| **function** getCursor: TBGRACustomPathCursor;
417-| | Returns a cursor to go through the path. The cursor must be freed by calling _Free_.
418-_TBGRACustomPath_ = **class**(IBGRAPath)
419-| Generic class representing a path, providing methods for creation, exploration and rendering
420-| **constructor** Create; **virtual** ; **abstract** ;
421-| | Constructor to create a custom path. Must be overridden in subclasses
422-| **procedure** beginPath; **virtual** ; **abstract** ;
423-| | Begins a new path
424-| **procedure** closePath; **virtual** ; **abstract** ;
425-| | Closes the current path
426-| **procedure** moveTo(constref pt: TPointF); **virtual** ; **abstract** ;
427-| | Moves the current point to a specified location, starting a new sub-path
428-| **procedure** lineTo(constref pt: TPointF); **virtual** ; **abstract** ;
429-| | Adds a line from the current point to a specified point
430-| **procedure** polylineTo(**const** pts: **array** **of** TPointF); **virtual** ; **abstract** ;
431-| | Adds a series of lines to the path based on an array of points
432-| **procedure** quadraticCurveTo(constref cp, pt: TPointF); **virtual** ; **abstract** ;
433-| | Adds a quadratic Bézier curve to the path
434-| **procedure** bezierCurveTo(constref cp1, cp2, pt: TPointF); **virtual** ; **abstract** ;
435-| | Adds a cubic Bézier curve to the path
436-| **procedure** arc(constref arcDef: TArcDef); **virtual** ; **abstract** ;
437-| | Adds an arc to the path based on an arc definition
438-| **procedure** openedSpline(**const** pts: **array** **of** TPointF; style: TSplineStyle); **virtual** ; **abstract** ;
439-| | Adds an open spline to the path based on a series of points and a spline style
440-| **procedure** closedSpline(**const** pts: **array** **of** TPointF; style: TSplineStyle); **virtual** ; **abstract** ;
441-| | Adds a closed spline to the path based on a series of points and a spline style
442-| **procedure** copyTo(dest: IBGRAPath); **virtual** ; **abstract** ;
443-| | Copies the path to another path object
444-| **function** getPoints: ArrayOfTPointF; **overload** ; **virtual** ; **abstract** ;
445-| | Retrieves the points of the path
446-| **function** getPoints(AMatrix: TAffineMatrix): ArrayOfTPointF; **overload** ; **virtual** ; **abstract** ;
447-| | Retrieves the points of the path, transformed by a specified matrix
448-| **procedure** stroke(ADrawProc: TBGRAPathDrawProc; AData: pointer); **overload** ; **virtual** ; **abstract** ;
449-| | Strokes the path with a specified drawing procedure
450-| **procedure** stroke(ADrawProc: TBGRAPathDrawProc; **const** AMatrix: TAffineMatrix; AData: pointer); **overload** ; **virtual** ; **abstract** ;
451-| | Strokes the path with a specified drawing procedure and transformation matrix
452-| **procedure** fill(AFillProc: TBGRAPathFillProc; AData: pointer); **overload** ; **virtual** ; **abstract** ;
453-| | Fills the path with a specified filling procedure
454-| **procedure** fill(AFillProc: TBGRAPathFillProc; **const** AMatrix: TAffineMatrix; AData: pointer); **overload** ; **virtual** ; **abstract** ;
455-| | Fills the path with a specified filling procedure and transformation matrix
456-| **function** getLength: single; **virtual** ; **abstract** ;
457-| | Retrieves the length of the path
458-| **function** getCursor: TBGRACustomPathCursor; **virtual** ; **abstract** ;
459-| | Retrieves a cursor for navigating the path
460-_TBGRAPathAny_ = **class** **of** TBGRACustomPath;
461-| Type for specifying any derived class of TBGRACustomPath
462-_TBGRACustomPathCursor_ = **class**
463-| Class that contains a cursor to browse an existing path
464-| **function** GetArcPos: single; **virtual** ; **abstract** ;
465-| | Retrieves the current position from the start
466-| **function** GetCurrentCoord: TPointF; **virtual** ; **abstract** ;
467-| | Returns the current coordinate in the path
468-| **function** GetCurrentTangent: TPointF; **virtual** ; **abstract** ;
469-| | Returns the tangent vector to the current position
470-| **function** GetLoopClosedShapes: boolean; **virtual** ; **abstract** ;
471-| | Retrieves if the cursor loops when there is a closed shape
472-| **function** GetLoopPath: boolean; **virtual** ; **abstract** ;
473-| | Retrieves if the cursor loops at the end of the whole path
474-| **function** GetPathLength: single; **virtual** ; **abstract** ;
475-| | Retreive the full arc length of the path
476-| **function** GetBounds: TRectF; **virtual** ; **abstract** ;
477-| | Compute the bounds of the path
478-| **function** GetStartCoordinate: TPointF; **virtual** ; **abstract** ;
479-| | Starting coordinate of the path
480-| **procedure** SetArcPos(AValue: single); **virtual** ; **abstract** ;
481-| | Sets the current position from the start
482-| **procedure** SetLoopClosedShapes(AValue: boolean); **virtual** ; **abstract** ;
483-| | Sets if the cursor loops when there is a closed shape
484-| **procedure** SetLoopPath(AValue: boolean); **virtual** ; **abstract** ;
485-| | Sets if the cursor loops at the end of the whole path
486-| **function** MoveForward(ADistance: single; ACanJump: boolean = true): single; **virtual** ; **abstract** ;
487-| | Go forward in the path, increasing the value of _Position_. If _ADistance_ is negative, then it goes backward instead. _ACanJump_ specifies if the cursor can jump from one shape to another without a line or an arc. Otherwise, the cursor is stuck, and the return value is less than the value _ADistance_ provided. If all the way has been travelled, the return value is equal to _ADistance_
488-| **function** MoveBackward(ADistance: single; ACanJump: boolean = true): single; **virtual** ; **abstract** ;
489-| | Go backward, decreasing the value of _Position_. If _ADistance_ is negative, then it goes forward instead. _ACanJump_ specifies if the cursor can jump from one shape to another without a line or an arc. Otherwise, the cursor is stuck, and the return value is less than the value _ADistance_ provided. If all the way has been travelled, the return value is equal to _ADistance_
490-| **property** CurrentCoordinate: TPointF **read** GetCurrentCoord;
491-| | Returns the current coordinate in the path
492-| **property** CurrentTangent: TPointF **read** GetCurrentTangent;
493-| | Returns the tangent vector. It is a vector of length one that is parallel to the curve at the current point. A normal vector is easily deduced as PointF(y,-x)
494-| **property** Position: single **read** GetArcPos **write** SetArcPos;
495-| | Current position in the path, as a distance along the arc from the starting point of the path
496-| **property** PathLength: single **read** GetPathLength;
497-| | Full arc length of the path
498-| **property** StartCoordinate: TPointF **read** GetStartCoordinate;
499-| | Starting coordinate of the path
500-| **property** LoopClosedShapes: boolean **read** GetLoopClosedShapes **write** SetLoopClosedShapes;
501-| | Specifies if the cursor loops when there is a closed shape
502-| **property** LoopPath: boolean **read** GetLoopPath **write** SetLoopPath;
503-| | Specifies if the cursor loops at the end of the path. Note that if it needs to jump to go to the beginning, it will be only possible if the parameter _ACanJump_ is set to True when moving along the path
504-_BGRAPathFactory_ : TBGRAPathAny;
505-| Factory provided to create a TBGRAPath object
506-
569+*TBGRAPenStyle* = **array** **of** Single;
570+
571+A pen style can be dashed, dotted, etc. It is defined as a list of floating point number. The first number is the length of the first dash, the second number is the length of the first gap, the third number is the length of the second dash... It must have an even number of values. This is used as a complement TPenStyle.
572+
573+**function** BGRAPenStyle(dash1, space1: single; dash2: single=0; space2: single = 0; dash3: single=0; space3: single = 0; dash4 : single = 0; space4 : single = 0): TBGRAPenStyle;
574+
575+Creates a pen style with the specified length for the dashes and the spaces
576+
577+*TSplineStyle* = (
578+
579+Different types of spline. A spline is a series of points that are used as control points to draw a curve. The first point and last point may or may not be the starting and ending point
580+
581+*ssInside*,
582+
583+The curve is drawn inside the polygonal envelope without reaching the starting and ending points
584+
585+*ssInsideWithEnds*,
586+
587+The curve is drawn inside the polygonal envelope and the starting and ending points are reached
588+
589+*ssCrossing*,
590+
591+The curve crosses the polygonal envelope without reaching the starting and ending points
592+
593+*ssCrossingWithEnds*,
594+
595+The curve crosses the polygonal envelope and the starting and ending points are reached
596+
597+*ssOutside*,
598+
599+The curve is outside the polygonal envelope (starting and ending points are reached)
600+
601+*ssRoundOutside*,
602+
603+The curve expands outside the polygonal envelope (starting and ending points are reached)
604+
605+*ssVertexToSide*,
606+
607+The curve is outside the polygonal envelope and there is a tangeant at vertices (starting and ending points are reached)
608+
609+*ssEasyBezier*);
610+
611+The curve is rounded using Bezier curves when the angle is less than or equal to 45°
612+
613+*PArcDef* = ^TArcDef;
614+
615+Pointer to an arc definition
616+
617+*TArcDef* = **record**
618+
619+Definition of an arc of an ellipse
620+
621+*center*: TPointF;
622+
623+Center of the ellipse
624+
625+*radius*: TPointF;
626+
627+Horizontal and vertical of the ellipse before rotation
628+
629+*xAngleRadCW*: single;
630+
631+Rotation of the ellipse
632+
633+*startAngleRadCW*, *endAngleRadCW*: single;
634+
635+Start and end angle, in radian and clockwise. See angle convention in BGRAPath
636+
637+*anticlockwise*: boolean
638+
639+Specifies if the arc goes anticlockwise
640+
641+**function** ArcDef(cx, cy, rx,ry, xAngleRadCW, startAngleRadCW, endAngleRadCW: single; anticlockwise: boolean) : TArcDef;
642+
643+Creates a structure for an arc definition
644+
645+*TArcOption* = (
646+
647+Possible options for drawing an arc of an ellipse (used in BGRACanvas)
648+
649+*aoClosePath*,
650+
651+Close the path by joining the ending and starting point together
652+
653+*aoPie*,
654+
655+Draw a pie shape by joining the ending and starting point to the center of the ellipse
656+
657+*aoFillPath*);
658+
659+Fills the shape
660+
661+*TArcOptions* = **set** **of** TArcOption;
662+
663+Set of options for drawing an arc
664+
665+*TLineDef* = **record**
666+
667+Defition of a line in the euclidian plane
668+
669+*origin*: TPointF;
670+
671+Some point in the line
672+
673+*dir*: TPointF;
674+
675+Vector indicating the direction
676+
677+**function** IntersectLine(line1, line2: TLineDef): TPointF; **overload**;
678+
679+Computes the intersection of two lines. If they are parallel, returns the middle of the segment between the two origins
680+
681+**function** IntersectLine(line1, line2: TLineDef; **out** parallel: boolean): TPointF; **overload**;
682+
683+Computes the intersection of two lines. If they are parallel, returns the middle of the segment between the two origins. The value *parallel* is set to indicate if the lines were parallel
684+
685+**function** IsConvex(**const** pts: **array** **of** TPointF; IgnoreAlign: boolean = true): boolean;
686+
687+Checks if the polygon formed by the given points is convex. *IgnoreAlign* specifies that if the points are aligned, it should still be considered as convex
688+
689+**function** IsClockwise(**const** pts: **array** **of** TPointF): boolean;
690+
691+Checks if the points follow a clockwise curve
692+
693+**function** IsMostlyClockwise(**const** pts: **array** **of** TPointF): boolean;
694+
695+Checks if the curve is clockwise on the whole but accepting some counter-clockwise points
696+
697+**function** DoesQuadIntersect(pt1,pt2,pt3,pt4: TPointF): boolean;
698+
699+Checks if the quad formed by the 4 given points intersects itself
700+
701+**function** DoesSegmentIntersect(pt1,pt2,pt3,pt4: TPointF): boolean;
702+
703+Checks if two segment intersect
704+
705+*TBGRAPathDrawProc* = **procedure**(**const** APoints: **array** **of** TPointF; AClosed: boolean; AData: Pointer) **of** **object**;
706+
707+Callback function when rendering a stroke
708+
709+*TBGRAPathFillProc* = **procedure**(**const** APoints: **array** **of** TPointF; AData: pointer) **of** **object**;
710+
711+Callback function when filling a shape
712+
713+*IBGRAPath* = **interface**
714+
715+A path is the ability to define a contour with *moveTo*, *lineTo*... Even if it is an interface, it must not implement reference counting.
716+
717+**procedure** closePath;
718+
719+Closes the current path with a line to the starting point
720+
721+**procedure** moveTo(constref pt: TPointF);
722+
723+Moves to a location, disconnected from previous points
724+
725+**procedure** lineTo(constref pt: TPointF);
726+
727+Adds a line from the current point
728+
729+**procedure** polylineTo(**const** pts: **array** **of** TPointF);
730+
731+Adds a polyline from the current point
732+
733+**procedure** quadraticCurveTo(constref cp,pt: TPointF);
734+
735+Adds a quadratic Bézier curve from the current point
736+
737+**procedure** bezierCurveTo(constref cp1,cp2,pt: TPointF);
738+
739+Adds a cubic Bézier curve from the current point
740+
741+**procedure** arc(constref arcDef: TArcDef);
742+
743+Adds an arc. If there is a current point, it is connected to the beginning of the arc
744+
745+**procedure** openedSpline(**const** pts: **array** **of** TPointF; style: TSplineStyle);
746+
747+Adds an opened spline. If there is a current point, it is connected to the beginning of the spline
748+
749+**procedure** closedSpline(**const** pts: **array** **of** TPointF; style: TSplineStyle);
750+
751+Adds an closed spline. If there is a current point, it is connected to the beginning of the spline
752+
753+**procedure** copyTo(dest: IBGRAPath);
754+
755+Copy the content of this path to the specified destination
756+
757+**function** getPoints: ArrayOfTPointF; **overload**;
758+
759+Returns the content of the path as an array of points
760+
761+**function** getPoints(AMatrix: TAffineMatrix): ArrayOfTPointF; **overload**;
762+
763+Returns the content of the path as an array of points with the transformation specified by *AMatrix*
764+
765+**procedure** stroke(ADrawProc: TBGRAPathDrawProc; AData: pointer); **overload**;
766+
767+Calls a given draw procedure for each sub path with computed coordinates for rendering
768+
769+**procedure** stroke(ADrawProc: TBGRAPathDrawProc; **const** AMatrix: TAffineMatrix; AData: pointer); **overload**;
770+
771+Calls a given draw procedure for each sub path with computed coordinates using given *AMatrix* transformation
772+
773+**procedure** fill(AFillProc: TBGRAPathFillProc; AData: pointer); **overload**;
774+
775+Calls a given fill procedure for each sub path with computed coordinates for rendering
776+
777+**procedure** fill(AFillProc: TBGRAPathFillProc; **const** AMatrix: TAffineMatrix; AData: pointer); **overload**;
778+
779+Calls a given fill procedure for each sub path with computed coordinates using given *AMatrix* transformation
780+
781+**function** getCursor: TBGRACustomPathCursor;
782+
783+Returns a cursor to go through the path. The cursor must be freed by calling *Free*.
784+
785+*TBGRACustomPath* = **class**(IBGRAPath)
786+
787+Generic class representing a path, providing methods for creation, exploration and rendering
788+
789+**constructor** Create; **virtual**; **abstract**;
790+
791+Constructor to create a custom path. Must be overridden in subclasses
792+
793+**procedure** beginPath; **virtual**; **abstract**;
794+
795+Begins a new path
796+
797+**procedure** closePath; **virtual**; **abstract**;
798+
799+Closes the current path
800+
801+**procedure** moveTo(constref pt: TPointF); **virtual**; **abstract**;
802+
803+Moves the current point to a specified location, starting a new sub-path
804+
805+**procedure** lineTo(constref pt: TPointF); **virtual**; **abstract**;
806+
807+Adds a line from the current point to a specified point
808+
809+**procedure** polylineTo(**const** pts: **array** **of** TPointF); **virtual**; **abstract**;
810+
811+Adds a series of lines to the path based on an array of points
812+
813+**procedure** quadraticCurveTo(constref cp, pt: TPointF); **virtual**; **abstract**;
814+
815+Adds a quadratic Bézier curve to the path
816+
817+**procedure** bezierCurveTo(constref cp1, cp2, pt: TPointF); **virtual**; **abstract**;
818+
819+Adds a cubic Bézier curve to the path
820+
821+**procedure** arc(constref arcDef: TArcDef); **virtual**; **abstract**;
822+
823+Adds an arc to the path based on an arc definition
824+
825+**procedure** openedSpline(**const** pts: **array** **of** TPointF; style: TSplineStyle); **virtual**; **abstract**;
826+
827+Adds an open spline to the path based on a series of points and a spline style
828+
829+**procedure** closedSpline(**const** pts: **array** **of** TPointF; style: TSplineStyle); **virtual**; **abstract**;
830+
831+Adds a closed spline to the path based on a series of points and a spline style
832+
833+**procedure** copyTo(dest: IBGRAPath); **virtual**; **abstract**;
834+
835+Copies the path to another path object
836+
837+**function** getPoints: ArrayOfTPointF; **overload**; **virtual**; **abstract**;
838+
839+Retrieves the points of the path
840+
841+**function** getPoints(AMatrix: TAffineMatrix): ArrayOfTPointF; **overload**; **virtual**; **abstract**;
842+
843+Retrieves the points of the path, transformed by a specified matrix
844+
845+**procedure** stroke(ADrawProc: TBGRAPathDrawProc; AData: pointer); **overload**; **virtual**; **abstract**;
846+
847+Strokes the path with a specified drawing procedure
848+
849+**procedure** stroke(ADrawProc: TBGRAPathDrawProc; **const** AMatrix: TAffineMatrix; AData: pointer); **overload**; **virtual**; **abstract**;
850+
851+Strokes the path with a specified drawing procedure and transformation matrix
852+
853+**procedure** fill(AFillProc: TBGRAPathFillProc; AData: pointer); **overload**; **virtual**; **abstract**;
854+
855+Fills the path with a specified filling procedure
856+
857+**procedure** fill(AFillProc: TBGRAPathFillProc; **const** AMatrix: TAffineMatrix; AData: pointer); **overload**; **virtual**; **abstract**;
858+
859+Fills the path with a specified filling procedure and transformation matrix
860+
861+**function** getLength: single; **virtual**; **abstract**;
862+
863+Retrieves the length of the path
864+
865+**function** getCursor: TBGRACustomPathCursor; **virtual**; **abstract**;
866+
867+Retrieves a cursor for navigating the path
868+
869+*TBGRAPathAny* = **class** **of** TBGRACustomPath;
870+
871+Type for specifying any derived class of TBGRACustomPath
872+
873+*TBGRACustomPathCursor* = **class**
874+
875+Class that contains a cursor to browse an existing path
876+
877+**function** GetArcPos: single; **virtual**; **abstract**;
878+
879+Retrieves the current position from the start
880+
881+**function** GetCurrentCoord: TPointF; **virtual**; **abstract**;
882+
883+Returns the current coordinate in the path
884+
885+**function** GetCurrentTangent: TPointF; **virtual**; **abstract**;
886+
887+Returns the tangent vector to the current position
888+
889+**function** GetLoopClosedShapes: boolean; **virtual**; **abstract**;
890+
891+Retrieves if the cursor loops when there is a closed shape
892+
893+**function** GetLoopPath: boolean; **virtual**; **abstract**;
894+
895+Retrieves if the cursor loops at the end of the whole path
896+
897+**function** GetPathLength: single; **virtual**; **abstract**;
898+
899+Retreive the full arc length of the path
900+
901+**function** GetBounds: TRectF; **virtual**; **abstract**;
902+
903+Compute the bounds of the path
904+
905+**function** GetStartCoordinate: TPointF; **virtual**; **abstract**;
906+
907+Starting coordinate of the path
908+
909+**procedure** SetArcPos(AValue: single); **virtual**; **abstract**;
910+
911+Sets the current position from the start
912+
913+**procedure** SetLoopClosedShapes(AValue: boolean); **virtual**; **abstract**;
914+
915+Sets if the cursor loops when there is a closed shape
916+
917+**procedure** SetLoopPath(AValue: boolean); **virtual**; **abstract**;
918+
919+Sets if the cursor loops at the end of the whole path
920+
921+**function** MoveForward(ADistance: single; ACanJump: boolean = true): single; **virtual**; **abstract**;
922+
923+Go forward in the path, increasing the value of *Position*. If *ADistance* is negative, then it goes backward instead. *ACanJump* specifies if the cursor can jump from one shape to another without a line or an arc. Otherwise, the cursor is stuck, and the return value is less than the value *ADistance* provided. If all the way has been travelled, the return value is equal to *ADistance*
924+
925+**function** MoveBackward(ADistance: single; ACanJump: boolean = true): single; **virtual**; **abstract**;
926+
927+Go backward, decreasing the value of *Position*. If *ADistance* is negative, then it goes forward instead. *ACanJump* specifies if the cursor can jump from one shape to another without a line or an arc. Otherwise, the cursor is stuck, and the return value is less than the value *ADistance* provided. If all the way has been travelled, the return value is equal to *ADistance*
928+
929+**property** CurrentCoordinate: TPointF **read** GetCurrentCoord;
930+
931+Returns the current coordinate in the path
932+
933+**property** CurrentTangent: TPointF **read** GetCurrentTangent;
934+
935+Returns the tangent vector. It is a vector of length one that is parallel to the curve at the current point. A normal vector is easily deduced as PointF(y,-x)
936+
937+**property** Position: single **read** GetArcPos **write** SetArcPos;
938+
939+Current position in the path, as a distance along the arc from the starting point of the path
940+
941+**property** PathLength: single **read** GetPathLength;
942+
943+Full arc length of the path
944+
945+**property** StartCoordinate: TPointF **read** GetStartCoordinate;
946+
947+Starting coordinate of the path
948+
949+**property** LoopClosedShapes: boolean **read** GetLoopClosedShapes **write** SetLoopClosedShapes;
950+
951+Specifies if the cursor loops when there is a closed shape
952+
953+**property** LoopPath: boolean **read** GetLoopPath **write** SetLoopPath;
954+
955+Specifies if the cursor loops at the end of the path. Note that if it needs to jump to go to the beginning, it will be only possible if the parameter *ACanJump* is set to True when moving along the path
956+
957+*BGRAPathFactory*: TBGRAPathAny;
958+
959+Factory provided to create a TBGRAPath object
960+
507961#### Polygon filling
508962
509-_TPolygonOrder_ = (
510----
511-| Order of polygons when rendered using TBGRAMultiShapeFiller (in unit BGRAPolygon)
512-| _poNone_ ,
513-| | No order, colors are mixed together
514-| _poFirstOnTop_ ,
515-| | First polygon is on top
516-| _poLastOnTop_);
517-| | Last polygon is on top
518-_TIntersectionInfo_ = **class**
519-| Contains an intersection between an horizontal line and any shape. It is used when filling shapes
520-| _interX_ : single;
521-| | Horizontal position of the intersection
522-| _winding_ : integer;
523-| | Winding count
524-| _numSegment_ : integer;
525-| | Number identifying the current segment where the intersection was found
526-| **procedure** SetValues(AInterX: Single; AWinding, ANumSegment: integer);
527-| | Sets the position and other information about the intersection
528-| _ArrayOfTIntersectionInfo_ = **array** **of** TIntersectionInfo;
529-| | An array of intersections between an horizontal line and any shape
530-_TBGRACustomFillInfo_ = **class**
531-| Abstract class defining any shape that can be filled
532-| **function** SegmentsCurved: boolean; **virtual** ; **abstract** ;
533-| | Returns true if one segment number can represent a curve and thus cannot be considered exactly straight
534-| **function** GetBounds: TRect; **virtual** ; **abstract** ;
535-| | Returns integer bounds for the shape
536-| **function** IsPointInside(x,y: single; windingMode: boolean): boolean; **virtual** ; **abstract** ;
537-| | Check if the point is inside the shape
538-| **function** CreateIntersectionArray: ArrayOfTIntersectionInfo; **virtual** ; **abstract** ;
539-| | Create an array that will contain computed intersections. To augment that array, use CreateIntersectionInfo for new items
540-| **function** CreateIntersectionInfo: TIntersectionInfo; **virtual** ; **abstract** ;
541-| | Create a structure to define one single intersection
542-| **procedure** FreeIntersectionArray(**var** inter: ArrayOfTIntersectionInfo); **virtual** ; **abstract** ;
543-| | Free an array of intersections
544-| **procedure** ComputeAndSort(cury: single; **var** inter: ArrayOfTIntersectionInfo; **out** nbInter: integer; windingMode: boolean); **virtual** ; **abstract** ;
545-| | Fill an array _inter_ with actual intersections with the shape at the y coordinate _cury_. _nbInter_ receives the number of computed intersections. _windingMode_ specifies if the winding method must be used to determine what is inside of the shape
546-| **function** GetSliceIndex: integer; **virtual** ; **abstract** ;
547-| | Returns the index of the current slice (horizontal stripe)
548-
963+*TPolygonOrder* = (
964+
965+Order of polygons when rendered using TBGRAMultiShapeFiller (in unit BGRAPolygon)
966+
967+*poNone*,
968+
969+No order, colors are mixed together
970+
971+*poFirstOnTop*,
972+
973+First polygon is on top
974+
975+*poLastOnTop*);
976+
977+Last polygon is on top
978+
979+*TIntersectionInfo* = **class**
980+
981+Contains an intersection between an horizontal line and any shape. It is used when filling shapes
982+
983+*interX*: single;
984+
985+Horizontal position of the intersection
986+
987+*winding*: integer;
988+
989+Winding count
990+
991+*numSegment*: integer;
992+
993+Number identifying the current segment where the intersection was found
994+
995+**procedure** SetValues(AInterX: Single; AWinding, ANumSegment: integer);
996+
997+Sets the position and other information about the intersection
998+
999+*ArrayOfTIntersectionInfo* = **array** **of** TIntersectionInfo;
1000+
1001+An array of intersections between an horizontal line and any shape
1002+
1003+*TBGRACustomFillInfo* = **class**
1004+
1005+Abstract class defining any shape that can be filled
1006+
1007+**function** SegmentsCurved: boolean; **virtual**; **abstract**;
1008+
1009+Returns true if one segment number can represent a curve and thus cannot be considered exactly straight
1010+
1011+**function** GetBounds: TRect; **virtual**; **abstract**;
1012+
1013+Returns integer bounds for the shape
1014+
1015+**function** IsPointInside(x,y: single; windingMode: boolean): boolean; **virtual**; **abstract**;
1016+
1017+Check if the point is inside the shape
1018+
1019+**function** CreateIntersectionArray: ArrayOfTIntersectionInfo; **virtual**; **abstract**;
1020+
1021+Create an array that will contain computed intersections. To augment that array, use CreateIntersectionInfo for new items
1022+
1023+**function** CreateIntersectionInfo: TIntersectionInfo; **virtual**; **abstract**;
1024+
1025+Create a structure to define one single intersection
1026+
1027+**procedure** FreeIntersectionArray(**var** inter: ArrayOfTIntersectionInfo); **virtual**; **abstract**;
1028+
1029+Free an array of intersections
1030+
1031+**procedure** ComputeAndSort(cury: single; **var** inter: ArrayOfTIntersectionInfo; **out** nbInter: integer; windingMode: boolean); **virtual**; **abstract**;
1032+
1033+Fill an array *inter* with actual intersections with the shape at the y coordinate *cury*. *nbInter* receives the number of computed intersections. *windingMode* specifies if the winding method must be used to determine what is inside of the shape
1034+
1035+**function** GetSliceIndex: integer; **virtual**; **abstract**;
1036+
1037+Returns the index of the current slice (horizontal stripe)
1038+
5491039#### Arrows
5501040
551-_TBGRAArrowStyle_ = (
552----
553-| Enumerates different styles of arrows that can be used in graphic rendering. Each style represents a unique visual appearance for arrowheads or tails
554-| _asNone_ ,
555-| | No arrow style. This option indicates that no arrowhead or tail is to be rendered
556-| _asNormal_ ,
557-| | A normal arrow style, representing a standard arrowhead with an angle
558-| _asCut_ ,
559-| | A cut arrow style, where the edge of the arrow are cut instead of using the pen end cap
560-| _asTriangle_ ,
561-| | A triangle arrow style, forming a simple triangular arrowhead
562-| _asHollowTriangle_ ,
563-| | A hollow triangle arrow style, similar to _asTriangle_ but with an unfilled center
564-| _asFlipped_ ,
565-| | A flipped arrow style, where the arrowhead points in the opposite direction to the normal style
566-| _asFlippedCut_ ,
567-| | A flipped cut arrow style, combining the aspects of _asFlipped_ and _asCut_
568-| _asTail_ ,
569-| | A small tail, typically used to depict the starting point of an arrow
570-| _asTailRepeat_);
571-| | A tail repeat arrow style, depicting a series of repeated patterns typically used for the starting point of an arrow
572-_TBGRACustomArrow_ = **class**
573-| Generic class configuring and rendering an arrow
574-| **function** GetEndOffsetX: single; **virtual** ; **abstract** ;
575-| | Retrieves the X-offset for the end of the arrow
576-| **function** GetEndRepeatCount: integer; **virtual** ; **abstract** ;
577-| | Retrieves the repeat count for the end symbol
578-| **function** GetEndSizeFactor: TPointF; **virtual** ; **abstract** ;
579-| | Retrieves the size factor for the end of the arrow
580-| **function** GetIsEndDefined: boolean; **virtual** ; **abstract** ;
581-| | Determines if the end of the arrow is defined
582-| **function** GetIsStartDefined: boolean; **virtual** ; **abstract** ;
583-| | Determines if the start of the arrow is defined
584-| **function** GetStartOffsetX: single; **virtual** ; **abstract** ;
585-| | Retrieves the X-offset for the start of the arrow
586-| **function** GetStartRepeatCount: integer; **virtual** ; **abstract** ;
587-| | Retrieves the repeat count for the start symbol
588-| **function** GetStartSizeFactor: TPointF; **virtual** ; **abstract** ;
589-| | Retrieves the size factor for the start of the arrow
590-| **procedure** SetEndOffsetX(AValue: single); **virtual** ; **abstract** ;
591-| | Sets the X-offset for the end of the arrow
592-| **procedure** SetEndRepeatCount(AValue: integer); **virtual** ; **abstract** ;
593-| | Sets the repeat count for the end symbol
594-| **procedure** SetEndSizeFactor(AValue: TPointF); **virtual** ; **abstract** ;
595-| | Sets the size factor for the end of the arrow
596-| **procedure** SetStartOffsetX(AValue: single); **virtual** ; **abstract** ;
597-| | Sets the X-offset for the start of the arrow
598-| **procedure** SetStartRepeatCount(AValue: integer); **virtual** ; **abstract** ;
599-| | Sets the repeat count for the start symbol
600-| **procedure** SetStartSizeFactor(AValue: TPointF); **virtual** ; **abstract** ;
601-| | Sets the size factor for the start of the arrow
602-| **function** GetLineCap: TPenEndCap; **virtual** ; **abstract** ;
603-| | Retrieves the line cap style for the classic arrow
604-| **procedure** SetLineCap(AValue: TPenEndCap); **virtual** ; **abstract** ;
605-| | Sets the line cap style for the classic arrow
606-| **function** ComputeStartAt(**const** APosition, ADirection: TPointF; **const** AWidth, ACurrentPos: single): ArrayOfTPointF; **virtual** ; **abstract** ;
607-| | Computes the start of the arrow at a given position and direction
608-| **function** ComputeEndAt(**const** APosition, ADirection: TPointF; **const** AWidth, ACurrentPos: single): ArrayOfTPointF; **virtual** ; **abstract** ;
609-| | Computes the end of the arrow at a given position and direction
610-| **procedure** StartAsNone; **virtual** ; **abstract** ;
611-| | Sets the start of the arrow to no style
612-| **procedure** StartAsClassic(AFlipped: boolean = false; ACut: boolean = false; ARelativePenWidth: single = 1); **virtual** ; **abstract** ;
613-| | Sets the start of the arrow to a classic style
614-| **procedure** StartAsTriangle(ABackOffset: single = 0; ARounded: boolean = false; AHollow: boolean = false; AHollowPenWidth: single = 0.5); **virtual** ; **abstract** ;
615-| | Sets the start of the arrow to a triangle style
616-| **procedure** StartAsTail; **virtual** ; **abstract** ;
617-| | Sets the start of the arrow to a tail style
618-| **procedure** EndAsNone; **virtual** ; **abstract** ;
619-| | Sets the end of the arrow to no style
620-| **procedure** EndAsClassic(AFlipped: boolean = false; ACut: boolean = false; ARelativePenWidth: single = 1); **virtual** ; **abstract** ;
621-| | Sets the end of the arrow to a classic style
622-| **procedure** EndAsTriangle(ABackOffset: single = 0; ARounded: boolean = false; AHollow: boolean = false; AHollowPenWidth: single = 0.5); **virtual** ; **abstract** ;
623-| | Sets the end of the arrow to a triangle style
624-| **procedure** EndAsTail; **virtual** ; **abstract** ;
625-| | Sets the end of the arrow to a tail style
626-| **property** IsStartDefined: boolean **read** GetIsStartDefined;
627-| | Check if the start of the arrow is defined
628-| **property** IsEndDefined: boolean **read** GetIsEndDefined;
629-| | Check if the end of the arrow is defined
630-| **property** StartOffsetX: single **read** GetStartOffsetX **write** SetStartOffsetX;
631-| | X-offset for the start of the arrow
632-| **property** EndOffsetX: single **read** GetEndOffsetX **write** SetEndOffsetX;
633-| | X-offset for the end of the arrow
634-| **property** LineCap: TPenEndCap **read** GetLineCap **write** SetLineCap;
635-| | Line cap style
636-| **property** StartSize: TPointF **read** GetStartSizeFactor **write** SetStartSizeFactor;
637-| | Size factor for the start of the arrow
638-| **property** EndSize: TPointF **read** GetEndSizeFactor **write** SetEndSizeFactor;
639-| | Size factor for the end of the arrow
640-| **property** StartRepeatCount: integer **read** GetStartRepeatCount **write** SetStartRepeatCount;
641-| | Repeat count for the start symbol
642-| **property** EndRepeatCount: integer **read** GetEndRepeatCount **write** SetEndRepeatCount;
643-| | Repeat count for the end symbol
644-_TBGRACustomPenStroker_ = **class**
645-| Generic class representing a pen stroker, used for drawing and styling lines with various attributes
646-| **function** GetArrow: TBGRACustomArrow; **virtual** ; **abstract** ;
647-| | Retrieves the arrow style used at both ends of strokes
648-| **function** GetArrowOwned: boolean; **virtual** ; **abstract** ;
649-| | Determines if the arrow is owned (managed) by the pen stroker
650-| **function** GetCustomPenStyle: TBGRAPenStyle; **virtual** ; **abstract** ;
651-| | Gets the custom pen style
652-| **function** GetJoinStyle: TPenJoinStyle; **virtual** ; **abstract** ;
653-| | Retrieves the style of line joins (e.g., bevel, miter)
654-| **function** GetLineCap: TPenEndCap; **virtual** ; **abstract** ;
655-| | Retrieves the line cap style (e.g., butt, round)
656-| **function** GetMiterLimit: single; **virtual** ; **abstract** ;
657-| | Gets the miter limit for line joins
658-| **function** GetPenStyle: TPenStyle; **virtual** ; **abstract** ;
659-| | Retrieves the standard pen style
660-| **function** GetStrokeMatrix: TAffineMatrix; **virtual** ; **abstract** ;
661-| | Gets the stroke transformation matrix (applied only to stroke and not to path points)
662-| **procedure** SetArrow(AValue: TBGRACustomArrow); **virtual** ; **abstract** ;
663-| | Sets the arrow style used at both ends of strokes
664-| **procedure** SetArrowOwned(AValue: boolean); **virtual** ; **abstract** ;
665-| | Sets whether the arrow is owned by the pen stroker
666-| **procedure** SetCustomPenStyle(AValue: TBGRAPenStyle); **virtual** ; **abstract** ;
667-| | Sets the custom pen style
668-| **procedure** SetJoinStyle(AValue: TPenJoinStyle); **virtual** ; **abstract** ;
669-| | Sets the style of line joins
670-| **procedure** SetLineCap(AValue: TPenEndCap); **virtual** ; **abstract** ;
671-| | Sets the line cap style
672-| **procedure** SetMiterLimit(AValue: single); **virtual** ; **abstract** ;
673-| | Sets the miter limit for line joins
674-| **procedure** SetPenStyle(AValue: TPenStyle); **virtual** ; **abstract** ;
675-| | Sets the standard pen style
676-| **procedure** SetStrokeMatrix(**const** AValue: TAffineMatrix); **virtual** ; **abstract** ;
677-| | Sets the stroke transformation matrix (applied only to stroke and not to path points)
678-| **function** ComputePolyline(**const** APoints: **array** **of** TPointF; AWidth: single; AClosedCap: boolean = true): ArrayOfTPointF; **overload** ; **virtual** ; **abstract** ;
679-| | Computes a polyline with the given points and width, optionally closing the cap
680-| **function** ComputePolyline(**const** APoints: **array** **of** TPointF; AWidth: single; APenColor: TBGRAPixel; AClosedCap: boolean = true): ArrayOfTPointF; **overload** ; **virtual** ; **abstract** ;
681-| | Computes a polyline with the given points, width, and pen color, optionally closing the cap
682-| **function** ComputePolylineAutoCycle(**const** APoints: **array** **of** TPointF; AWidth: single): ArrayOfTPointF; **virtual** ; **abstract** ;
683-| | Computes a polyline with automatic cycling of points and given width
684-| **function** ComputePolygon(**const** APoints: **array** **of** TPointF; AWidth: single): ArrayOfTPointF; **virtual** ; **abstract** ;
685-| | Computes a polygon with the given points and width
686-| **property** Style: TPenStyle **read** GetPenStyle **write** SetPenStyle;
687-| | Standard pen style
688-| **property** CustomPenStyle: TBGRAPenStyle **read** GetCustomPenStyle **write** SetCustomPenStyle;
689-| | Custom pen style (with given dash and gap lengths)
690-| **property** Arrow: TBGRACustomArrow **read** GetArrow **write** SetArrow;
691-| | Arrow style at both ends of strokes
692-| **property** ArrowOwned: boolean **read** GetArrowOwned **write** SetArrowOwned;
693-| | Is the arrow is owned by the pen stroker
694-| **property** StrokeMatrix: TAffineMatrix **read** GetStrokeMatrix **write** SetStrokeMatrix;
695-| | Stroke transformation matrix (applied only to stroke and not to path points)
696-| **property** LineCap: TPenEndCap **read** GetLineCap **write** SetLineCap;
697-| | Line cap style
698-| **property** JoinStyle: TPenJoinStyle **read** GetJoinStyle **write** SetJoinStyle;
699-| | Join style of lines
700-| **property** MiterLimit: single **read** GetMiterLimit **write** SetMiterLimit;
701-| | Miter limit for line joins
702-
1041+*TBGRAArrowStyle* = (
1042+
1043+Enumerates different styles of arrows that can be used in graphic rendering. Each style represents a unique visual appearance for arrowheads or tails
1044+
1045+*asNone*,
1046+
1047+No arrow style. This option indicates that no arrowhead or tail is to be rendered
1048+
1049+*asNormal*,
1050+
1051+A normal arrow style, representing a standard arrowhead with an angle
1052+
1053+*asCut*,
1054+
1055+A cut arrow style, where the edge of the arrow are cut instead of using the pen end cap
1056+
1057+*asTriangle*,
1058+
1059+A triangle arrow style, forming a simple triangular arrowhead
1060+
1061+*asHollowTriangle*,
1062+
1063+A hollow triangle arrow style, similar to *asTriangle* but with an unfilled center
1064+
1065+*asFlipped*,
1066+
1067+A flipped arrow style, where the arrowhead points in the opposite direction to the normal style
1068+
1069+*asFlippedCut*,
1070+
1071+A flipped cut arrow style, combining the aspects of *asFlipped* and *asCut*
1072+
1073+*asTail*,
1074+
1075+A small tail, typically used to depict the starting point of an arrow
1076+
1077+*asTailRepeat*);
1078+
1079+A tail repeat arrow style, depicting a series of repeated patterns typically used for the starting point of an arrow
1080+
1081+*TBGRACustomArrow* = **class**
1082+
1083+Generic class configuring and rendering an arrow
1084+
1085+**function** GetEndOffsetX: single; **virtual**; **abstract**;
1086+
1087+Retrieves the X-offset for the end of the arrow
1088+
1089+**function** GetEndRepeatCount: integer; **virtual**; **abstract**;
1090+
1091+Retrieves the repeat count for the end symbol
1092+
1093+**function** GetEndSizeFactor: TPointF; **virtual**; **abstract**;
1094+
1095+Retrieves the size factor for the end of the arrow
1096+
1097+**function** GetIsEndDefined: boolean; **virtual**; **abstract**;
1098+
1099+Determines if the end of the arrow is defined
1100+
1101+**function** GetIsStartDefined: boolean; **virtual**; **abstract**;
1102+
1103+Determines if the start of the arrow is defined
1104+
1105+**function** GetStartOffsetX: single; **virtual**; **abstract**;
1106+
1107+Retrieves the X-offset for the start of the arrow
1108+
1109+**function** GetStartRepeatCount: integer; **virtual**; **abstract**;
1110+
1111+Retrieves the repeat count for the start symbol
1112+
1113+**function** GetStartSizeFactor: TPointF; **virtual**; **abstract**;
1114+
1115+Retrieves the size factor for the start of the arrow
1116+
1117+**procedure** SetEndOffsetX(AValue: single); **virtual**; **abstract**;
1118+
1119+Sets the X-offset for the end of the arrow
1120+
1121+**procedure** SetEndRepeatCount(AValue: integer); **virtual**; **abstract**;
1122+
1123+Sets the repeat count for the end symbol
1124+
1125+**procedure** SetEndSizeFactor(AValue: TPointF); **virtual**; **abstract**;
1126+
1127+Sets the size factor for the end of the arrow
1128+
1129+**procedure** SetStartOffsetX(AValue: single); **virtual**; **abstract**;
1130+
1131+Sets the X-offset for the start of the arrow
1132+
1133+**procedure** SetStartRepeatCount(AValue: integer); **virtual**; **abstract**;
1134+
1135+Sets the repeat count for the start symbol
1136+
1137+**procedure** SetStartSizeFactor(AValue: TPointF); **virtual**; **abstract**;
1138+
1139+Sets the size factor for the start of the arrow
1140+
1141+**function** GetLineCap: TPenEndCap; **virtual**; **abstract**;
1142+
1143+Retrieves the line cap style for the classic arrow
1144+
1145+**procedure** SetLineCap(AValue: TPenEndCap); **virtual**; **abstract**;
1146+
1147+Sets the line cap style for the classic arrow
1148+
1149+**function** ComputeStartAt(**const** APosition, ADirection: TPointF; **const** AWidth, ACurrentPos: single): ArrayOfTPointF; **virtual**; **abstract**;
1150+
1151+Computes the start of the arrow at a given position and direction
1152+
1153+**function** ComputeEndAt(**const** APosition, ADirection: TPointF; **const** AWidth, ACurrentPos: single): ArrayOfTPointF; **virtual**; **abstract**;
1154+
1155+Computes the end of the arrow at a given position and direction
1156+
1157+**procedure** StartAsNone; **virtual**; **abstract**;
1158+
1159+Sets the start of the arrow to no style
1160+
1161+**procedure** StartAsClassic(AFlipped: boolean = false; ACut: boolean = false; ARelativePenWidth: single = 1); **virtual**; **abstract**;
1162+
1163+Sets the start of the arrow to a classic style
1164+
1165+**procedure** StartAsTriangle(ABackOffset: single = 0; ARounded: boolean = false; AHollow: boolean = false; AHollowPenWidth: single = 0.5); **virtual**; **abstract**;
1166+
1167+Sets the start of the arrow to a triangle style
1168+
1169+**procedure** StartAsTail; **virtual**; **abstract**;
1170+
1171+Sets the start of the arrow to a tail style
1172+
1173+**procedure** EndAsNone; **virtual**; **abstract**;
1174+
1175+Sets the end of the arrow to no style
1176+
1177+**procedure** EndAsClassic(AFlipped: boolean = false; ACut: boolean = false; ARelativePenWidth: single = 1); **virtual**; **abstract**;
1178+
1179+Sets the end of the arrow to a classic style
1180+
1181+**procedure** EndAsTriangle(ABackOffset: single = 0; ARounded: boolean = false; AHollow: boolean = false; AHollowPenWidth: single = 0.5); **virtual**; **abstract**;
1182+
1183+Sets the end of the arrow to a triangle style
1184+
1185+**procedure** EndAsTail; **virtual**; **abstract**;
1186+
1187+Sets the end of the arrow to a tail style
1188+
1189+**property** IsStartDefined: boolean **read** GetIsStartDefined;
1190+
1191+Check if the start of the arrow is defined
1192+
1193+**property** IsEndDefined: boolean **read** GetIsEndDefined;
1194+
1195+Check if the end of the arrow is defined
1196+
1197+**property** StartOffsetX: single **read** GetStartOffsetX **write** SetStartOffsetX;
1198+
1199+X-offset for the start of the arrow
1200+
1201+**property** EndOffsetX: single **read** GetEndOffsetX **write** SetEndOffsetX;
1202+
1203+X-offset for the end of the arrow
1204+
1205+**property** LineCap: TPenEndCap **read** GetLineCap **write** SetLineCap;
1206+
1207+Line cap style
1208+
1209+**property** StartSize: TPointF **read** GetStartSizeFactor **write** SetStartSizeFactor;
1210+
1211+Size factor for the start of the arrow
1212+
1213+**property** EndSize: TPointF **read** GetEndSizeFactor **write** SetEndSizeFactor;
1214+
1215+Size factor for the end of the arrow
1216+
1217+**property** StartRepeatCount: integer **read** GetStartRepeatCount **write** SetStartRepeatCount;
1218+
1219+Repeat count for the start symbol
1220+
1221+**property** EndRepeatCount: integer **read** GetEndRepeatCount **write** SetEndRepeatCount;
1222+
1223+Repeat count for the end symbol
1224+
1225+*TBGRACustomPenStroker* = **class**
1226+
1227+Generic class representing a pen stroker, used for drawing and styling lines with various attributes
1228+
1229+**function** GetArrow: TBGRACustomArrow; **virtual**; **abstract**;
1230+
1231+Retrieves the arrow style used at both ends of strokes
1232+
1233+**function** GetArrowOwned: boolean; **virtual**; **abstract**;
1234+
1235+Determines if the arrow is owned (managed) by the pen stroker
1236+
1237+**function** GetCustomPenStyle: TBGRAPenStyle; **virtual**; **abstract**;
1238+
1239+Gets the custom pen style
1240+
1241+**function** GetJoinStyle: TPenJoinStyle; **virtual**; **abstract**;
1242+
1243+Retrieves the style of line joins (e.g., bevel, miter)
1244+
1245+**function** GetLineCap: TPenEndCap; **virtual**; **abstract**;
1246+
1247+Retrieves the line cap style (e.g., butt, round)
1248+
1249+**function** GetMiterLimit: single; **virtual**; **abstract**;
1250+
1251+Gets the miter limit for line joins
1252+
1253+**function** GetPenStyle: TPenStyle; **virtual**; **abstract**;
1254+
1255+Retrieves the standard pen style
1256+
1257+**function** GetStrokeMatrix: TAffineMatrix; **virtual**; **abstract**;
1258+
1259+Gets the stroke transformation matrix (applied only to stroke and not to path points)
1260+
1261+**procedure** SetArrow(AValue: TBGRACustomArrow); **virtual**; **abstract**;
1262+
1263+Sets the arrow style used at both ends of strokes
1264+
1265+**procedure** SetArrowOwned(AValue: boolean); **virtual**; **abstract**;
1266+
1267+Sets whether the arrow is owned by the pen stroker
1268+
1269+**procedure** SetCustomPenStyle(AValue: TBGRAPenStyle); **virtual**; **abstract**;
1270+
1271+Sets the custom pen style
1272+
1273+**procedure** SetJoinStyle(AValue: TPenJoinStyle); **virtual**; **abstract**;
1274+
1275+Sets the style of line joins
1276+
1277+**procedure** SetLineCap(AValue: TPenEndCap); **virtual**; **abstract**;
1278+
1279+Sets the line cap style
1280+
1281+**procedure** SetMiterLimit(AValue: single); **virtual**; **abstract**;
1282+
1283+Sets the miter limit for line joins
1284+
1285+**procedure** SetPenStyle(AValue: TPenStyle); **virtual**; **abstract**;
1286+
1287+Sets the standard pen style
1288+
1289+**procedure** SetStrokeMatrix(**const** AValue: TAffineMatrix); **virtual**; **abstract**;
1290+
1291+Sets the stroke transformation matrix (applied only to stroke and not to path points)
1292+
1293+**function** ComputePolyline(**const** APoints: **array** **of** TPointF; AWidth: single; AClosedCap: boolean = true): ArrayOfTPointF; **overload**; **virtual**; **abstract**;
1294+
1295+Computes a polyline with the given points and width, optionally closing the cap
1296+
1297+**function** ComputePolyline(**const** APoints: **array** **of** TPointF; AWidth: single; APenColor: TBGRAPixel; AClosedCap: boolean = true): ArrayOfTPointF; **overload**; **virtual**; **abstract**;
1298+
1299+Computes a polyline with the given points, width, and pen color, optionally closing the cap
1300+
1301+**function** ComputePolylineAutoCycle(**const** APoints: **array** **of** TPointF; AWidth: single): ArrayOfTPointF; **virtual**; **abstract**;
1302+
1303+Computes a polyline with automatic cycling of points and given width
1304+
1305+**function** ComputePolygon(**const** APoints: **array** **of** TPointF; AWidth: single): ArrayOfTPointF; **virtual**; **abstract**;
1306+
1307+Computes a polygon with the given points and width
1308+
1309+**property** Style: TPenStyle **read** GetPenStyle **write** SetPenStyle;
1310+
1311+Standard pen style
1312+
1313+**property** CustomPenStyle: TBGRAPenStyle **read** GetCustomPenStyle **write** SetCustomPenStyle;
1314+
1315+Custom pen style (with given dash and gap lengths)
1316+
1317+**property** Arrow: TBGRACustomArrow **read** GetArrow **write** SetArrow;
1318+
1319+Arrow style at both ends of strokes
1320+
1321+**property** ArrowOwned: boolean **read** GetArrowOwned **write** SetArrowOwned;
1322+
1323+Is the arrow is owned by the pen stroker
1324+
1325+**property** StrokeMatrix: TAffineMatrix **read** GetStrokeMatrix **write** SetStrokeMatrix;
1326+
1327+Stroke transformation matrix (applied only to stroke and not to path points)
1328+
1329+**property** LineCap: TPenEndCap **read** GetLineCap **write** SetLineCap;
1330+
1331+Line cap style
1332+
1333+**property** JoinStyle: TPenJoinStyle **read** GetJoinStyle **write** SetJoinStyle;
1334+
1335+Join style of lines
1336+
1337+**property** MiterLimit: single **read** GetMiterLimit **write** SetMiterLimit;
1338+
1339+Miter limit for line joins
1340+
7031341#### Gradients
7041342
705-_TGradientType_ = (
706----
707-| Shape of a gradient
708-| _gtLinear_ ,
709-| | The color changes along a certain vector and does not change along its perpendicular direction
710-| _gtReflected_ ,
711-| | The color changes like in _gtLinear_ however it is symmetrical to a specified direction
712-| _gtDiamond_ ,
713-| | The color changes along a diamond shape
714-| _gtRadial_ ,
715-| | The color changes in a radial way from a given center
716-| _gtAngular_);
717-| | The color changes according to the angle relative to a given center
718-| **const** GradientTypeStr : **array**[TGradientType] **of** **string**
719-| | List of string to represent gradient types
720-| **function** StrToGradientType(str: **string**): TGradientType;
721-| | Returns the gradient type represented by the given string
722-_TBGRAGradientGetColorAtFunc_ = **function**(position: integer): TBGRAPixel **of** **object** ;
723-| Function type to get the the color at a given integer position
724-_TBGRAGradientGetColorAtFloatFunc_ = **function**(position: single): TBGRAPixel **of** **object** ;
725-| Function type to get the the color at a given single-precision floating type position
726-_TBGRAGradientGetExpandedColorAtFunc_ = **function**(position: integer): TExpandedPixel **of** **object** ;
727-| Function type to get the the expanded color at a given integer position
728-_TBGRAGradientGetExpandedColorAtFloatFunc_ = **function**(position: single): TExpandedPixel **of** **object** ;
729-| Function type to get the the expanded color at a given single-precision floating type position
730-_TBGRACustomGradient_ = **class**
731-| Defines a gradient of color, not specifying its shape but only the series of colors
732-| **function** GetColorAt(position: integer): TBGRAPixel; **virtual** ; **abstract** ;
733-| | Returns the color at a given _position_. The reference range is from 0 to 65535, however values beyond are possible as well
734-| **function** GetExpandedColorAt(position: integer): TExpandedPixel; **virtual** ;
735-| | Returns the expanded color at a given _position_. The reference range is from 0 to 65535, however values beyond are possible as well
736-| **function** GetColorAtF(position: single): TBGRAPixel; **virtual** ;
737-| | Returns the color at a given _position_. The reference range is from 0 to 1, however values beyond are possible as well
738-| **function** GetExpandedColorAtF(position: single): TExpandedPixel; **virtual** ;
739-| | Returns the expanded color at a given _position_. The reference range is from 0 to 1, however values beyond are possible as well
740-| **function** GetAverageColor: TBGRAPixel; **virtual** ; **abstract** ;
741-| | Returns the average color of the gradient
742-| **function** GetAverageExpandedColor: TExpandedPixel; **virtual** ;
743-| | Returns the average expanded color of the gradient
744-| **function** GetMonochrome: boolean; **virtual** ; **abstract** ;
745-| | Returns whether the gradient has only one color
746-| **property** Monochrome: boolean **read** GetMonochrome;
747-| | If the gradient contains only one color and thus is not really a gradient
748-
1343+*TGradientType* = (
1344+
1345+Shape of a gradient
1346+
1347+*gtLinear*,
1348+
1349+The color changes along a certain vector and does not change along its perpendicular direction
1350+
1351+*gtReflected*,
1352+
1353+The color changes like in *gtLinear* however it is symmetrical to a specified direction
1354+
1355+*gtDiamond*,
1356+
1357+The color changes along a diamond shape
1358+
1359+*gtRadial*,
1360+
1361+The color changes in a radial way from a given center
1362+
1363+*gtAngular*);
1364+
1365+The color changes according to the angle relative to a given center
1366+
1367+**const** GradientTypeStr : **array**\[TGradientType\] **of** **string**
1368+
1369+List of string to represent gradient types
1370+
1371+**function** StrToGradientType(str: **string**): TGradientType;
1372+
1373+Returns the gradient type represented by the given string
1374+
1375+*TBGRAGradientGetColorAtFunc* = **function**(position: integer): TBGRAPixel **of** **object**;
1376+
1377+Function type to get the the color at a given integer position
1378+
1379+*TBGRAGradientGetColorAtFloatFunc* = **function**(position: single): TBGRAPixel **of** **object**;
1380+
1381+Function type to get the the color at a given single-precision floating type position
1382+
1383+*TBGRAGradientGetExpandedColorAtFunc* = **function**(position: integer): TExpandedPixel **of** **object**;
1384+
1385+Function type to get the the expanded color at a given integer position
1386+
1387+*TBGRAGradientGetExpandedColorAtFloatFunc* = **function**(position: single): TExpandedPixel **of** **object**;
1388+
1389+Function type to get the the expanded color at a given single-precision floating type position
1390+
1391+*TBGRACustomGradient* = **class**
1392+
1393+Defines a gradient of color, not specifying its shape but only the series of colors
1394+
1395+**function** GetColorAt(position: integer): TBGRAPixel; **virtual**; **abstract**;
1396+
1397+Returns the color at a given *position*. The reference range is from 0 to 65535, however values beyond are possible as well
1398+
1399+**function** GetExpandedColorAt(position: integer): TExpandedPixel; **virtual**;
1400+
1401+Returns the expanded color at a given *position*. The reference range is from 0 to 65535, however values beyond are possible as well
1402+
1403+**function** GetColorAtF(position: single): TBGRAPixel; **virtual**;
1404+
1405+Returns the color at a given *position*. The reference range is from 0 to 1, however values beyond are possible as well
1406+
1407+**function** GetExpandedColorAtF(position: single): TExpandedPixel; **virtual**;
1408+
1409+Returns the expanded color at a given *position*. The reference range is from 0 to 1, however values beyond are possible as well
1410+
1411+**function** GetAverageColor: TBGRAPixel; **virtual**; **abstract**;
1412+
1413+Returns the average color of the gradient
1414+
1415+**function** GetAverageExpandedColor: TExpandedPixel; **virtual**;
1416+
1417+Returns the average expanded color of the gradient
1418+
1419+**function** GetMonochrome: boolean; **virtual**; **abstract**;
1420+
1421+Returns whether the gradient has only one color
1422+
1423+**property** Monochrome: boolean **read** GetMonochrome;
1424+
1425+If the gradient contains only one color and thus is not really a gradient
1426+
7491427#### Bézier curves
7501428
751-_TCubicBezierCurve_ = **object**
752----
753-| Definition of a Bézier curve of order 3. It has two control points _c1_ and _c2_. Those are not reached by the curve in general.
754-| **function** SimpleComputePoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF;
755-| | Compute the points using the simple approach of computing for each time value
756-| _p1_ : TPointF;
757-| | Starting point (reached)
758-| _c1_ : TPointF;
759-| | First control point (not reached by the curve)
760-| _c2_ : TPointF;
761-| | Second control point (not reached by the curve)
762-| _p2_ : TPointF;
763-| | Ending point (reached)
764-| **function** ComputePointAt(t: single): TPointF;
765-| | Computes the point at time _t_ , varying from 0 to 1
766-| **procedure** Split(**out** ALeft, ARight: TCubicBezierCurve);
767-| | Split the curve in two such that _ALeft.p2_ = _ARight.p1_
768-| **function** ComputeLength(AAcceptedDeviation: single = 0.1): single;
769-| | Compute an approximation of the length of the curve. _AAcceptedDeviation_ indicates the maximum orthogonal distance that is ignored and approximated by a straight line.
770-| **function** ToPoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF;
771-| | Computes a polygonal approximation of the curve. _AAcceptedDeviation_ indicates the maximum orthogonal distance that is ignored and approximated by a straight line. _AIncludeFirstPoint_ indicates if the first point must be included in the array
772-| **procedure** CopyToPath(ADest: IBGRAPath);
773-| | Copy the curve to the given path
774-| **function** GetBounds: TRectF;
775-| | Computes the rectangular bounds
776-| **function** BezierCurve(origin, control1, control2, destination: TPointF) : TCubicBezierCurve; **overload** ;
777-| | Creates a structure for a cubic Bézier curve
778-_TQuadraticBezierCurve_ = **object**
779-| Definition of a Bézier curve of order 2. It has one control point
780-| **function** SimpleComputePoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF;
781-| | Compute the points using the simple approach of computing for each time value
782-| **function** ComputeExtremumPositionOutsideSegment: single;
783-| | Computes the position where the curve has its extremum
784-| _p1_ : TPointF;
785-| | Starting point (reached)
786-| _c_ : TPointF;
787-| | Control point (not reached by the curve)
788-| _p2_ : TPointF;
789-| | Ending point (reached)
790-| **function** ComputePointAt(t: single): TPointF;
791-| | Computes the point at time _t_ , varying from 0 to 1
792-| **procedure** Split(**out** ALeft, ARight: TQuadraticBezierCurve);
793-| | Split the curve in two such that _ALeft.p2_ = _ARight.p1_
794-| **function** ComputeLength: single;
795-| | Compute the **exact** length of the curve
796-| **function** ToPoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF;
797-| | Computes a polygonal approximation of the curve. _AAcceptedDeviation_ indicates the maximum orthogonal distance that is ignored and approximated by a straight line. _AIncludeFirstPoint_ indicates if the first point must be included in the array
798-| **procedure** CopyToPath(ADest: IBGRAPath);
799-| | Copy the curve to the given path
800-| **function** GetBounds: TRectF;
801-| | Computes the rectangular bounds
802-| **function** BezierCurve(origin, control, destination: TPointF) : TQuadraticBezierCurve; **overload** ;
803-| | Creates a structure for a quadratic Bézier curve
804-| **function** BezierCurve(origin, destination: TPointF) : TQuadraticBezierCurve; **overload** ;
805-| | Creates a structure for a quadratic Bézier curve without curvature
806-| _ArrayOfSingle_ = **array** **of** single;
807-| | Array of single-precision floating point values
808-_TRationalQuadraticBezierCurve_ = **object**
809-| Quasi-standard rational quadratic Bezier curve, defined by three points and a number:
1429+*TCubicBezierCurve* = **object**
8101430
811- * _p1_ : starting point
812- * _c_ : control point
813- * _p2_ : ending point
814- * _weight_ : weight for the control point
1431+Definition of a Bézier curve of order 3. It has two control points *c1* and *c2*. Those are not reached by the curve in general.
8151432
816-The curve is defined with the function (t in [0; 1]):
1433+**function** SimpleComputePoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF;
8171434
818- * f: t → ((1-t)2 * _p1_ \+ 2 * t * (1-t) * _weight_ * _c_ \+ t2*_p2_) / (1-t)2 \+ 2 * t * (1-t) * _weight_ \+ t2)
1435+Compute the points using the simple approach of computing for each time value
8191436
820-The curve is an arc of:
1437+*p1*: TPointF;
8211438
822- * ellipse when _weight_ in ]-1; 1[
823- * parabola when _weight_ = 1 (classical quadratic Bezier curve)
824- * hyperbola when _weight_ > 1
1439+Starting point (reached)
8251440
826-A negative weight give the complementary curve for its positive counterpart. So when _weight_ ≤ -1 the curve is discontinuous:
1441+*c1*: TPointF;
8271442
828- * infinite branches of parabola when _weight_ = -1
829- * infinite branches of hyperbola and symetric hyperbola when _weight_ < -1
1443+First control point (not reached by the curve)
8301444
831-To transform a rational quadratic Bezier curve with an affin transformation, you only have to transform the three points and leave the weight as it is.
832-| _p1_ , _c_ , _p2_ : TPointF;
833-| | Starting, control and ending points
834-| _weight_ : single;
835-| | Weight of control point
836-| **function** GetIsInfinite: boolean;
837-| | Checks whether the curve is infinitely long
838-| **function** InternalComputePoints(AInfiniteBounds: TRectF; AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF;
839-| | Compute points in the general case
840-| **function** GetBoundingPositions(AIncludeFirstAndLast: boolean; ASorted: boolean): ArrayOfSingle;
841-| | Computes the points relevant to compute bounds
842-| **function** ComputePointAt(t: single): TPointF;
843-| | Compute a point at the specified time
844-| **function** ComputeLength(AAcceptedDeviation: single = 0.1): single;
845-| | Compute the length
846-| **function** ToPoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF; **overload** ;
847-| | Computes the points of the curve
848-| **function** ToPoints(AInfiniteBounds: TRectF; AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF; **overload** ;
849-| | Computes the points of the curve by providing where the infinite curve can stop
850-| **function** GetBounds: TRectF;
851-| | Compute the rectangular bounds
852-| **procedure** Split(**out** ALeft, ARight: TRationalQuadraticBezierCurve);
853-| | Split into two curves
854-| **property** IsInfinite: boolean **read** GetIsInfinite;
855-| | Is the curve infinitely long
856-| **function** BezierCurve(origin, control, destination: TPointF; Aweight:single) : TRationalQuadraticBezierCurve; **overload** ;
857-| | Creates a rational Bézier curve
858-_TEasyBezierCurveMode_ = (
859-| Enumerates modes for handling curves in a Bezier curve sequence
860-| _cmAuto_ ,
861-| | Automatically determines whether to curve or form an angle based on the points' positions
862-| _cmCurve_ ,
863-| | Forces a curve at the point
864-| _cmAngle_
865-| | Forces an angle at the point, meaning the point is reached and forms an angle instead of a curve
866-_TEasyBezierPointTransformFunc_ = **function**(APoint: PPointF; AData: Pointer): TPointF **of** **object** ;
867-| Function type for transforming Bezier curve points
868-_TEasyBezierCurve_ = **object**
869-| Object representing an easy-to-use Bezier curve, with configurable curve modes and transformation functions
870-| **function** GetCurveMode(AIndex: integer): TEasyBezierCurveMode;
871-| | Retrieves the curve mode for a specified point index
872-| **function** GetCurveStartPoint: TPointF;
873-| | Gets the starting point of the curve
874-| **function** GetPoint(AIndex: integer): TPointF;
875-| | Retrieves the point at a specified index
876-| **function** GetPointCount: integer;
877-| | Gets the total number of points in the curve
878-| **procedure** SetClosed(AValue: boolean);
879-| | Sets whether the curve is closed
880-| **procedure** SetCurveMode(AIndex: integer; AValue: TEasyBezierCurveMode);
881-| | Sets the curve mode for a specified point index
882-| **procedure** SetMinimumDotProduct(AValue: single);
883-| | Sets the minimum dot product to form a curve instead of an angle
884-| **procedure** SetPoint(AIndex: integer; AValue: TPointF);
885-| | Sets the point at a specified index
886-| _FCurves_ : **array** **of** **record**
887-| | Computed Bézier control points
888-| _FInvalidated_ : boolean;
889-| | Whether the curve need to be recomputed
890-| _FPoints_ : **array** **of** **record**
891-| | Definition of the curve by the user
892-| _FMinimumDotProduct_ : single;
893-| | Minimum dot product to form a curve instead of an angle
894-| _FClosed_ : boolean;
895-| | Is the curve is closed
896-| **function** MaybeCurve(start1, end1, start2, end2: integer): boolean;
897-| | Checks whether two vectors have the minimum dot product to suggest a curve. _start1_ and _end1_ are the indices for the first vector. _start2_ and _end2_ for the second vector.
898-| **procedure** ComputeQuadraticCurves;
899-| | Computes the control points for the classical quadratic curve
900-| **function** PointTransformNone(APoint: PPointF; AData: Pointer): TPointF;
901-| | Fonction to apply no transformation
902-| **function** PointTransformOffset(APoint: PPointF; AData: Pointer): TPointF;
903-| | Fonction to apply an offset
904-| **procedure** Init;
905-| | Initializes the Bezier curve object
906-| **procedure** Clear;
907-| | Clears all points and resets the curve
908-| **procedure** SetPoints(APoints: **array** **of** TPointF; ACurveMode: TEasyBezierCurveMode); **overload** ;
909-| | Sets the points and curve mode for the entire curve
910-| **procedure** SetPoints(APoints: **array** **of** TPointF; ACurveMode: **array** **of** TEasyBezierCurveMode); **overload** ;
911-| | Sets the points and individual curve modes for each point
912-| **procedure** SetPoints(APoints: **array** **of** TPointF; ACurveMode: TEasyBezierCurveMode; AStart, ACount: integer); **overload** ;
913-| | Sets a subset of points and a single curve mode for these points
914-| **procedure** SetPoints(APoints: **array** **of** TPointF; ACurveMode: **array** **of** TEasyBezierCurveMode; AStart, ACount: integer); **overload** ;
915-| | Sets a subset of points and individual curve modes for each of these points
916-| **procedure** CopyToPath(ADest: IBGRAPath); **overload** ;
917-| | Copies the Bezier curve to a path object
918-| **procedure** CopyToPath(ADest: IBGRAPath; AOffset: TPointF; AReverse: boolean = false); **overload** ;
919-| | Copies the Bezier curve to a path object with an offset and optional reversal
920-| **procedure** CopyToPath(ADest: IBGRAPath; ATransformFunc: TEasyBezierPointTransformFunc; ATransformData: Pointer; AReverse: boolean = false); **overload** ;
921-| | Copies the Bezier curve to a path object with a custom transformation
922-| **property** Point[AIndex: integer]: TPointF **read** GetPoint **write** SetPoint;
923-| | Coordinates of the points
924-| **property** CurveMode[AIndex: integer]: TEasyBezierCurveMode **read** GetCurveMode **write** SetCurveMode;
925-| | Mode to use for each point
926-| **property** PointCount: integer **read** GetPointCount;
927-| | Number of points
928-| **property** MinimumDotProduct: single **read** FMinimumDotProduct **write** SetMinimumDotProduct;
929-| | Minimum dot product to form a curve rather than an angle when using _cmAuto_ mode
930-| **property** Closed: boolean **read** FClosed **write** SetClosed;
931-| | Gets or sets whether to close the curve
932-| **property** CurveStartPoint: TPointF **read** GetCurveStartPoint;
933-| | Coordinates of the starting point
934-| **function** ToPoints: ArrayOfTPointF;
935-| | Converts the Bezier curve into an array of points
936-| **function** ComputeLength: single;
937-| | Computes the total length of the Bezier curve
938-| **const** EasyBezierDefaultMinimumDotProduct = 0.707;
939-| | Minimum dot product, corresponding to approximately 45 degrees, to form a curve instead of an angle
940-**function** EasyBezierCurve(APoints: **array** **of** TPointF; AClosed: boolean; ACurveMode: TEasyBezierCurveMode;
941-| Create a TEasyBezierCurve object with only one curve mode
942-**function** EasyBezierCurve(APoints: **array** **of** TPointF; AClosed: boolean; ACurveMode: **array** **of** TEasyBezierCurveMode;
943-| Create a TEasyBezierCurve object with a curve mode for each point
944-**function** EasyBezierCurve(APoints: **array** **of** TPointF; AStart, ACount: integer; AClosed: boolean; ACurveMode: TEasyBezierCurveMode;
945-| Create a TEasyBezierCurve object with a subsection of the array of points, with only one curve mode
946-**function** EasyBezierCurve(APoints: **array** **of** TPointF; AStart, ACount: integer; AClosed: boolean; ACurveMode: **array** **of** TEasyBezierCurveMode;
947-| Create a TEasyBezierCurve object with a subsection of the array of points, with a curve mode for each point
1445+*c2*: TPointF;
9481446
1447+Second control point (not reached by the curve)
1448+
1449+*p2*: TPointF;
1450+
1451+Ending point (reached)
1452+
1453+**function** ComputePointAt(t: single): TPointF;
1454+
1455+Computes the point at time *t*, varying from 0 to 1
1456+
1457+**procedure** Split(**out** ALeft, ARight: TCubicBezierCurve);
1458+
1459+Split the curve in two such that *ALeft.p2* = *ARight.p1*
1460+
1461+**function** ComputeLength(AAcceptedDeviation: single = 0.1): single;
1462+
1463+Compute an approximation of the length of the curve. *AAcceptedDeviation* indicates the maximum orthogonal distance that is ignored and approximated by a straight line.
1464+
1465+**function** ToPoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF;
1466+
1467+Computes a polygonal approximation of the curve. *AAcceptedDeviation* indicates the maximum orthogonal distance that is ignored and approximated by a straight line. *AIncludeFirstPoint* indicates if the first point must be included in the array
1468+
1469+**procedure** CopyToPath(ADest: IBGRAPath);
1470+
1471+Copy the curve to the given path
1472+
1473+**function** GetBounds: TRectF;
1474+
1475+Computes the rectangular bounds
1476+
1477+**function** BezierCurve(origin, control1, control2, destination: TPointF) : TCubicBezierCurve; **overload**;
1478+
1479+Creates a structure for a cubic Bézier curve
1480+
1481+*TQuadraticBezierCurve* = **object**
1482+
1483+Definition of a Bézier curve of order 2. It has one control point
1484+
1485+**function** SimpleComputePoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF;
1486+
1487+Compute the points using the simple approach of computing for each time value
1488+
1489+**function** ComputeExtremumPositionOutsideSegment: single;
1490+
1491+Computes the position where the curve has its extremum
1492+
1493+*p1*: TPointF;
1494+
1495+Starting point (reached)
1496+
1497+*c*: TPointF;
1498+
1499+Control point (not reached by the curve)
1500+
1501+*p2*: TPointF;
1502+
1503+Ending point (reached)
1504+
1505+**function** ComputePointAt(t: single): TPointF;
1506+
1507+Computes the point at time *t*, varying from 0 to 1
1508+
1509+**procedure** Split(**out** ALeft, ARight: TQuadraticBezierCurve);
1510+
1511+Split the curve in two such that *ALeft.p2* = *ARight.p1*
1512+
1513+**function** ComputeLength: single;
1514+
1515+Compute the **exact** length of the curve
1516+
1517+**function** ToPoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF;
1518+
1519+Computes a polygonal approximation of the curve. *AAcceptedDeviation* indicates the maximum orthogonal distance that is ignored and approximated by a straight line. *AIncludeFirstPoint* indicates if the first point must be included in the array
1520+
1521+**procedure** CopyToPath(ADest: IBGRAPath);
1522+
1523+Copy the curve to the given path
1524+
1525+**function** GetBounds: TRectF;
1526+
1527+Computes the rectangular bounds
1528+
1529+**function** BezierCurve(origin, control, destination: TPointF) : TQuadraticBezierCurve; **overload**;
1530+
1531+Creates a structure for a quadratic Bézier curve
1532+
1533+**function** BezierCurve(origin, destination: TPointF) : TQuadraticBezierCurve; **overload**;
1534+
1535+Creates a structure for a quadratic Bézier curve without curvature
1536+
1537+*ArrayOfSingle* = **array** **of** single;
1538+
1539+Array of single-precision floating point values
1540+
1541+*TRationalQuadraticBezierCurve* = **object**
1542+
1543+Quasi-standard rational quadratic Bezier curve, defined by three points and a number:
1544+
1545+- *p1*: starting point
1546+- *c*: control point
1547+- *p2*: ending point
1548+- *weight*: weight for the control point
1549+
1550+The curve is defined with the function (t in \[0; 1\]):
1551+
1552+- f: t → ((1-t)<sup>2</sup> * *p1* + 2 * t * (1-t) * *weight* * *c* + t<sup>2</sup>**p2*) / (1-t)<sup>2</sup> + 2 * t * (1-t) * *weight* + t<sup>2</sup>)
1553+
1554+The curve is an arc of:
1555+
1556+- ellipse when *weight* in \]-1; 1\[
1557+- parabola when *weight* = 1 (classical quadratic Bezier curve)
1558+- hyperbola when *weight* \> 1
1559+
1560+A negative weight give the complementary curve for its positive counterpart. So when *weight* ≤ -1 the curve is discontinuous:
1561+
1562+- infinite branches of parabola when *weight* = -1
1563+- infinite branches of hyperbola and symetric hyperbola when *weight* \< -1
1564+
1565+To transform a rational quadratic Bezier curve with an affin transformation, you only have to transform the three points and leave the weight as it is.
1566+
1567+*p1*, *c*, *p2* : TPointF;
1568+
1569+Starting, control and ending points
1570+
1571+*weight* : single;
1572+
1573+Weight of control point
1574+
1575+**function** GetIsInfinite: boolean;
1576+
1577+Checks whether the curve is infinitely long
1578+
1579+**function** InternalComputePoints(AInfiniteBounds: TRectF; AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF;
1580+
1581+Compute points in the general case
1582+
1583+**function** GetBoundingPositions(AIncludeFirstAndLast: boolean; ASorted: boolean): ArrayOfSingle;
1584+
1585+Computes the points relevant to compute bounds
1586+
1587+**function** ComputePointAt(t: single): TPointF;
1588+
1589+Compute a point at the specified time
1590+
1591+**function** ComputeLength(AAcceptedDeviation: single = 0.1): single;
1592+
1593+Compute the length
1594+
1595+**function** ToPoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF; **overload**;
1596+
1597+Computes the points of the curve
1598+
1599+**function** ToPoints(AInfiniteBounds: TRectF; AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF; **overload**;
1600+
1601+Computes the points of the curve by providing where the infinite curve can stop
1602+
1603+**function** GetBounds: TRectF;
1604+
1605+Compute the rectangular bounds
1606+
1607+**procedure** Split(**out** ALeft, ARight: TRationalQuadraticBezierCurve);
1608+
1609+Split into two curves
1610+
1611+**property** IsInfinite: boolean **read** GetIsInfinite;
1612+
1613+Is the curve infinitely long
1614+
1615+**function** BezierCurve(origin, control, destination: TPointF; Aweight:single) : TRationalQuadraticBezierCurve; **overload**;
1616+
1617+Creates a rational Bézier curve
1618+
1619+*TEasyBezierCurveMode* = (
1620+
1621+Enumerates modes for handling curves in a Bezier curve sequence
1622+
1623+*cmAuto*,
1624+
1625+Automatically determines whether to curve or form an angle based on the points' positions
1626+
1627+*cmCurve*,
1628+
1629+Forces a curve at the point
1630+
1631+*cmAngle*
1632+
1633+Forces an angle at the point, meaning the point is reached and forms an angle instead of a curve
1634+
1635+*TEasyBezierPointTransformFunc* = **function**(APoint: PPointF; AData: Pointer): TPointF **of** **object**;
1636+
1637+Function type for transforming Bezier curve points
1638+
1639+*TEasyBezierCurve* = **object**
1640+
1641+Object representing an easy-to-use Bezier curve, with configurable curve modes and transformation functions
1642+
1643+**function** GetCurveMode(AIndex: integer): TEasyBezierCurveMode;
1644+
1645+Retrieves the curve mode for a specified point index
1646+
1647+**function** GetCurveStartPoint: TPointF;
1648+
1649+Gets the starting point of the curve
1650+
1651+**function** GetPoint(AIndex: integer): TPointF;
1652+
1653+Retrieves the point at a specified index
1654+
1655+**function** GetPointCount: integer;
1656+
1657+Gets the total number of points in the curve
1658+
1659+**procedure** SetClosed(AValue: boolean);
1660+
1661+Sets whether the curve is closed
1662+
1663+**procedure** SetCurveMode(AIndex: integer; AValue: TEasyBezierCurveMode);
1664+
1665+Sets the curve mode for a specified point index
1666+
1667+**procedure** SetMinimumDotProduct(AValue: single);
1668+
1669+Sets the minimum dot product to form a curve instead of an angle
1670+
1671+**procedure** SetPoint(AIndex: integer; AValue: TPointF);
1672+
1673+Sets the point at a specified index
1674+
1675+*FCurves*: **array** **of** **record**
1676+
1677+Computed Bézier control points
1678+
1679+*FInvalidated*: boolean;
1680+
1681+Whether the curve need to be recomputed
1682+
1683+*FPoints*: **array** **of** **record**
1684+
1685+Definition of the curve by the user
1686+
1687+*FMinimumDotProduct*: single;
1688+
1689+Minimum dot product to form a curve instead of an angle
1690+
1691+*FClosed*: boolean;
1692+
1693+Is the curve is closed
1694+
1695+**function** MaybeCurve(start1, end1, start2, end2: integer): boolean;
1696+
1697+Checks whether two vectors have the minimum dot product to suggest a curve. *start1* and *end1* are the indices for the first vector. *start2* and *end2* for the second vector.
1698+
1699+**procedure** ComputeQuadraticCurves;
1700+
1701+Computes the control points for the classical quadratic curve
1702+
1703+**function** PointTransformNone(APoint: PPointF; AData: Pointer): TPointF;
1704+
1705+Fonction to apply no transformation
1706+
1707+**function** PointTransformOffset(APoint: PPointF; AData: Pointer): TPointF;
1708+
1709+Fonction to apply an offset
1710+
1711+**procedure** Init;
1712+
1713+Initializes the Bezier curve object
1714+
1715+**procedure** Clear;
1716+
1717+Clears all points and resets the curve
1718+
1719+**procedure** SetPoints(APoints: **array** **of** TPointF; ACurveMode: TEasyBezierCurveMode); **overload**;
1720+
1721+Sets the points and curve mode for the entire curve
1722+
1723+**procedure** SetPoints(APoints: **array** **of** TPointF; ACurveMode: **array** **of** TEasyBezierCurveMode); **overload**;
1724+
1725+Sets the points and individual curve modes for each point
1726+
1727+**procedure** SetPoints(APoints: **array** **of** TPointF; ACurveMode: TEasyBezierCurveMode; AStart, ACount: integer); **overload**;
1728+
1729+Sets a subset of points and a single curve mode for these points
1730+
1731+**procedure** SetPoints(APoints: **array** **of** TPointF; ACurveMode: **array** **of** TEasyBezierCurveMode; AStart, ACount: integer); **overload**;
1732+
1733+Sets a subset of points and individual curve modes for each of these points
1734+
1735+**procedure** CopyToPath(ADest: IBGRAPath); **overload**;
1736+
1737+Copies the Bezier curve to a path object
1738+
1739+**procedure** CopyToPath(ADest: IBGRAPath; AOffset: TPointF; AReverse: boolean = false); **overload**;
1740+
1741+Copies the Bezier curve to a path object with an offset and optional reversal
1742+
1743+**procedure** CopyToPath(ADest: IBGRAPath; ATransformFunc: TEasyBezierPointTransformFunc; ATransformData: Pointer; AReverse: boolean = false); **overload**;
1744+
1745+Copies the Bezier curve to a path object with a custom transformation
1746+
1747+**property** Point\[AIndex: integer\]: TPointF **read** GetPoint **write** SetPoint;
1748+
1749+Coordinates of the points
1750+
1751+**property** CurveMode\[AIndex: integer\]: TEasyBezierCurveMode **read** GetCurveMode **write** SetCurveMode;
1752+
1753+Mode to use for each point
1754+
1755+**property** PointCount: integer **read** GetPointCount;
1756+
1757+Number of points
1758+
1759+**property** MinimumDotProduct: single **read** FMinimumDotProduct **write** SetMinimumDotProduct;
1760+
1761+Minimum dot product to form a curve rather than an angle when using *cmAuto* mode
1762+
1763+**property** Closed: boolean **read** FClosed **write** SetClosed;
1764+
1765+Gets or sets whether to close the curve
1766+
1767+**property** CurveStartPoint: TPointF **read** GetCurveStartPoint;
1768+
1769+Coordinates of the starting point
1770+
1771+**function** ToPoints: ArrayOfTPointF;
1772+
1773+Converts the Bezier curve into an array of points
1774+
1775+**function** ComputeLength: single;
1776+
1777+Computes the total length of the Bezier curve
1778+
1779+**const** EasyBezierDefaultMinimumDotProduct = 0.707;
1780+
1781+Minimum dot product, corresponding to approximately 45 degrees, to form a curve instead of an angle
1782+
1783+**function** EasyBezierCurve(APoints: **array** **of** TPointF; AClosed: boolean; ACurveMode: TEasyBezierCurveMode;
1784+
1785+Create a TEasyBezierCurve object with only one curve mode
1786+
1787+**function** EasyBezierCurve(APoints: **array** **of** TPointF; AClosed: boolean; ACurveMode: **array** **of** TEasyBezierCurveMode;
1788+
1789+Create a TEasyBezierCurve object with a curve mode for each point
1790+
1791+**function** EasyBezierCurve(APoints: **array** **of** TPointF; AStart, ACount: integer; AClosed: boolean; ACurveMode: TEasyBezierCurveMode;
1792+
1793+Create a TEasyBezierCurve object with a subsection of the array of points, with only one curve mode
1794+
1795+**function** EasyBezierCurve(APoints: **array** **of** TPointF; AStart, ACount: integer; AClosed: boolean; ACurveMode: **array** **of** TEasyBezierCurveMode;
1796+
1797+Create a TEasyBezierCurve object with a subsection of the array of points, with a curve mode for each point
1798+
9491799---
950-*From the Free Pascal wiki, page "BGRABitmap Geometry types", as the Internet Archive kept it on 2025-01-23. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
1800+*From the Free Pascal wiki, page "BGRABitmap Geometry types", as it stood on 2023-12-16 after a change by Circular, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's [[Licensing]] page. If you have concerns about this material, [message the admin](/wiki-contact).*
1801+Category: BGRABitmap

Back to history