Difference between revisions of "BGRABitmap Geometry types"
From Lazarus wiki
Jump to navigationJump to search (category) |
(update doc) |
||
Line 4: | Line 4: | ||
=== Geometry types === | === Geometry types === | ||
<table style="border-collapse: collapse;"> | <table style="border-collapse: collapse;"> | ||
− | <tr style="background: white;"><td colspan="3">'' | + | <tr style="background: white;"><td colspan="3">''TPoint'' = BGRAClasses.TPoint;</td></tr> |
− | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2"> | + | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Represents a point with X and Y integer coordinates</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''const''' EmptyPoint : TPoint = (X: -2147483648; Y: -2147483648);</td></tr> |
− | <tr | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">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</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' IsEmptyPoint('''const''' APoint: TPoint): boolean;</td></tr> |
− | <tr | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Checks if the given point is equivalent to EmptyPoint</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr style="background: #f0f0ff;"><td colspan="3">'''const''' EmptySingle = single(-3.402823e38);</td></tr> |
− | <tr | + | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Value indicating that there is nothing in the single-precision floating point value. It is also used as a separator in lists</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr style="background: white;"><td colspan="3">''PPointF'' = ^BGRAClasses.TPointF;</td></tr> |
− | <tr | + | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Pointer to a TPointF structure</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' isEmptyPointF(pt: TPointF): boolean;</td></tr> | + | <tr style="background: #f0f0ff;"><td colspan="3">''TPointF'' = BGRAClasses.TPointF;</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Checks if the structure is empty (equal to | + | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Contains a point with single-precision floating point coordinates</td></tr> |
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''const''' EmptyPointF: TPointF = (x: -3.402823e38; y: -3.402823e38);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Value indicating that there is an empty TPointF structure. It is also used as a separator in lists of points</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' PointF(x, y: single): TPointF; '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Creates a new structure with values ''x'' and ''y''</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' PointF(pt: TPoint): TPointF; '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Creates a new structure converting integer values to single-precision floating-point coordinates</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' isEmptyPointF('''const''' pt: TPointF): boolean;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Checks if the structure is empty (equal to EmptyPointF)</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
<tr><td width="10%"></td><td colspan="2" style="background: white;">'''operator''' = ('''const''' pt1, pt2: TPointF): boolean; '''inline''';</td></tr> | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''operator''' = ('''const''' pt1, pt2: TPointF): boolean; '''inline''';</td></tr> | ||
Line 35: | Line 47: | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
<tr><td width="10%"></td><td colspan="2" style="background: white;">'''operator''' * ('''const''' pt1, pt2: TPointF): single; '''inline''';</td></tr> | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''operator''' * ('''const''' pt1, pt2: TPointF): single; '''inline''';</td></tr> | ||
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Scalar product: multiplies ''x'' and ''y'' components and returns the sum</td></tr> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Scalar product (deprecated): multiplies ''x'' and ''y'' components and returns the sum</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''operator''' * ('''const''' pt1: TPointF | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''operator''' ** ('''const''' pt1, pt2: TPointF): single; '''inline''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Scalar product: multiplies ''x'' and ''y'' components and returns the sum</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''operator''' * ( | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''operator''' * ('''const''' pt1: TPointF; factor: single): TPointF; '''inline''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Multiplies both ''x'' and ''y'' by ''factor''. It scales the vector represented by (''x'',''y'')</td></tr> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Multiplies both ''x'' and ''y'' by ''factor''. It scales the vector represented by (''x'', ''y'')</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''operator''' * (factor: single; '''const''' pt1: TPointF): TPointF; '''inline''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Multiplies both ''x'' and ''y'' by ''factor''. It scales the vector represented by (''x'', ''y'')</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' VectLen( | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' VectLen('''const''' dx,dy: single): single; '''overload'''; '''inline''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the length of the vector | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the length of the vector (''dx'', ''dy'')</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' VectLen('''const''' v: TPointF): single; '''overload''';</td></tr> |
− | <tr | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the length of the vector represented by (''x'', ''y'')</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' VectDet('''const''' v1,v2: TPointF): double; '''inline''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes the determinant of the two vectors (equal to the determinant of the square matrix with those vectors as columns)</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr style="background: #f0f0ff;"><td colspan="3">''TPointFHelper'' = '''record''' '''helper''' '''for''' TPointF</td></tr> |
− | <tr | + | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Helper for TPointF structure providing additional functionality for point manipulation</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' PolylineLen('''const''' pts: '''array''' '''of''' TPointF; AClosed: boolean = false): single;</td></tr> | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' Offset('''const''' apt: TPointF); '''overload''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Offsets the point by another point (TPointF)</td></tr> |
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' Offset('''const''' apt: TPoint); '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Offsets the point by another point (TPoint)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' Offset(dx, dy: longint); '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Offsets the point by specified distances in the X (''dx'') and Y (''dy'') directions (integer values)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' Offset(dx, dy: single); '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Offsets the point by specified distances in the X (''dx'') and Y (''dy'') directions (single values)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' Scale(AScale: single);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Scales the point as a vector from the origin) by a specified factor</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' Normalize;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Normalizes the point (modifies it to a unit length)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' Ceiling: TPoint;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Rounds the coordinates of the point to the nearest integer towards positive infinity</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' Truncate: TPoint;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Truncates the coordinates of the point, discarding fractional part</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' Floor: TPoint;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Rounds the coordinates of the point to the nearest integer towards negative infinity</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' Round: TPoint;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Rounds the coordinates of the point to the nearest integer</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' Length: Single;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Calculates the length (magnitude) of the point from the origin</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' IsEmpty: boolean;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Determines if the point is empty (has special coordinates EmptyPointF)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: white;"><td colspan="3">''ArrayOfTPointF'' = '''array''' '''of''' TPointF;</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Contains an array of points with single-precision floating point coordinates</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' PointsF('''const''' pts: '''array''' '''of''' TPointF): ArrayOfTPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Creates an array of TPointF</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' ConcatPointsF('''const''' APolylines: '''array''' '''of''' ArrayOfTPointF; AInsertEmptyPointInBetween: boolean = false): ArrayOfTPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Concatenates arrays of TPointF</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' PolylineLen('''const''' pts: '''array''' '''of''' TPointF; AClosed: boolean = false): single;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Compute the length of the polyline contained in the array. ''AClosed'' specifies if the last point is to be joined to the first one</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: white;"><td colspan="3">''TAffineMatrix'' = '''array'''[1..2,1..3] '''of''' single;</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">An affine matrix contains three 2D vectors: the image of x, the image of y and the translation</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">''TRectF'' = BGRAClasses.TRectF;</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Represents a rectangle with single-precision floating point coordinates</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''const''' EmptyRectF : TRectF = (left:0; top:0; right:0; bottom: 0);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">A constant representing an empty rectangle with all coordinates set to 0</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' RectF(Left, Top, Right, Bottom: Single): TRectF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Creates a TRectF structure with specified left, top, right, and bottom coordinates</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' RectF('''const''' ATopLeft,ABottomRight: TPointF): TRectF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Creates a TRectF structure from two TPointF points representing the top-left and bottom-right corners</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' RectF('''const''' ARect: TRect): TRectF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Creates a TRectF structure from a TRect structure (integer coordinates converted to single precision)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' RectWithSizeF(left,top,width,height: Single): TRectF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Creates a TRectF structure with a specified position (left, top) and size (width, height)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' IsEmptyRectF('''const''' ARect:TRectF): boolean;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Checks if the given TRectF structure is empty (of zero size)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''const''' EmptyRect : TRect = (left:0; top:0; right:0; bottom: 0);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">A value for an empty rectangle with integer coordinates</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' PtInRect('''const''' pt: TPoint; r: TRect): boolean; '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">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.</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' RectWithSize(left,top,width,height: integer): TRect;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Creates a rectangle with integer coordinates with the specified ''width'' and ''height''</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">''TRectHelper'' = '''record''' '''helper''' '''for''' TRect</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Helper for TRect structure providing additional functionality to manipulate rectangles</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetHeight: integer;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Gets the height of the rectangle</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetIsEmpty: boolean;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Determines if the rectangle is empty (of zero size)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetWidth: integer;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Gets the width of the rectangle</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' SetHeight(AValue: integer);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the height of the rectangle</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' SetWidth(AValue: integer);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the width of the rectangle</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''constructor''' Create(Origin: TPoint; AWidth, AHeight: Longint); '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Creates a rectangle with specified origin, width, and height</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''constructor''' Create(ALeft, ATop, ARight, ABottom: Longint); '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Creates a rectangle with specified left, top, right, and bottom coordinates</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' Intersect(R: TRect);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Modifies the rectangle to be the intersection of itself and another rectangle</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''class''' '''function''' Intersect(R1: TRect; R2: TRect): TRect; static;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the intersection of two given rectangles</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' IntersectsWith(R: TRect): Boolean;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Checks if the rectangle intersects with another rectangle</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''class''' '''function''' Union(R1, R2: TRect): TRect; static;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the smallest rectangle that contains both of the given rectangles</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' Union(R: TRect);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Modifies the rectangle to be the union of itself and another rectangle</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' Offset(DX, DY: Longint);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Offsets the rectangle by the given distances in the X and Y directions</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' Inflate(DX, DY: Longint);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Expands or contracts the rectangle by the specified amounts in both directions</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' Contains('''const''' APoint: TPoint): boolean; '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Checks if the rectangle contains a specified point</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' Contains('''const''' ARect: TRect): boolean; '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Checks if the rectangle completely contains another rectangle</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' Width: integer '''read''' GetWidth '''write''' SetWidth;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Property to get or set the width of the rectangle</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' Height: integer '''read''' GetHeight '''write''' SetHeight;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Property to get or set the height of the rectangle</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' IsEmpty: boolean '''read''' GetIsEmpty;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Property to check if the rectangle is empty</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">''TSize'' = BGRAClasses.TSize;</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Constains a size with integer with and height</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: white;"><td colspan="3">''TSizeHelper'' = '''record''' '''helper''' '''for''' TSize</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Helper to access a size</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetHeight: integer;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Gets the height of the size</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetWidth: integer;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Gets the width of the size</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' Width: integer '''read''' GetWidth;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Property to get the width</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' Height: integer '''read''' GetHeight;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Property to get the height</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">''PRectF'' = ^TRectF;</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Pointer to a TRectF structure</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: white;"><td colspan="3">''TRectFHelper'' = '''record''' '''helper''' '''for''' TRectF</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Helper for TRectF structure providing additional functionality for rectangle manipulation</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''class''' '''function''' Intersect('''const''' R1: TRectF; '''const''' R2: TRectF): TRectF; '''overload'''; static;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the intersection of two given rectangles</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''class''' '''function''' Union('''const''' R1: TRectF; '''const''' R2: TRectF): TRectF; '''overload'''; static;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the union of two given rectangles</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''class''' '''function''' Union('''const''' R1: TRectF; '''const''' R2: TRectF; ADiscardEmpty: boolean): TRectF; '''overload'''; static;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the union of two given rectangles, with an option to ignore empty rectangles</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' Union('''const''' r: TRectF): TRectF; '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the union of itself and another rectangle</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' Union('''const''' r: TRectF; ADiscardEmpty: boolean): TRectF; '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the union of itself and another rectangle, with an option to ignore empty rectangles</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' Include('''const''' APoint: TPointF);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Expands the rectangle to include a specified point (empty points are ignored)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' Contains('''const''' APoint: TPointF; AIncludeBottomRight: boolean = false): boolean;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Checks if the rectangle contains a specified point, with an option to include or exclude the bottom-right boundary</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' IntersectsWith('''const''' r: TRectF): boolean;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Checks if the rectangle intersects with another rectangle</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' IsEmpty: boolean;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Determines if the rectangle is empty (of zero size)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: white;"><td colspan="3">''TAffineBox'' = '''object'''</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Object representing an affine box, defined by three corner points (top-left, top-tight, bottom-left)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetAsPolygon: ArrayOfTPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves the affine box as an array of points (polygon representation)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetBottomRight: TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Gets the bottom-right corner of the affine box</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetCenter: TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Calculates the center point of the affine box</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetHeight: single;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Calculates the height of the affine box</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetIsEmpty: boolean;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Determines if the affine box is empty (one of the point being empty, not just of zero size)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetRectBounds: TRect;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Gets the bounding rectangle of the affine box as TRect</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetRectBoundsF: TRectF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Gets the bounding rectangle of the affine box as TRectF</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetSurface: single;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Calculates the surface area of the affine box</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetWidth: single;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Calculates the width of the affine box</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''TopLeft'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Top-left corner of the affine box</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''TopRight'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Top-right corner of the affine box</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''BottomLeft'': TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Bottom-left corner of the affine box</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''class''' '''function''' EmptyBox: TAffineBox; static;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Creates an empty affine box</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''class''' '''function''' AffineBox(ATopLeft, ATopRight, ABottomLeft: TPointF): TAffineBox; '''overload'''; static;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Creates an affine box defined by three corner points</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''class''' '''function''' AffineBox(ARectF: TRectF): TAffineBox; '''overload'''; static;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Creates an affine box from a TRectF structure</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' Offset(AOfsX, AOfsY: single); '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Offsets the affine box by specified X and Y amounts</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' Offset(AOfs: TPointF); '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Offsets the affine box by a specified point</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' Inflate(AHoriz, AVert: single);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Inflates the affine box along its axes by specified horizontal and vertical amounts</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' Contains(APoint: TPointF): boolean;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Checks if a point is contained within the affine box</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' RectBounds: TRect '''read''' GetRectBounds;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Bounding rectangle as TRect</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' RectBoundsF: TRectF '''read''' GetRectBoundsF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Bounding rectangle as TRectF</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' BottomRight: TPointF '''read''' GetBottomRight;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Bottom-right corner of the affine box</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' IsEmpty: boolean '''read''' GetIsEmpty;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Check if the affine box is empty (containing empty points, not just of zero size)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' AsPolygon: ArrayOfTPointF '''read''' GetAsPolygon;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Affine box as an array of points (polygon)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' Width: single '''read''' GetWidth;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Width of the affine box along its axes</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' Height: single '''read''' GetHeight;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Height of the affine box along its axes</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' Surface: single '''read''' GetSurface;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Surface area of the affine box</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' Center: TPointF '''read''' GetCenter;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Center point of the affine box</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">''TFaceCulling'' = (</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Enumerates the modes of face culling in rendering. Face culling is a technique used to determine which faces of a polygon are visible and should be rendered</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''fcNone'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">No face culling is applied. All faces of the polygon are rendered</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''fcKeepCW'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">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</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''fcKeepCCW'');</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">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</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
<tr style="background: #f0f0ff;"><td colspan="3">''TBGRAPenStyle'' = '''array''' '''of''' Single;</td></tr> | <tr style="background: #f0f0ff;"><td colspan="3">''TBGRAPenStyle'' = '''array''' '''of''' Single;</td></tr> | ||
Line 88: | Line 388: | ||
<tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The curve expands outside the polygonal envelope (starting and ending points are reached)</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The curve expands outside the polygonal envelope (starting and ending points are reached)</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">''ssVertexToSide'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''ssVertexToSide'',</td></tr> |
<tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The curve is outside the polygonal envelope and there is a tangeant at vertices (starting and ending points are reached)</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The curve is outside the polygonal envelope and there is a tangeant at vertices (starting and ending points are reached)</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr style="background: #f0f0ff;"><td colspan="3">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''ssEasyBezier'');</td></tr> |
− | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Definition of a | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The curve is rounded using Bezier curves when the angle is less than or equal to 45°</td></tr> |
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: white;"><td colspan="3">''PArcDef'' = ^TArcDef;</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Pointer to an arc definition</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">''TArcDef'' = '''record'''</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Definition of an arc of an ellipse</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''center'': TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Center of the ellipse</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''radius'': TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Horizontal and vertical of the ellipse before rotation</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''xAngleRadCW'': single;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Rotation of the ellipse</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''startAngleRadCW'', endAngleRadCW: single;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Start and end angle, in radian and clockwise. See angle convention in BGRAPath</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''anticlockwise'': boolean</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Specifies if the arc goes anticlockwise</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' ArcDef(cx, cy, rx,ry, xAngleRadCW, startAngleRadCW, endAngleRadCW: single; anticlockwise: boolean) : TArcDef;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Creates a structure for an arc definition</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: white;"><td colspan="3">''TArcOption'' = (</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Possible options for drawing an arc of an ellipse (used in BGRACanvas)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''aoClosePath'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Close the path by joining the ending and starting point together</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''aoPie'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Draw a pie shape by joining the ending and starting point to the center of the ellipse</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''aoFillPath'');</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Fills the shape</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''TArcOptions'' = set '''of''' TArcOption;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Set of options for drawing an arc</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">''TBGRAArrowStyle'' = (</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Enumerates different styles of arrows that can be used in graphic rendering. Each style represents a unique visual appearance for arrowheads or tails</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''asNone'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">No arrow style. This option indicates that no arrowhead or tail is to be rendered</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''asNormal'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">A normal arrow style, representing a standard arrowhead with an angle</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''asCut'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">A cut arrow style, where the edge of the arrow are cut instead of using the pen end cap</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''asTriangle'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">A triangle arrow style, forming a simple triangular arrowhead</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''asHollowTriangle'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">A hollow triangle arrow style, similar to ''asTriangle'' but with an unfilled center</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''asFlipped'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">A flipped arrow style, where the arrowhead points in the opposite direction to the normal style</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''asFlippedCut'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">A flipped cut arrow style, combining the aspects of ''asFlipped'' and ''asCut''</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''asTail'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">A small tail, typically used to depict the starting point of an arrow</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''asTailRepeat'');</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">A tail repeat arrow style, depicting a series of repeated patterns typically used for the starting point of an arrow</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">''TBGRACustomArrow'' = '''class'''</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Generic class configuring and rendering an arrow</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetEndOffsetX: single; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves the X-offset for the end of the arrow</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetEndRepeatCount: integer; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves the repeat count for the end symbol</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetEndSizeFactor: TPointF; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves the size factor for the end of the arrow</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetIsEndDefined: boolean; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Determines if the end of the arrow is defined</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetIsStartDefined: boolean; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Determines if the start of the arrow is defined</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetStartOffsetX: single; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves the X-offset for the start of the arrow</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetStartRepeatCount: integer; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves the repeat count for the start symbol</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetStartSizeFactor: TPointF; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves the size factor for the start of the arrow</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' SetEndOffsetX(AValue: single); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the X-offset for the end of the arrow</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' SetEndRepeatCount(AValue: integer); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the repeat count for the end symbol</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' SetEndSizeFactor(AValue: TPointF); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the size factor for the end of the arrow</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' SetStartOffsetX(AValue: single); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the X-offset for the start of the arrow</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' SetStartRepeatCount(AValue: integer); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the repeat count for the start symbol</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' SetStartSizeFactor(AValue: TPointF); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the size factor for the start of the arrow</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetLineCap: TPenEndCap; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves the line cap style for the classic arrow</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' SetLineCap(AValue: TPenEndCap); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the line cap style for the classic arrow</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' ComputeStartAt('''const''' APosition, ADirection: TPointF; '''const''' AWidth, ACurrentPos: single): ArrayOfTPointF; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes the start of the arrow at a given position and direction</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' ComputeEndAt('''const''' APosition, ADirection: TPointF; '''const''' AWidth, ACurrentPos: single): ArrayOfTPointF; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes the end of the arrow at a given position and direction</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' StartAsNone; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the start of the arrow to no style</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' StartAsClassic(AFlipped: boolean = false; ACut: boolean = false; ARelativePenWidth: single = 1); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the start of the arrow to a classic style</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' StartAsTriangle(ABackOffset: single = 0; ARounded: boolean = false; AHollow: boolean = false; AHollowPenWidth: single = 0.5); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the start of the arrow to a triangle style</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' StartAsTail; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the start of the arrow to a tail style</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' EndAsNone; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the end of the arrow to no style</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' EndAsClassic(AFlipped: boolean = false; ACut: boolean = false; ARelativePenWidth: single = 1); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the end of the arrow to a classic style</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' EndAsTriangle(ABackOffset: single = 0; ARounded: boolean = false; AHollow: boolean = false; AHollowPenWidth: single = 0.5); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the end of the arrow to a triangle style</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' EndAsTail; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the end of the arrow to a tail style</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' IsStartDefined: boolean '''read''' GetIsStartDefined;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Check if the start of the arrow is defined</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' IsEndDefined: boolean '''read''' GetIsEndDefined;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Check if the end of the arrow is defined</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' StartOffsetX: single '''read''' GetStartOffsetX '''write''' SetStartOffsetX;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">X-offset for the start of the arrow</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' EndOffsetX: single '''read''' GetEndOffsetX '''write''' SetEndOffsetX;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">X-offset for the end of the arrow</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' LineCap: TPenEndCap '''read''' GetLineCap '''write''' SetLineCap;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Line cap style</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' StartSize: TPointF '''read''' GetStartSizeFactor '''write''' SetStartSizeFactor;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Size factor for the start of the arrow</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' EndSize: TPointF '''read''' GetEndSizeFactor '''write''' SetEndSizeFactor;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Size factor for the end of the arrow</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' StartRepeatCount: integer '''read''' GetStartRepeatCount '''write''' SetStartRepeatCount;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Repeat count for the start symbol</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' EndRepeatCount: integer '''read''' GetEndRepeatCount '''write''' SetEndRepeatCount;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Repeat count for the end symbol</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">''TBGRACustomPenStroker'' = '''class'''</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Generic class representing a pen stroker, used for drawing and styling lines with various attributes</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetArrow: TBGRACustomArrow; '''virtual'''; '''abstract''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves the arrow style used at both ends of strokes</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetArrowOwned: boolean; '''virtual'''; '''abstract''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Determines if the arrow is owned (managed) by the pen stroker</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetCustomPenStyle: TBGRAPenStyle; '''virtual'''; '''abstract''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Gets the custom pen style</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetJoinStyle: TPenJoinStyle; '''virtual'''; '''abstract''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves the style of line joins (e.g., bevel, miter)</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetLineCap: TPenEndCap; '''virtual'''; '''abstract''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves the line cap style (e.g., butt, round)</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetMiterLimit: single; '''virtual'''; '''abstract''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Gets the miter limit for line joins</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetPenStyle: TPenStyle; '''virtual'''; '''abstract''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves the standard pen style</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetStrokeMatrix: TAffineMatrix; '''virtual'''; '''abstract''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Gets the stroke transformation matrix (applied only to stroke and not to path points)</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">''' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' SetArrow(AValue: TBGRACustomArrow); '''virtual'''; '''abstract''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the arrow style used at both ends of strokes</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' SetArrowOwned(AValue: boolean); '''virtual'''; '''abstract''';</td></tr> |
− | <tr | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets whether the arrow is owned by the pen stroker</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' SetCustomPenStyle(AValue: TBGRAPenStyle); '''virtual'''; '''abstract''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the custom pen style</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' SetJoinStyle(AValue: TPenJoinStyle); '''virtual'''; '''abstract''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the style of line joins</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' SetLineCap(AValue: TPenEndCap); '''virtual'''; '''abstract''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the line cap style</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' SetMiterLimit(AValue: single); '''virtual'''; '''abstract''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the miter limit for line joins</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' SetPenStyle(AValue: TPenStyle); '''virtual'''; '''abstract''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the standard pen style</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' SetStrokeMatrix('''const''' AValue: TAffineMatrix); '''virtual'''; '''abstract''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the stroke transformation matrix (applied only to stroke and not to path points)</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' ComputePolyline('''const''' APoints: '''array''' '''of''' TPointF; AWidth: single; AClosedCap: boolean = true): ArrayOfTPointF; '''overload'''; '''virtual'''; '''abstract''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes a | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes a polyline with the given points and width, optionally closing the cap</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' ComputePolyline('''const''' APoints: '''array''' '''of''' TPointF; AWidth: single; APenColor: TBGRAPixel; AClosedCap: boolean = true): ArrayOfTPointF; '''overload'''; '''virtual'''; '''abstract''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes a polyline with the given points, width, and pen color, optionally closing the cap</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' ComputePolylineAutoCycle('''const''' APoints: '''array''' '''of''' TPointF; AWidth: single): ArrayOfTPointF; '''virtual'''; '''abstract''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes a polyline with automatic cycling of points and given width</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' ComputePolygon('''const''' APoints: '''array''' '''of''' TPointF; AWidth: single): ArrayOfTPointF; '''virtual'''; '''abstract''';</td></tr> |
− | <tr | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes a polygon with the given points and width</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' Style: TPenStyle '''read''' GetPenStyle '''write''' SetPenStyle;</td></tr> |
− | <tr | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Standard pen style</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' CustomPenStyle: TBGRAPenStyle '''read''' GetCustomPenStyle '''write''' SetCustomPenStyle;</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Custom pen style (with given dash and gap lengths)</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' Arrow: TBGRACustomArrow '''read''' GetArrow '''write''' SetArrow;</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Arrow style at both ends of strokes</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' ArrowOwned: boolean '''read''' GetArrowOwned '''write''' SetArrowOwned;</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Is the arrow is owned by the pen stroker</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' StrokeMatrix: TAffineMatrix '''read''' GetStrokeMatrix '''write''' SetStrokeMatrix;</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Stroke transformation matrix (applied only to stroke and not to path points)</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' LineCap: TPenEndCap '''read''' GetLineCap '''write''' SetLineCap;</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Line cap style</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">''' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' JoinStyle: TPenJoinStyle '''read''' GetJoinStyle '''write''' SetJoinStyle;</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Join style of lines</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' MiterLimit: single '''read''' GetMiterLimit '''write''' SetMiterLimit;</td></tr> |
− | <tr | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Miter limit for line joins</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr style="background: white;"><td colspan="3">''PPoint3D'' = ^TPoint3D;</td></tr> |
− | <tr | + | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Pointer to a TPoint3D structure</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr style="background: #f0f0ff;"><td colspan="3">''TPoint3D'' = '''record'''</td></tr> |
− | <tr | + | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Point in 3D with single-precision floating point coordinates</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' Offset('''const''' point3D: TPoint3D);</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Offsets the point by the given 3D vector</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' Scale(AScale: single);</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Scale the point (as a vector from the origin)</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' Point3D(x,y,z: single): TPoint3D;</td></tr> |
− | <tr | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Creates a new structure with values (''x'', ''y'', ''z'')</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''operator''' = ('''const''' v1,v2: TPoint3D): boolean; '''inline''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Checks if all components ''x'', ''y'' and ''z'' are equal</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''operator''' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''operator''' + ('''const''' v1,v2: TPoint3D): TPoint3D; '''inline''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Adds components separately. It is like adding vectors</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''operator''' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''operator''' - ('''const''' v1,v2: TPoint3D): TPoint3D; '''inline''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Subtract components separately. It is like subtracting vectors</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''operator''' - ('''const''' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''operator''' - ('''const''' v: TPoint3D): TPoint3D; '''inline''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns a point with opposite values for all components</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''operator''' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''operator''' * ('''const''' v1,v2: TPoint3D): single; '''inline''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Scalar product: multiplies components and returns the sum</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''operator''' * ('''const''' v1 | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''operator''' * ('''const''' v1: TPoint3D; '''const''' factor: single): TPoint3D; '''inline''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Multiplies components by ''factor''. It scales the vector represented by (''x'', ''y'', ''z'')</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''operator''' * ('''const''' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''operator''' * ('''const''' factor: single; '''const''' v1: TPoint3D): TPoint3D; '''inline''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Multiplies components by ''factor''. It scales the vector represented by (''x'',''y'',''z'')</td></tr> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Multiplies components by ''factor''. It scales the vector represented by (''x'', ''y'', ''z'')</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">''' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' VectProduct3D(u,v: TPoint3D; '''out''' w: TPoint3D);</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes the vectorial product ''w''. It is perpendicular to both ''u'' and ''v''</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' Normalize3D('''var''' v: TPoint3D); '''inline''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Normalize the vector, i.e. scale it so that its length be 1</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">''' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' VectLen3D('''const''' v: TPoint3D): single;</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes the length of the vector from the origin to the point</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
<tr style="background: #f0f0ff;"><td colspan="3">''TLineDef'' = '''record'''</td></tr> | <tr style="background: #f0f0ff;"><td colspan="3">''TLineDef'' = '''record'''</td></tr> | ||
Line 232: | Line 712: | ||
<tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Vector indicating the direction</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Vector indicating the direction</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' IntersectLine(line1, line2: TLineDef): TPointF;</td></tr> | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' IntersectLine(line1, line2: TLineDef): TPointF; '''overload''';</td></tr> |
<tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes the intersection of two lines. If they are parallel, returns the middle of the segment between the two origins</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes the intersection of two lines. If they are parallel, returns the middle of the segment between the two origins</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' IntersectLine(line1, line2: TLineDef; '''out''' parallel: boolean): TPointF;</td></tr> | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' IntersectLine(line1, line2: TLineDef; '''out''' parallel: boolean): TPointF; '''overload''';</td></tr> |
<tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">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</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">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</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
<tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' IsConvex('''const''' pts: '''array''' '''of''' TPointF; IgnoreAlign: boolean = true): boolean;</td></tr> | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' IsConvex('''const''' pts: '''array''' '''of''' TPointF; IgnoreAlign: boolean = true): boolean;</td></tr> | ||
<tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">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</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">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</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' IsClockwise('''const''' pts: '''array''' '''of''' TPointF): boolean;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Checks if the points follow a clockwise curve</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' IsMostlyClockwise('''const''' pts: '''array''' '''of''' TPointF): boolean;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Checks if the curve is clockwise on the whole but accepting some counter-clockwise points</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
<tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' DoesQuadIntersect(pt1,pt2,pt3,pt4: TPointF): boolean;</td></tr> | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' DoesQuadIntersect(pt1,pt2,pt3,pt4: TPointF): boolean;</td></tr> | ||
Line 246: | Line 732: | ||
<tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' DoesSegmentIntersect(pt1,pt2,pt3,pt4: TPointF): boolean;</td></tr> | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' DoesSegmentIntersect(pt1,pt2,pt3,pt4: TPointF): boolean;</td></tr> | ||
<tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Checks if two segment intersect</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Checks if two segment intersect</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">''TBGRAPathDrawProc'' = '''procedure'''('''const''' APoints: '''array''' '''of''' TPointF; AClosed: boolean; AData: Pointer) '''of''' '''object''';</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Callback function when rendering a stroke</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: white;"><td colspan="3">''TBGRAPathFillProc'' = '''procedure'''('''const''' APoints: '''array''' '''of''' TPointF; AData: pointer) '''of''' '''object''';</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Callback function when filling a shape</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
<tr style="background: #f0f0ff;"><td colspan="3">''IBGRAPath'' = '''interface'''</td></tr> | <tr style="background: #f0f0ff;"><td colspan="3">''IBGRAPath'' = '''interface'''</td></tr> | ||
Line 253: | Line 745: | ||
<tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Closes the current path with a line to the starting point</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Closes the current path with a line to the starting point</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' moveTo( | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' moveTo(constref pt: TPointF);</td></tr> |
<tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Moves to a location, disconnected from previous points</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Moves to a location, disconnected from previous points</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' lineTo( | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' lineTo(constref pt: TPointF);</td></tr> |
<tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Adds a line from the current point</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Adds a line from the current point</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
Line 262: | Line 754: | ||
<tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Adds a polyline from the current point</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Adds a polyline from the current point</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' quadraticCurveTo( | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' quadraticCurveTo(constref cp,pt: TPointF);</td></tr> |
<tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Adds a quadratic Bézier curve from the current point</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Adds a quadratic Bézier curve from the current point</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' bezierCurveTo( | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' bezierCurveTo(constref cp1,cp2,pt: TPointF);</td></tr> |
<tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Adds a cubic Bézier curve from the current point</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Adds a cubic Bézier curve from the current point</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' arc( | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' arc(constref arcDef: TArcDef);</td></tr> |
<tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Adds an arc. If there is a current point, it is connected to the beginning of the arc</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Adds an arc. If there is a current point, it is connected to the beginning of the arc</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
Line 280: | Line 772: | ||
<tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Copy the content of this path to the specified destination</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Copy the content of this path to the specified destination</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' getPoints: ArrayOfTPointF;</td></tr> | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' getPoints: ArrayOfTPointF; '''overload''';</td></tr> |
<tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the content of the path as an array of points</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the content of the path as an array of points</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' getCursor: TBGRACustomPathCursor;</td></tr> | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' getPoints(AMatrix: TAffineMatrix): ArrayOfTPointF; '''overload''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the content of the path as an array of points with the transformation specified by ''AMatrix''</td></tr> |
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' stroke(ADrawProc: TBGRAPathDrawProc; AData: pointer); '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Calls a given draw procedure for each sub path with computed coordinates for rendering</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' stroke(ADrawProc: TBGRAPathDrawProc; '''const''' AMatrix: TAffineMatrix; AData: pointer); '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Calls a given draw procedure for each sub path with computed coordinates using given ''AMatrix'' transformation</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' fill(AFillProc: TBGRAPathFillProc; AData: pointer); '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Calls a given fill procedure for each sub path with computed coordinates for rendering</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' fill(AFillProc: TBGRAPathFillProc; '''const''' AMatrix: TAffineMatrix; AData: pointer); '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Calls a given fill procedure for each sub path with computed coordinates using given ''AMatrix'' transformation</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' getCursor: TBGRACustomPathCursor;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns a cursor to go through the path. The cursor must be freed by calling ''Free''.</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">''TBGRACustomPath'' = '''class'''(IBGRAPath)</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Generic class representing a path, providing methods for creation, exploration and rendering</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''constructor''' Create; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Constructor to create a custom path. Must be overridden in subclasses</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' beginPath; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Begins a new path</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' closePath; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Closes the current path</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' moveTo(constref pt: TPointF); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Moves the current point to a specified location, starting a new sub-path</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' lineTo(constref pt: TPointF); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Adds a line from the current point to a specified point</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' polylineTo('''const''' pts: '''array''' '''of''' TPointF); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Adds a series of lines to the path based on an array of points</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' quadraticCurveTo(constref cp, pt: TPointF); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Adds a quadratic Bézier curve to the path</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' bezierCurveTo(constref cp1, cp2, pt: TPointF); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Adds a cubic Bézier curve to the path</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' arc(constref arcDef: TArcDef); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Adds an arc to the path based on an arc definition</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' openedSpline('''const''' pts: '''array''' '''of''' TPointF; style: TSplineStyle); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Adds an open spline to the path based on a series of points and a spline style</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' closedSpline('''const''' pts: '''array''' '''of''' TPointF; style: TSplineStyle); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Adds a closed spline to the path based on a series of points and a spline style</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' copyTo(dest: IBGRAPath); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Copies the path to another path object</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' getPoints: ArrayOfTPointF; '''overload'''; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves the points of the path</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' getPoints(AMatrix: TAffineMatrix): ArrayOfTPointF; '''overload'''; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves the points of the path, transformed by a specified matrix</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' stroke(ADrawProc: TBGRAPathDrawProc; AData: pointer); '''overload'''; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Strokes the path with a specified drawing procedure</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' stroke(ADrawProc: TBGRAPathDrawProc; '''const''' AMatrix: TAffineMatrix; AData: pointer); '''overload'''; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Strokes the path with a specified drawing procedure and transformation matrix</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' fill(AFillProc: TBGRAPathFillProc; AData: pointer); '''overload'''; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Fills the path with a specified filling procedure</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' fill(AFillProc: TBGRAPathFillProc; '''const''' AMatrix: TAffineMatrix; AData: pointer); '''overload'''; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Fills the path with a specified filling procedure and transformation matrix</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' getLength: single; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves the length of the path</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' getCursor: TBGRACustomPathCursor; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves a cursor for navigating the path</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: white;"><td colspan="3">''TBGRAPathAny'' = '''class''' '''of''' TBGRACustomPath;</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Type for specifying any derived class of TBGRACustomPath</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">''TBGRACustomPathCursor'' = '''class'''</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Class that contains a cursor to browse an existing path</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetArcPos: single; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves the current position from the start</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetCurrentCoord: TPointF; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the current coordinate in the path</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetCurrentTangent: TPointF; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the tangent vector to the current position</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetLoopClosedShapes: boolean; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves if the cursor loops when there is a closed shape</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetLoopPath: boolean; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves if the cursor loops at the end of the whole path</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetPathLength: single; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retreive the full arc length of the path</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetBounds: TRectF; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Compute the bounds of the path</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetStartCoordinate: TPointF; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Starting coordinate of the path</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' SetArcPos(AValue: single); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the current position from the start</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' SetLoopClosedShapes(AValue: boolean); '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets if the cursor loops when there is a closed shape</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' SetLoopPath(AValue: boolean); '''virtual'''; '''abstract''';</td></tr> |
− | <tr | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets if the cursor loops at the end of the whole path</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
<tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' MoveForward(ADistance: single; ACanJump: boolean = true): single; '''virtual'''; '''abstract''';</td></tr> | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' MoveForward(ADistance: single; ACanJump: boolean = true): single; '''virtual'''; '''abstract''';</td></tr> | ||
Line 295: | Line 901: | ||
<tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">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''</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">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''</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' CurrentCoordinate: TPointF '''read''';</td></tr> | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' CurrentCoordinate: TPointF '''read''' GetCurrentCoord;</td></tr> |
<tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the current coordinate in the path</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the current coordinate in the path</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' CurrentTangent: TPointF '''read''';</td></tr> | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' CurrentTangent: TPointF '''read''' GetCurrentTangent;</td></tr> |
<tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">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)</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">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)</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' Position: single '''read''' '''write''';</td></tr> | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' Position: single '''read''' GetArcPos '''write''' SetArcPos;</td></tr> |
<tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Current position in the path, as a distance along the arc from the starting point of the path</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Current position in the path, as a distance along the arc from the starting point of the path</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' PathLength: single '''read''';</td></tr> | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' PathLength: single '''read''' GetPathLength;</td></tr> |
<tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Full arc length of the path</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Full arc length of the path</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' StartCoordinate: TPointF '''read''';</td></tr> | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' StartCoordinate: TPointF '''read''' GetStartCoordinate;</td></tr> |
<tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Starting coordinate of the path</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Starting coordinate of the path</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' LoopClosedShapes: boolean '''read''' '''write''';</td></tr> | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' LoopClosedShapes: boolean '''read''' GetLoopClosedShapes '''write''' SetLoopClosedShapes;</td></tr> |
<tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Specifies if the cursor loops when there is a closed shape</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Specifies if the cursor loops when there is a closed shape</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' LoopPath: boolean '''read''' '''write''';</td></tr> | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' LoopPath: boolean '''read''' GetLoopPath '''write''' SetLoopPath;</td></tr> |
<tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">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</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">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</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr style="background: white;"><td colspan="3">'' | + | <tr style="background: white;"><td colspan="3">''BGRAPathFactory'': TBGRAPathAny;</td></tr> |
− | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2"> | + | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Factory provided to create a TBGRAPath object</td></tr> |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
<tr style="background: #f0f0ff;"><td colspan="3">''TRoundRectangleOption'' = (</td></tr> | <tr style="background: #f0f0ff;"><td colspan="3">''TRoundRectangleOption'' = (</td></tr> | ||
Line 341: | Line 941: | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
<tr style="background: white;"><td colspan="3">''TPolygonOrder'' = (</td></tr> | <tr style="background: white;"><td colspan="3">''TPolygonOrder'' = (</td></tr> | ||
− | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Order of polygons when rendered using | + | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Order of polygons when rendered using TBGRAMultiShapeFiller (in unit BGRAPolygon)</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
<tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''poNone'',</td></tr> | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''poNone'',</td></tr> | ||
Line 354: | Line 954: | ||
<tr style="background: white;"><td colspan="3">''TIntersectionInfo'' = '''class'''</td></tr> | <tr style="background: white;"><td colspan="3">''TIntersectionInfo'' = '''class'''</td></tr> | ||
<tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Contains an intersection between an horizontal line and any shape. It is used when filling shapes</td></tr> | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Contains an intersection between an horizontal line and any shape. It is used when filling shapes</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''interX'': single;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Horizontal position of the intersection</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''winding'': integer;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Winding count</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''numSegment'': integer;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Number identifying the current segment where the intersection was found</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' SetValues(AInterX: Single; AWinding, ANumSegment: integer);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the position and other information about the intersection</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
<tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''ArrayOfTIntersectionInfo'' = '''array''' '''of''' TIntersectionInfo;</td></tr> | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''ArrayOfTIntersectionInfo'' = '''array''' '''of''' TIntersectionInfo;</td></tr> | ||
Line 371: | Line 983: | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
<tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' CreateIntersectionArray: ArrayOfTIntersectionInfo; '''virtual'''; '''abstract''';</td></tr> | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' CreateIntersectionArray: ArrayOfTIntersectionInfo; '''virtual'''; '''abstract''';</td></tr> | ||
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Create an array that will contain computed intersections. To augment that array, use | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Create an array that will contain computed intersections. To augment that array, use CreateIntersectionInfo for new items</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
<tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' CreateIntersectionInfo: TIntersectionInfo; '''virtual'''; '''abstract''';</td></tr> | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' CreateIntersectionInfo: TIntersectionInfo; '''virtual'''; '''abstract''';</td></tr> | ||
Line 382: | Line 994: | ||
<tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">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</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">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</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr style="background: white;"><td colspan="3">''TGradientType'' = (</td></tr> | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetSliceIndex: integer; '''virtual'''; '''abstract''';</td></tr> |
− | <tr style="background: | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the index of the current slice (horizontal stripe)</td></tr> |
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">''TGradientType'' = (</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Shape of a gradient</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''gtLinear'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The color changes along a certain vector and does not change along its perpendicular direction</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''gtReflected'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The color changes | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The color changes like in ''gtLinear'' however it is symmetrical to a specified direction</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''gtDiamond'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The color changes | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The color changes along a diamond shape</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''gtRadial'',</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The color changes | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The color changes in a radial way from a given center</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: white;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: white;">''gtAngular'');</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The color changes | + | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">The color changes according to the angle relative to a given center</td></tr> |
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'' | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''const''' GradientTypeStr : '''array'''[TGradientType] '''of''' '''string'''</td></tr> |
<tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">List of string to represent gradient types</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">List of string to represent gradient types</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
<tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' StrToGradientType(str: '''string'''): TGradientType;</td></tr> | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' StrToGradientType(str: '''string'''): TGradientType;</td></tr> | ||
<tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the gradient type represented by the given string</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the gradient type represented by the given string</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">''TBGRAGradientGetColorAtFunc'' = '''function'''(position: integer): TBGRAPixel '''of''' '''object''';</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Function type to get the the color at a given integer position</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: white;"><td colspan="3">''TBGRAGradientGetColorAtFloatFunc'' = '''function'''(position: single): TBGRAPixel '''of''' '''object''';</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Function type to get the the color at a given single-precision floating type position</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">''TBGRAGradientGetExpandedColorAtFunc'' = '''function'''(position: integer): TExpandedPixel '''of''' '''object''';</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Function type to get the the expanded color at a given integer position</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: white;"><td colspan="3">''TBGRAGradientGetExpandedColorAtFloatFunc'' = '''function'''(position: single): TExpandedPixel '''of''' '''object''';</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Function type to get the the expanded color at a given single-precision floating type position</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
<tr style="background: #f0f0ff;"><td colspan="3">''TBGRACustomGradient'' = '''class'''</td></tr> | <tr style="background: #f0f0ff;"><td colspan="3">''TBGRACustomGradient'' = '''class'''</td></tr> | ||
Line 409: | Line 1,039: | ||
<tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the color at a given ''position''. The reference range is from 0 to 65535, however values beyond are possible as well</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the color at a given ''position''. The reference range is from 0 to 65535, however values beyond are possible as well</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetColorAtF(position: single): TBGRAPixel; '''virtual''';</td></tr> | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetExpandedColorAt(position: integer): TExpandedPixel; '''virtual''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the color at a given ''position''. The reference range is from 0 to 1, however values beyond are possible as well</td></tr> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the expanded color at a given ''position''. The reference range is from 0 to 65535, however values beyond are possible as well</td></tr> |
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetColorAtF(position: single): TBGRAPixel; '''virtual''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the color at a given ''position''. The reference range is from 0 to 1, however values beyond are possible as well</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetExpandedColorAtF(position: single): TExpandedPixel; '''virtual''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the expanded color at a given ''position''. The reference range is from 0 to 1, however values beyond are possible as well</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
<tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetAverageColor: TBGRAPixel; '''virtual'''; '''abstract''';</td></tr> | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetAverageColor: TBGRAPixel; '''virtual'''; '''abstract''';</td></tr> | ||
<tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the average color of the gradient</td></tr> | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the average color of the gradient</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
− | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' Monochrome: boolean '''read''';</td></tr> | + | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetAverageExpandedColor: TExpandedPixel; '''virtual''';</td></tr> |
− | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;"> | + | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns the average expanded color of the gradient</td></tr> |
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetMonochrome: boolean; '''virtual'''; '''abstract''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Returns whether the gradient has only one color</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' Monochrome: boolean '''read''' GetMonochrome;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">If the gradient contains only one color and thus is not really a gradient</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | </table> | ||
+ | |||
+ | === Bézier curves === | ||
+ | <table style="border-collapse: collapse;"> | ||
+ | <tr style="background: white;"><td colspan="3">''TCubicBezierCurve'' = '''object'''</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">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.</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' SimpleComputePoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Compute the points using the simple approach of computing for each time value</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''p1'': TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Starting point (reached)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''c1'': TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">First control point (not reached by the curve)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''c2'': TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Second control point (not reached by the curve)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''p2'': TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Ending point (reached)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' ComputePointAt(t: single): TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes the point at time ''t'', varying from 0 to 1</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' Split('''out''' ALeft, ARight: TCubicBezierCurve);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Split the curve in two such that ''ALeft.p2'' = ''ARight.p1''</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' ComputeLength(AAcceptedDeviation: single = 0.1): single;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Compute an approximation of the length of the curve. ''AAcceptedDeviation'' indicates the maximum orthogonal distance that is ignored and approximated by a straight line.</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' ToPoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">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</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' CopyToPath(ADest: IBGRAPath);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Copy the curve to the given path</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetBounds: TRectF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes the rectangular bounds</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' BezierCurve(origin, control1, control2, destination: TPointF) : TCubicBezierCurve; '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Creates a structure for a cubic Bézier curve</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">''TQuadraticBezierCurve'' = '''object'''</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Definition of a Bézier curve of order 2. It has one control point</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' SimpleComputePoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Compute the points using the simple approach of computing for each time value</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' ComputeExtremumPositionOutsideSegment: single;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes the position where the curve has its extremum</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''p1'': TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Starting point (reached)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''c'': TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Control point (not reached by the curve)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''p2'': TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Ending point (reached)</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' ComputePointAt(t: single): TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes the point at time ''t'', varying from 0 to 1</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' Split('''out''' ALeft, ARight: TQuadraticBezierCurve);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Split the curve in two such that ''ALeft.p2'' = ''ARight.p1''</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' ComputeLength: single;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Compute the '''exact''' length of the curve</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' ToPoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">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</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' CopyToPath(ADest: IBGRAPath);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Copy the curve to the given path</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetBounds: TRectF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes the rectangular bounds</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' BezierCurve(origin, control, destination: TPointF) : TQuadraticBezierCurve; '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Creates a structure for a quadratic Bézier curve</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' BezierCurve(origin, destination: TPointF) : TQuadraticBezierCurve; '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Creates a structure for a quadratic Bézier curve without curvature</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''ArrayOfSingle'' = '''array''' '''of''' single;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Array of single-precision floating point values</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: white;"><td colspan="3">''TRationalQuadraticBezierCurve'' = '''object'''</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Quasi-standard rational quadratic Bezier curve, defined by three points and a number: p1 = starting point, c = control point, p2 = ending point, weight = weight for the control point. The curve is defined with the function (t in [0;1]): f: t -> ((1-t)^2*p1 + 2*t*(1-t)*weight*c + t^2*p2) / (1-t)^2 + 2*t*(1-t)*weight + t^2) The curve is an arc of: - ellipse when weight in ]-1;1[, - parabola when weight = 1 (classical quadratic Bezier curve), - hyperbola when weight > 1. A negative weight give the complementary curve for its positive counterpart. So when weight <= -1 the curve is discontinuous: - infinite branches of parabola when weight = -1, - infinite branches of hyperbola and symetric hyperbola when weight < -1. 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.</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''p1'', c, p2 : TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Starting, control and ending points</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''weight'' : single;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Weight of control point</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetIsInfinite: boolean;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Checks whether the curve is infinitely long</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' InternalComputePoints(AInfiniteBounds: TRectF; AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Compute points in the general case</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetBoundingPositions(AIncludeFirstAndLast: boolean; ASorted: boolean): ArrayOfSingle;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes the points relevant to compute bounds</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' ComputePointAt(t: single): TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Compute a point at the specified time</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' ComputeLength(AAcceptedDeviation: single = 0.1): single;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Compute the length</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' ToPoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF; '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes the points of the curve</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' ToPoints(AInfiniteBounds: TRectF; AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF; '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes the points of the curve by providing where the infinite curve can stop</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetBounds: TRectF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Compute the rectangular bounds</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' Split('''out''' ALeft, ARight: TRationalQuadraticBezierCurve);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Split into two curves</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' IsInfinite: boolean '''read''' GetIsInfinite;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Is the curve infinitely long</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' BezierCurve(origin, control, destination: TPointF; Aweight:single) : TRationalQuadraticBezierCurve; '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Creates a rational Bézier curve</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: white;"><td colspan="3">''TEasyBezierCurveMode'' = (</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Enumerates modes for handling curves in a Bezier curve sequence</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''cmAuto'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Automatically determines whether to curve or form an angle based on the points' positions</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''cmCurve'',</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Forces a curve at the point</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''cmAngle''</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Forces an angle at the point, meaning the point is reached and forms an angle instead of a curve</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: white;"><td colspan="3">''TEasyBezierPointTransformFunc'' = '''function'''(APoint: PPointF; AData: Pointer): TPointF '''of''' '''object''';</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Function type for transforming Bezier curve points</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">''TEasyBezierCurve'' = '''object'''</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Object representing an easy-to-use Bezier curve, with configurable curve modes and transformation functions</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetCurveMode(AIndex: integer): TEasyBezierCurveMode;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves the curve mode for a specified point index</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetCurveStartPoint: TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Gets the starting point of the curve</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' GetPoint(AIndex: integer): TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Retrieves the point at a specified index</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' GetPointCount: integer;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Gets the total number of points in the curve</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' SetClosed(AValue: boolean);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets whether the curve is closed</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' SetCurveMode(AIndex: integer; AValue: TEasyBezierCurveMode);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the curve mode for a specified point index</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' SetMinimumDotProduct(AValue: single);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the minimum dot product to form a curve instead of an angle</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' SetPoint(AIndex: integer; AValue: TPointF);</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the point at a specified index</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''FCurves'': '''array''' '''of''' '''record'''</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computed Bézier control points</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''FInvalidated'': boolean;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Whether the curve need to be recomputed</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''FPoints'': '''array''' '''of''' '''record'''</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Definition of the curve by the user</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">''FMinimumDotProduct'': single;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Minimum dot product to form a curve instead of an angle</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">''FClosed'': boolean;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Is the curve is closed</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' MaybeCurve(start1, end1, start2, end2: integer): boolean;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">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.</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' ComputeQuadraticCurves;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes the control points for the classical quadratic curve</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' PointTransformNone(APoint: PPointF; {%H-}AData: Pointer): TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Fonction to apply no transformation</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' PointTransformOffset(APoint: PPointF; AData: Pointer): TPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Fonction to apply an offset</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' Init;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Initializes the Bezier curve object</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' Clear;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Clears all points and resets the curve</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' SetPoints(APoints: '''array''' '''of''' TPointF; ACurveMode: TEasyBezierCurveMode); '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the points and curve mode for the entire curve</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' SetPoints(APoints: '''array''' '''of''' TPointF; ACurveMode: '''array''' '''of''' TEasyBezierCurveMode); '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets the points and individual curve modes for each point</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' SetPoints(APoints: '''array''' '''of''' TPointF; ACurveMode: TEasyBezierCurveMode; AStart, ACount: integer); '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets a subset of points and a single curve mode for these points</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' SetPoints(APoints: '''array''' '''of''' TPointF; ACurveMode: '''array''' '''of''' TEasyBezierCurveMode; AStart, ACount: integer); '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Sets a subset of points and individual curve modes for each of these points</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' CopyToPath(ADest: IBGRAPath); '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Copies the Bezier curve to a path object</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''procedure''' CopyToPath(ADest: IBGRAPath; AOffset: TPointF; AReverse: boolean = false); '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Copies the Bezier curve to a path object with an offset and optional reversal</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''procedure''' CopyToPath(ADest: IBGRAPath; ATransformFunc: TEasyBezierPointTransformFunc; ATransformData: Pointer; AReverse: boolean = false); '''overload''';</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Copies the Bezier curve to a path object with a custom transformation</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' Point[AIndex: integer]: TPointF '''read''' GetPoint '''write''' SetPoint;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Coordinates of the points</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' CurveMode[AIndex: integer]: TEasyBezierCurveMode '''read''' GetCurveMode '''write''' SetCurveMode;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Mode to use for each point</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' PointCount: integer '''read''' GetPointCount;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Number of points</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' MinimumDotProduct: single '''read''' FMinimumDotProduct '''write''' SetMinimumDotProduct;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Minimum dot product to form a curve rather than an angle when using ''cmAuto'' mode</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''property''' Closed: boolean '''read''' FClosed '''write''' SetClosed;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Gets or sets whether to close the curve</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''property''' CurveStartPoint: TPointF '''read''' GetCurveStartPoint;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Coordinates of the starting point</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''function''' ToPoints: ArrayOfTPointF;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Converts the Bezier curve into an array of points</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: #f0f0ff;">'''function''' ComputeLength: single;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: #f0f0ff;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Computes the total length of the Bezier curve</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr><td width="10%"></td><td colspan="2" style="background: white;">'''const''' EasyBezierDefaultMinimumDotProduct = 0.707;</td></tr> | ||
+ | <tr><td width="10%"></td><td width="10%" style="background: white;"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;">Minimum dot product, corresponding to approximately 45 degrees, to form a curve instead of an angle</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">'''function''' EasyBezierCurve(APoints: '''array''' '''of''' TPointF; AClosed: boolean; ACurveMode: TEasyBezierCurveMode;</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Create a TEasyBezierCurve object with only one curve mode</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: white;"><td colspan="3">'''function''' EasyBezierCurve(APoints: '''array''' '''of''' TPointF; AClosed: boolean; ACurveMode: '''array''' '''of''' TEasyBezierCurveMode;</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Create a TEasyBezierCurve object with a curve mode for each point</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td colspan="3">'''function''' EasyBezierCurve(APoints: '''array''' '''of''' TPointF; AStart, ACount: integer; AClosed: boolean; ACurveMode: TEasyBezierCurveMode;</td></tr> | ||
+ | <tr style="background: #f0f0ff;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Create a TEasyBezierCurve object with a subsection of the array of points, with only one curve mode</td></tr> | ||
+ | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
+ | <tr style="background: white;"><td colspan="3">'''function''' EasyBezierCurve(APoints: '''array''' '''of''' TPointF; AStart, ACount: integer; AClosed: boolean; ACurveMode: '''array''' '''of''' TEasyBezierCurveMode;</td></tr> | ||
+ | <tr style="background: white;"><td width="10%"></td><td style="border: 1px solid #e0e0a0; background: #ffffe4;" colspan="2">Create a TEasyBezierCurve object with a subsection of the array of points, with a curve mode for each point</td></tr> | ||
<tr style="height: 8px;"><td colspan="3"></td></tr> | <tr style="height: 8px;"><td colspan="3"></td></tr> | ||
</table> | </table> |
Revision as of 15:13, 13 December 2023
Here are all the basic geometry types used in BGRABitmap library. They are provided by BGRABitmapTypes unit.
Geometry types
TPoint = BGRAClasses.TPoint; | ||
Represents a point with X and Y integer coordinates | ||
const EmptyPoint : TPoint = (X: -2147483648; Y: -2147483648); | ||
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 | ||
function IsEmptyPoint(const APoint: TPoint): boolean; | ||
Checks if the given point is equivalent to EmptyPoint | ||
const EmptySingle = single(-3.402823e38); | ||
Value indicating that there is nothing in the single-precision floating point value. It is also used as a separator in lists | ||
PPointF = ^BGRAClasses.TPointF; | ||
Pointer to a TPointF structure | ||
TPointF = BGRAClasses.TPointF; | ||
Contains a point with single-precision floating point coordinates | ||
const EmptyPointF: TPointF = (x: -3.402823e38; y: -3.402823e38); | ||
Value indicating that there is an empty TPointF structure. It is also used as a separator in lists of points | ||
function PointF(x, y: single): TPointF; overload; | ||
Creates a new structure with values x and y | ||
function PointF(pt: TPoint): TPointF; overload; | ||
Creates a new structure converting integer values to single-precision floating-point coordinates | ||
function isEmptyPointF(const pt: TPointF): boolean; | ||
Checks if the structure is empty (equal to EmptyPointF) | ||
operator = (const pt1, pt2: TPointF): boolean; inline; | ||
Checks if both x and y are equal | ||
operator + (const pt1, pt2: TPointF): TPointF; inline; | ||
Adds x and y components separately. It is like adding vectors | ||
operator - (const pt1, pt2: TPointF): TPointF; inline; | ||
Subtract x and y components separately. It is like subtracting vectors | ||
operator - (const pt2: TPointF): TPointF; inline; | ||
Returns a point with opposite values for x and y components | ||
operator * (const pt1, pt2: TPointF): single; inline; | ||
Scalar product (deprecated): multiplies x and y components and returns the sum | ||
operator ** (const pt1, pt2: TPointF): single; inline; | ||
Scalar product: multiplies x and y components and returns the sum | ||
operator * (const pt1: TPointF; factor: single): TPointF; inline; | ||
Multiplies both x and y by factor. It scales the vector represented by (x, y) | ||
operator * (factor: single; const pt1: TPointF): TPointF; inline; | ||
Multiplies both x and y by factor. It scales the vector represented by (x, y) | ||
function VectLen(const dx,dy: single): single; overload; inline; | ||
Returns the length of the vector (dx, dy) | ||
function VectLen(const v: TPointF): single; overload; | ||
Returns the length of the vector represented by (x, y) | ||
function VectDet(const v1,v2: TPointF): double; inline; | ||
Computes the determinant of the two vectors (equal to the determinant of the square matrix with those vectors as columns) | ||
TPointFHelper = record helper for TPointF | ||
Helper for TPointF structure providing additional functionality for point manipulation | ||
procedure Offset(const apt: TPointF); overload; | ||
Offsets the point by another point (TPointF) | ||
procedure Offset(const apt: TPoint); overload; | ||
Offsets the point by another point (TPoint) | ||
procedure Offset(dx, dy: longint); overload; | ||
Offsets the point by specified distances in the X (dx) and Y (dy) directions (integer values) | ||
procedure Offset(dx, dy: single); overload; | ||
Offsets the point by specified distances in the X (dx) and Y (dy) directions (single values) | ||
procedure Scale(AScale: single); | ||
Scales the point as a vector from the origin) by a specified factor | ||
procedure Normalize; | ||
Normalizes the point (modifies it to a unit length) | ||
function Ceiling: TPoint; | ||
Rounds the coordinates of the point to the nearest integer towards positive infinity | ||
function Truncate: TPoint; | ||
Truncates the coordinates of the point, discarding fractional part | ||
function Floor: TPoint; | ||
Rounds the coordinates of the point to the nearest integer towards negative infinity | ||
function Round: TPoint; | ||
Rounds the coordinates of the point to the nearest integer | ||
function Length: Single; | ||
Calculates the length (magnitude) of the point from the origin | ||
function IsEmpty: boolean; | ||
Determines if the point is empty (has special coordinates EmptyPointF) | ||
ArrayOfTPointF = array of TPointF; | ||
Contains an array of points with single-precision floating point coordinates | ||
function PointsF(const pts: array of TPointF): ArrayOfTPointF; | ||
Creates an array of TPointF | ||
function ConcatPointsF(const APolylines: array of ArrayOfTPointF; AInsertEmptyPointInBetween: boolean = false): ArrayOfTPointF; | ||
Concatenates arrays of TPointF | ||
function PolylineLen(const pts: array of TPointF; AClosed: boolean = false): single; | ||
Compute the length of the polyline contained in the array. AClosed specifies if the last point is to be joined to the first one | ||
TAffineMatrix = array[1..2,1..3] of single; | ||
An affine matrix contains three 2D vectors: the image of x, the image of y and the translation | ||
TRectF = BGRAClasses.TRectF; | ||
Represents a rectangle with single-precision floating point coordinates | ||
const EmptyRectF : TRectF = (left:0; top:0; right:0; bottom: 0); | ||
A constant representing an empty rectangle with all coordinates set to 0 | ||
function RectF(Left, Top, Right, Bottom: Single): TRectF; | ||
Creates a TRectF structure with specified left, top, right, and bottom coordinates | ||
function RectF(const ATopLeft,ABottomRight: TPointF): TRectF; | ||
Creates a TRectF structure from two TPointF points representing the top-left and bottom-right corners | ||
function RectF(const ARect: TRect): TRectF; | ||
Creates a TRectF structure from a TRect structure (integer coordinates converted to single precision) | ||
function RectWithSizeF(left,top,width,height: Single): TRectF; | ||
Creates a TRectF structure with a specified position (left, top) and size (width, height) | ||
function IsEmptyRectF(const ARect:TRectF): boolean; | ||
Checks if the given TRectF structure is empty (of zero size) | ||
const EmptyRect : TRect = (left:0; top:0; right:0; bottom: 0); | ||
A value for an empty rectangle with integer coordinates | ||
function PtInRect(const pt: TPoint; r: TRect): boolean; overload; | ||
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. | ||
function RectWithSize(left,top,width,height: integer): TRect; | ||
Creates a rectangle with integer coordinates with the specified width and height | ||
TRectHelper = record helper for TRect | ||
Helper for TRect structure providing additional functionality to manipulate rectangles | ||
function GetHeight: integer; | ||
Gets the height of the rectangle | ||
function GetIsEmpty: boolean; | ||
Determines if the rectangle is empty (of zero size) | ||
function GetWidth: integer; | ||
Gets the width of the rectangle | ||
procedure SetHeight(AValue: integer); | ||
Sets the height of the rectangle | ||
procedure SetWidth(AValue: integer); | ||
Sets the width of the rectangle | ||
constructor Create(Origin: TPoint; AWidth, AHeight: Longint); overload; | ||
Creates a rectangle with specified origin, width, and height | ||
constructor Create(ALeft, ATop, ARight, ABottom: Longint); overload; | ||
Creates a rectangle with specified left, top, right, and bottom coordinates | ||
procedure Intersect(R: TRect); | ||
Modifies the rectangle to be the intersection of itself and another rectangle | ||
class function Intersect(R1: TRect; R2: TRect): TRect; static; | ||
Returns the intersection of two given rectangles | ||
function IntersectsWith(R: TRect): Boolean; | ||
Checks if the rectangle intersects with another rectangle | ||
class function Union(R1, R2: TRect): TRect; static; | ||
Returns the smallest rectangle that contains both of the given rectangles | ||
procedure Union(R: TRect); | ||
Modifies the rectangle to be the union of itself and another rectangle | ||
procedure Offset(DX, DY: Longint); | ||
Offsets the rectangle by the given distances in the X and Y directions | ||
procedure Inflate(DX, DY: Longint); | ||
Expands or contracts the rectangle by the specified amounts in both directions | ||
function Contains(const APoint: TPoint): boolean; overload; | ||
Checks if the rectangle contains a specified point | ||
function Contains(const ARect: TRect): boolean; overload; | ||
Checks if the rectangle completely contains another rectangle | ||
property Width: integer read GetWidth write SetWidth; | ||
Property to get or set the width of the rectangle | ||
property Height: integer read GetHeight write SetHeight; | ||
Property to get or set the height of the rectangle | ||
property IsEmpty: boolean read GetIsEmpty; | ||
Property to check if the rectangle is empty | ||
TSize = BGRAClasses.TSize; | ||
Constains a size with integer with and height | ||
TSizeHelper = record helper for TSize | ||
Helper to access a size | ||
function GetHeight: integer; | ||
Gets the height of the size | ||
function GetWidth: integer; | ||
Gets the width of the size | ||
property Width: integer read GetWidth; | ||
Property to get the width | ||
property Height: integer read GetHeight; | ||
Property to get the height | ||
PRectF = ^TRectF; | ||
Pointer to a TRectF structure | ||
TRectFHelper = record helper for TRectF | ||
Helper for TRectF structure providing additional functionality for rectangle manipulation | ||
class function Intersect(const R1: TRectF; const R2: TRectF): TRectF; overload; static; | ||
Returns the intersection of two given rectangles | ||
class function Union(const R1: TRectF; const R2: TRectF): TRectF; overload; static; | ||
Returns the union of two given rectangles | ||
class function Union(const R1: TRectF; const R2: TRectF; ADiscardEmpty: boolean): TRectF; overload; static; | ||
Returns the union of two given rectangles, with an option to ignore empty rectangles | ||
function Union(const r: TRectF): TRectF; overload; | ||
Returns the union of itself and another rectangle | ||
function Union(const r: TRectF; ADiscardEmpty: boolean): TRectF; overload; | ||
Returns the union of itself and another rectangle, with an option to ignore empty rectangles | ||
procedure Include(const APoint: TPointF); | ||
Expands the rectangle to include a specified point (empty points are ignored) | ||
function Contains(const APoint: TPointF; AIncludeBottomRight: boolean = false): boolean; | ||
Checks if the rectangle contains a specified point, with an option to include or exclude the bottom-right boundary | ||
function IntersectsWith(const r: TRectF): boolean; | ||
Checks if the rectangle intersects with another rectangle | ||
function IsEmpty: boolean; | ||
Determines if the rectangle is empty (of zero size) | ||
TAffineBox = object | ||
Object representing an affine box, defined by three corner points (top-left, top-tight, bottom-left) | ||
function GetAsPolygon: ArrayOfTPointF; | ||
Retrieves the affine box as an array of points (polygon representation) | ||
function GetBottomRight: TPointF; | ||
Gets the bottom-right corner of the affine box | ||
function GetCenter: TPointF; | ||
Calculates the center point of the affine box | ||
function GetHeight: single; | ||
Calculates the height of the affine box | ||
function GetIsEmpty: boolean; | ||
Determines if the affine box is empty (one of the point being empty, not just of zero size) | ||
function GetRectBounds: TRect; | ||
Gets the bounding rectangle of the affine box as TRect | ||
function GetRectBoundsF: TRectF; | ||
Gets the bounding rectangle of the affine box as TRectF | ||
function GetSurface: single; | ||
Calculates the surface area of the affine box | ||
function GetWidth: single; | ||
Calculates the width of the affine box | ||
TopLeft, | ||
Top-left corner of the affine box | ||
TopRight, | ||
Top-right corner of the affine box | ||
BottomLeft: TPointF; | ||
Bottom-left corner of the affine box | ||
class function EmptyBox: TAffineBox; static; | ||
Creates an empty affine box | ||
class function AffineBox(ATopLeft, ATopRight, ABottomLeft: TPointF): TAffineBox; overload; static; | ||
Creates an affine box defined by three corner points | ||
class function AffineBox(ARectF: TRectF): TAffineBox; overload; static; | ||
Creates an affine box from a TRectF structure | ||
procedure Offset(AOfsX, AOfsY: single); overload; | ||
Offsets the affine box by specified X and Y amounts | ||
procedure Offset(AOfs: TPointF); overload; | ||
Offsets the affine box by a specified point | ||
procedure Inflate(AHoriz, AVert: single); | ||
Inflates the affine box along its axes by specified horizontal and vertical amounts | ||
function Contains(APoint: TPointF): boolean; | ||
Checks if a point is contained within the affine box | ||
property RectBounds: TRect read GetRectBounds; | ||
Bounding rectangle as TRect | ||
property RectBoundsF: TRectF read GetRectBoundsF; | ||
Bounding rectangle as TRectF | ||
property BottomRight: TPointF read GetBottomRight; | ||
Bottom-right corner of the affine box | ||
property IsEmpty: boolean read GetIsEmpty; | ||
Check if the affine box is empty (containing empty points, not just of zero size) | ||
property AsPolygon: ArrayOfTPointF read GetAsPolygon; | ||
Affine box as an array of points (polygon) | ||
property Width: single read GetWidth; | ||
Width of the affine box along its axes | ||
property Height: single read GetHeight; | ||
Height of the affine box along its axes | ||
property Surface: single read GetSurface; | ||
Surface area of the affine box | ||
property Center: TPointF read GetCenter; | ||
Center point of the affine box | ||
TFaceCulling = ( | ||
Enumerates the modes of face culling in rendering. Face culling is a technique used to determine which faces of a polygon are visible and should be rendered | ||
fcNone, | ||
No face culling is applied. All faces of the polygon are rendered | ||
fcKeepCW, | ||
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 | ||
fcKeepCCW); | ||
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 | ||
TBGRAPenStyle = array of Single; | ||
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 to TPenStyle | ||
function BGRAPenStyle(dash1, space1: single; dash2: single=0; space2: single = 0; dash3: single=0; space3: single = 0; dash4 : single = 0; space4 : single = 0): TBGRAPenStyle; | ||
Creates a pen style with the specified length for the dashes and the spaces | ||
TSplineStyle = ( | ||
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 | ||
ssInside, | ||
The curve is drawn inside the polygonal envelope without reaching the starting and ending points | ||
ssInsideWithEnds, | ||
The curve is drawn inside the polygonal envelope and the starting and ending points are reached | ||
ssCrossing, | ||
The curve crosses the polygonal envelope without reaching the starting and ending points | ||
ssCrossingWithEnds, | ||
The curve crosses the polygonal envelope and the starting and ending points are reached | ||
ssOutside, | ||
The curve is outside the polygonal envelope (starting and ending points are reached) | ||
ssRoundOutside, | ||
The curve expands outside the polygonal envelope (starting and ending points are reached) | ||
ssVertexToSide, | ||
The curve is outside the polygonal envelope and there is a tangeant at vertices (starting and ending points are reached) | ||
ssEasyBezier); | ||
The curve is rounded using Bezier curves when the angle is less than or equal to 45° | ||
PArcDef = ^TArcDef; | ||
Pointer to an arc definition | ||
TArcDef = record | ||
Definition of an arc of an ellipse | ||
center: TPointF; | ||
Center of the ellipse | ||
radius: TPointF; | ||
Horizontal and vertical of the ellipse before rotation | ||
xAngleRadCW: single; | ||
Rotation of the ellipse | ||
startAngleRadCW, endAngleRadCW: single; | ||
Start and end angle, in radian and clockwise. See angle convention in BGRAPath | ||
anticlockwise: boolean | ||
Specifies if the arc goes anticlockwise | ||
function ArcDef(cx, cy, rx,ry, xAngleRadCW, startAngleRadCW, endAngleRadCW: single; anticlockwise: boolean) : TArcDef; | ||
Creates a structure for an arc definition | ||
TArcOption = ( | ||
Possible options for drawing an arc of an ellipse (used in BGRACanvas) | ||
aoClosePath, | ||
Close the path by joining the ending and starting point together | ||
aoPie, | ||
Draw a pie shape by joining the ending and starting point to the center of the ellipse | ||
aoFillPath); | ||
Fills the shape | ||
TArcOptions = set of TArcOption; | ||
Set of options for drawing an arc | ||
TBGRAArrowStyle = ( | ||
Enumerates different styles of arrows that can be used in graphic rendering. Each style represents a unique visual appearance for arrowheads or tails | ||
asNone, | ||
No arrow style. This option indicates that no arrowhead or tail is to be rendered | ||
asNormal, | ||
A normal arrow style, representing a standard arrowhead with an angle | ||
asCut, | ||
A cut arrow style, where the edge of the arrow are cut instead of using the pen end cap | ||
asTriangle, | ||
A triangle arrow style, forming a simple triangular arrowhead | ||
asHollowTriangle, | ||
A hollow triangle arrow style, similar to asTriangle but with an unfilled center | ||
asFlipped, | ||
A flipped arrow style, where the arrowhead points in the opposite direction to the normal style | ||
asFlippedCut, | ||
A flipped cut arrow style, combining the aspects of asFlipped and asCut | ||
asTail, | ||
A small tail, typically used to depict the starting point of an arrow | ||
asTailRepeat); | ||
A tail repeat arrow style, depicting a series of repeated patterns typically used for the starting point of an arrow | ||
TBGRACustomArrow = class | ||
Generic class configuring and rendering an arrow | ||
function GetEndOffsetX: single; virtual; abstract; | ||
Retrieves the X-offset for the end of the arrow | ||
function GetEndRepeatCount: integer; virtual; abstract; | ||
Retrieves the repeat count for the end symbol | ||
function GetEndSizeFactor: TPointF; virtual; abstract; | ||
Retrieves the size factor for the end of the arrow | ||
function GetIsEndDefined: boolean; virtual; abstract; | ||
Determines if the end of the arrow is defined | ||
function GetIsStartDefined: boolean; virtual; abstract; | ||
Determines if the start of the arrow is defined | ||
function GetStartOffsetX: single; virtual; abstract; | ||
Retrieves the X-offset for the start of the arrow | ||
function GetStartRepeatCount: integer; virtual; abstract; | ||
Retrieves the repeat count for the start symbol | ||
function GetStartSizeFactor: TPointF; virtual; abstract; | ||
Retrieves the size factor for the start of the arrow | ||
procedure SetEndOffsetX(AValue: single); virtual; abstract; | ||
Sets the X-offset for the end of the arrow | ||
procedure SetEndRepeatCount(AValue: integer); virtual; abstract; | ||
Sets the repeat count for the end symbol | ||
procedure SetEndSizeFactor(AValue: TPointF); virtual; abstract; | ||
Sets the size factor for the end of the arrow | ||
procedure SetStartOffsetX(AValue: single); virtual; abstract; | ||
Sets the X-offset for the start of the arrow | ||
procedure SetStartRepeatCount(AValue: integer); virtual; abstract; | ||
Sets the repeat count for the start symbol | ||
procedure SetStartSizeFactor(AValue: TPointF); virtual; abstract; | ||
Sets the size factor for the start of the arrow | ||
function GetLineCap: TPenEndCap; virtual; abstract; | ||
Retrieves the line cap style for the classic arrow | ||
procedure SetLineCap(AValue: TPenEndCap); virtual; abstract; | ||
Sets the line cap style for the classic arrow | ||
function ComputeStartAt(const APosition, ADirection: TPointF; const AWidth, ACurrentPos: single): ArrayOfTPointF; virtual; abstract; | ||
Computes the start of the arrow at a given position and direction | ||
function ComputeEndAt(const APosition, ADirection: TPointF; const AWidth, ACurrentPos: single): ArrayOfTPointF; virtual; abstract; | ||
Computes the end of the arrow at a given position and direction | ||
procedure StartAsNone; virtual; abstract; | ||
Sets the start of the arrow to no style | ||
procedure StartAsClassic(AFlipped: boolean = false; ACut: boolean = false; ARelativePenWidth: single = 1); virtual; abstract; | ||
Sets the start of the arrow to a classic style | ||
procedure StartAsTriangle(ABackOffset: single = 0; ARounded: boolean = false; AHollow: boolean = false; AHollowPenWidth: single = 0.5); virtual; abstract; | ||
Sets the start of the arrow to a triangle style | ||
procedure StartAsTail; virtual; abstract; | ||
Sets the start of the arrow to a tail style | ||
procedure EndAsNone; virtual; abstract; | ||
Sets the end of the arrow to no style | ||
procedure EndAsClassic(AFlipped: boolean = false; ACut: boolean = false; ARelativePenWidth: single = 1); virtual; abstract; | ||
Sets the end of the arrow to a classic style | ||
procedure EndAsTriangle(ABackOffset: single = 0; ARounded: boolean = false; AHollow: boolean = false; AHollowPenWidth: single = 0.5); virtual; abstract; | ||
Sets the end of the arrow to a triangle style | ||
procedure EndAsTail; virtual; abstract; | ||
Sets the end of the arrow to a tail style | ||
property IsStartDefined: boolean read GetIsStartDefined; | ||
Check if the start of the arrow is defined | ||
property IsEndDefined: boolean read GetIsEndDefined; | ||
Check if the end of the arrow is defined | ||
property StartOffsetX: single read GetStartOffsetX write SetStartOffsetX; | ||
X-offset for the start of the arrow | ||
property EndOffsetX: single read GetEndOffsetX write SetEndOffsetX; | ||
X-offset for the end of the arrow | ||
property LineCap: TPenEndCap read GetLineCap write SetLineCap; | ||
Line cap style | ||
property StartSize: TPointF read GetStartSizeFactor write SetStartSizeFactor; | ||
Size factor for the start of the arrow | ||
property EndSize: TPointF read GetEndSizeFactor write SetEndSizeFactor; | ||
Size factor for the end of the arrow | ||
property StartRepeatCount: integer read GetStartRepeatCount write SetStartRepeatCount; | ||
Repeat count for the start symbol | ||
property EndRepeatCount: integer read GetEndRepeatCount write SetEndRepeatCount; | ||
Repeat count for the end symbol | ||
TBGRACustomPenStroker = class | ||
Generic class representing a pen stroker, used for drawing and styling lines with various attributes | ||
function GetArrow: TBGRACustomArrow; virtual; abstract; | ||
Retrieves the arrow style used at both ends of strokes | ||
function GetArrowOwned: boolean; virtual; abstract; | ||
Determines if the arrow is owned (managed) by the pen stroker | ||
function GetCustomPenStyle: TBGRAPenStyle; virtual; abstract; | ||
Gets the custom pen style | ||
function GetJoinStyle: TPenJoinStyle; virtual; abstract; | ||
Retrieves the style of line joins (e.g., bevel, miter) | ||
function GetLineCap: TPenEndCap; virtual; abstract; | ||
Retrieves the line cap style (e.g., butt, round) | ||
function GetMiterLimit: single; virtual; abstract; | ||
Gets the miter limit for line joins | ||
function GetPenStyle: TPenStyle; virtual; abstract; | ||
Retrieves the standard pen style | ||
function GetStrokeMatrix: TAffineMatrix; virtual; abstract; | ||
Gets the stroke transformation matrix (applied only to stroke and not to path points) | ||
procedure SetArrow(AValue: TBGRACustomArrow); virtual; abstract; | ||
Sets the arrow style used at both ends of strokes | ||
procedure SetArrowOwned(AValue: boolean); virtual; abstract; | ||
Sets whether the arrow is owned by the pen stroker | ||
procedure SetCustomPenStyle(AValue: TBGRAPenStyle); virtual; abstract; | ||
Sets the custom pen style | ||
procedure SetJoinStyle(AValue: TPenJoinStyle); virtual; abstract; | ||
Sets the style of line joins | ||
procedure SetLineCap(AValue: TPenEndCap); virtual; abstract; | ||
Sets the line cap style | ||
procedure SetMiterLimit(AValue: single); virtual; abstract; | ||
Sets the miter limit for line joins | ||
procedure SetPenStyle(AValue: TPenStyle); virtual; abstract; | ||
Sets the standard pen style | ||
procedure SetStrokeMatrix(const AValue: TAffineMatrix); virtual; abstract; | ||
Sets the stroke transformation matrix (applied only to stroke and not to path points) | ||
function ComputePolyline(const APoints: array of TPointF; AWidth: single; AClosedCap: boolean = true): ArrayOfTPointF; overload; virtual; abstract; | ||
Computes a polyline with the given points and width, optionally closing the cap | ||
function ComputePolyline(const APoints: array of TPointF; AWidth: single; APenColor: TBGRAPixel; AClosedCap: boolean = true): ArrayOfTPointF; overload; virtual; abstract; | ||
Computes a polyline with the given points, width, and pen color, optionally closing the cap | ||
function ComputePolylineAutoCycle(const APoints: array of TPointF; AWidth: single): ArrayOfTPointF; virtual; abstract; | ||
Computes a polyline with automatic cycling of points and given width | ||
function ComputePolygon(const APoints: array of TPointF; AWidth: single): ArrayOfTPointF; virtual; abstract; | ||
Computes a polygon with the given points and width | ||
property Style: TPenStyle read GetPenStyle write SetPenStyle; | ||
Standard pen style | ||
property CustomPenStyle: TBGRAPenStyle read GetCustomPenStyle write SetCustomPenStyle; | ||
Custom pen style (with given dash and gap lengths) | ||
property Arrow: TBGRACustomArrow read GetArrow write SetArrow; | ||
Arrow style at both ends of strokes | ||
property ArrowOwned: boolean read GetArrowOwned write SetArrowOwned; | ||
Is the arrow is owned by the pen stroker | ||
property StrokeMatrix: TAffineMatrix read GetStrokeMatrix write SetStrokeMatrix; | ||
Stroke transformation matrix (applied only to stroke and not to path points) | ||
property LineCap: TPenEndCap read GetLineCap write SetLineCap; | ||
Line cap style | ||
property JoinStyle: TPenJoinStyle read GetJoinStyle write SetJoinStyle; | ||
Join style of lines | ||
property MiterLimit: single read GetMiterLimit write SetMiterLimit; | ||
Miter limit for line joins | ||
PPoint3D = ^TPoint3D; | ||
Pointer to a TPoint3D structure | ||
TPoint3D = record | ||
Point in 3D with single-precision floating point coordinates | ||
procedure Offset(const point3D: TPoint3D); | ||
Offsets the point by the given 3D vector | ||
procedure Scale(AScale: single); | ||
Scale the point (as a vector from the origin) | ||
function Point3D(x,y,z: single): TPoint3D; | ||
Creates a new structure with values (x, y, z) | ||
operator = (const v1,v2: TPoint3D): boolean; inline; | ||
Checks if all components x, y and z are equal | ||
operator + (const v1,v2: TPoint3D): TPoint3D; inline; | ||
Adds components separately. It is like adding vectors | ||
operator - (const v1,v2: TPoint3D): TPoint3D; inline; | ||
Subtract components separately. It is like subtracting vectors | ||
operator - (const v: TPoint3D): TPoint3D; inline; | ||
Returns a point with opposite values for all components | ||
operator * (const v1,v2: TPoint3D): single; inline; | ||
Scalar product: multiplies components and returns the sum | ||
operator * (const v1: TPoint3D; const factor: single): TPoint3D; inline; | ||
Multiplies components by factor. It scales the vector represented by (x, y, z) | ||
operator * (const factor: single; const v1: TPoint3D): TPoint3D; inline; | ||
Multiplies components by factor. It scales the vector represented by (x, y, z) | ||
procedure VectProduct3D(u,v: TPoint3D; out w: TPoint3D); | ||
Computes the vectorial product w. It is perpendicular to both u and v | ||
procedure Normalize3D(var v: TPoint3D); inline; | ||
Normalize the vector, i.e. scale it so that its length be 1 | ||
function VectLen3D(const v: TPoint3D): single; | ||
Computes the length of the vector from the origin to the point | ||
TLineDef = record | ||
Defition of a line in the euclidian plane | ||
origin: TPointF; | ||
Some point in the line | ||
dir: TPointF; | ||
Vector indicating the direction | ||
function IntersectLine(line1, line2: TLineDef): TPointF; overload; | ||
Computes the intersection of two lines. If they are parallel, returns the middle of the segment between the two origins | ||
function IntersectLine(line1, line2: TLineDef; out parallel: boolean): TPointF; overload; | ||
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 | ||
function IsConvex(const pts: array of TPointF; IgnoreAlign: boolean = true): boolean; | ||
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 | ||
function IsClockwise(const pts: array of TPointF): boolean; | ||
Checks if the points follow a clockwise curve | ||
function IsMostlyClockwise(const pts: array of TPointF): boolean; | ||
Checks if the curve is clockwise on the whole but accepting some counter-clockwise points | ||
function DoesQuadIntersect(pt1,pt2,pt3,pt4: TPointF): boolean; | ||
Checks if the quad formed by the 4 given points intersects itself | ||
function DoesSegmentIntersect(pt1,pt2,pt3,pt4: TPointF): boolean; | ||
Checks if two segment intersect | ||
TBGRAPathDrawProc = procedure(const APoints: array of TPointF; AClosed: boolean; AData: Pointer) of object; | ||
Callback function when rendering a stroke | ||
TBGRAPathFillProc = procedure(const APoints: array of TPointF; AData: pointer) of object; | ||
Callback function when filling a shape | ||
IBGRAPath = interface | ||
A path is the ability to define a contour with moveTo, lineTo... Even if it is an interface, it must not implement reference counting. | ||
procedure closePath; | ||
Closes the current path with a line to the starting point | ||
procedure moveTo(constref pt: TPointF); | ||
Moves to a location, disconnected from previous points | ||
procedure lineTo(constref pt: TPointF); | ||
Adds a line from the current point | ||
procedure polylineTo(const pts: array of TPointF); | ||
Adds a polyline from the current point | ||
procedure quadraticCurveTo(constref cp,pt: TPointF); | ||
Adds a quadratic Bézier curve from the current point | ||
procedure bezierCurveTo(constref cp1,cp2,pt: TPointF); | ||
Adds a cubic Bézier curve from the current point | ||
procedure arc(constref arcDef: TArcDef); | ||
Adds an arc. If there is a current point, it is connected to the beginning of the arc | ||
procedure openedSpline(const pts: array of TPointF; style: TSplineStyle); | ||
Adds an opened spline. If there is a current point, it is connected to the beginning of the spline | ||
procedure closedSpline(const pts: array of TPointF; style: TSplineStyle); | ||
Adds an closed spline. If there is a current point, it is connected to the beginning of the spline | ||
procedure copyTo(dest: IBGRAPath); | ||
Copy the content of this path to the specified destination | ||
function getPoints: ArrayOfTPointF; overload; | ||
Returns the content of the path as an array of points | ||
function getPoints(AMatrix: TAffineMatrix): ArrayOfTPointF; overload; | ||
Returns the content of the path as an array of points with the transformation specified by AMatrix | ||
procedure stroke(ADrawProc: TBGRAPathDrawProc; AData: pointer); overload; | ||
Calls a given draw procedure for each sub path with computed coordinates for rendering | ||
procedure stroke(ADrawProc: TBGRAPathDrawProc; const AMatrix: TAffineMatrix; AData: pointer); overload; | ||
Calls a given draw procedure for each sub path with computed coordinates using given AMatrix transformation | ||
procedure fill(AFillProc: TBGRAPathFillProc; AData: pointer); overload; | ||
Calls a given fill procedure for each sub path with computed coordinates for rendering | ||
procedure fill(AFillProc: TBGRAPathFillProc; const AMatrix: TAffineMatrix; AData: pointer); overload; | ||
Calls a given fill procedure for each sub path with computed coordinates using given AMatrix transformation | ||
function getCursor: TBGRACustomPathCursor; | ||
Returns a cursor to go through the path. The cursor must be freed by calling Free. | ||
TBGRACustomPath = class(IBGRAPath) | ||
Generic class representing a path, providing methods for creation, exploration and rendering | ||
constructor Create; virtual; abstract; | ||
Constructor to create a custom path. Must be overridden in subclasses | ||
procedure beginPath; virtual; abstract; | ||
Begins a new path | ||
procedure closePath; virtual; abstract; | ||
Closes the current path | ||
procedure moveTo(constref pt: TPointF); virtual; abstract; | ||
Moves the current point to a specified location, starting a new sub-path | ||
procedure lineTo(constref pt: TPointF); virtual; abstract; | ||
Adds a line from the current point to a specified point | ||
procedure polylineTo(const pts: array of TPointF); virtual; abstract; | ||
Adds a series of lines to the path based on an array of points | ||
procedure quadraticCurveTo(constref cp, pt: TPointF); virtual; abstract; | ||
Adds a quadratic Bézier curve to the path | ||
procedure bezierCurveTo(constref cp1, cp2, pt: TPointF); virtual; abstract; | ||
Adds a cubic Bézier curve to the path | ||
procedure arc(constref arcDef: TArcDef); virtual; abstract; | ||
Adds an arc to the path based on an arc definition | ||
procedure openedSpline(const pts: array of TPointF; style: TSplineStyle); virtual; abstract; | ||
Adds an open spline to the path based on a series of points and a spline style | ||
procedure closedSpline(const pts: array of TPointF; style: TSplineStyle); virtual; abstract; | ||
Adds a closed spline to the path based on a series of points and a spline style | ||
procedure copyTo(dest: IBGRAPath); virtual; abstract; | ||
Copies the path to another path object | ||
function getPoints: ArrayOfTPointF; overload; virtual; abstract; | ||
Retrieves the points of the path | ||
function getPoints(AMatrix: TAffineMatrix): ArrayOfTPointF; overload; virtual; abstract; | ||
Retrieves the points of the path, transformed by a specified matrix | ||
procedure stroke(ADrawProc: TBGRAPathDrawProc; AData: pointer); overload; virtual; abstract; | ||
Strokes the path with a specified drawing procedure | ||
procedure stroke(ADrawProc: TBGRAPathDrawProc; const AMatrix: TAffineMatrix; AData: pointer); overload; virtual; abstract; | ||
Strokes the path with a specified drawing procedure and transformation matrix | ||
procedure fill(AFillProc: TBGRAPathFillProc; AData: pointer); overload; virtual; abstract; | ||
Fills the path with a specified filling procedure | ||
procedure fill(AFillProc: TBGRAPathFillProc; const AMatrix: TAffineMatrix; AData: pointer); overload; virtual; abstract; | ||
Fills the path with a specified filling procedure and transformation matrix | ||
function getLength: single; virtual; abstract; | ||
Retrieves the length of the path | ||
function getCursor: TBGRACustomPathCursor; virtual; abstract; | ||
Retrieves a cursor for navigating the path | ||
TBGRAPathAny = class of TBGRACustomPath; | ||
Type for specifying any derived class of TBGRACustomPath | ||
TBGRACustomPathCursor = class | ||
Class that contains a cursor to browse an existing path | ||
function GetArcPos: single; virtual; abstract; | ||
Retrieves the current position from the start | ||
function GetCurrentCoord: TPointF; virtual; abstract; | ||
Returns the current coordinate in the path | ||
function GetCurrentTangent: TPointF; virtual; abstract; | ||
Returns the tangent vector to the current position | ||
function GetLoopClosedShapes: boolean; virtual; abstract; | ||
Retrieves if the cursor loops when there is a closed shape | ||
function GetLoopPath: boolean; virtual; abstract; | ||
Retrieves if the cursor loops at the end of the whole path | ||
function GetPathLength: single; virtual; abstract; | ||
Retreive the full arc length of the path | ||
function GetBounds: TRectF; virtual; abstract; | ||
Compute the bounds of the path | ||
function GetStartCoordinate: TPointF; virtual; abstract; | ||
Starting coordinate of the path | ||
procedure SetArcPos(AValue: single); virtual; abstract; | ||
Sets the current position from the start | ||
procedure SetLoopClosedShapes(AValue: boolean); virtual; abstract; | ||
Sets if the cursor loops when there is a closed shape | ||
procedure SetLoopPath(AValue: boolean); virtual; abstract; | ||
Sets if the cursor loops at the end of the whole path | ||
function MoveForward(ADistance: single; ACanJump: boolean = true): single; virtual; abstract; | ||
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 | ||
function MoveBackward(ADistance: single; ACanJump: boolean = true): single; virtual; abstract; | ||
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 | ||
property CurrentCoordinate: TPointF read GetCurrentCoord; | ||
Returns the current coordinate in the path | ||
property CurrentTangent: TPointF read GetCurrentTangent; | ||
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) | ||
property Position: single read GetArcPos write SetArcPos; | ||
Current position in the path, as a distance along the arc from the starting point of the path | ||
property PathLength: single read GetPathLength; | ||
Full arc length of the path | ||
property StartCoordinate: TPointF read GetStartCoordinate; | ||
Starting coordinate of the path | ||
property LoopClosedShapes: boolean read GetLoopClosedShapes write SetLoopClosedShapes; | ||
Specifies if the cursor loops when there is a closed shape | ||
property LoopPath: boolean read GetLoopPath write SetLoopPath; | ||
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 | ||
BGRAPathFactory: TBGRAPathAny; | ||
Factory provided to create a TBGRAPath object | ||
TRoundRectangleOption = ( | ||
Possible options for a round rectangle | ||
rrTopLeftSquare,rrTopRightSquare,rrBottomRightSquare,rrBottomLeftSquare, | ||
specify that a corner is a square (not rounded) | ||
rrTopLeftBevel,rrTopRightBevel,rrBottomRightBevel,rrBottomLeftBevel, | ||
specify that a corner is a bevel (cut) | ||
rrDefault); | ||
default option, does nothing particular | ||
TRoundRectangleOptions = set of TRoundRectangleOption; | ||
A set of options for a round rectangle | ||
TPolygonOrder = ( | ||
Order of polygons when rendered using TBGRAMultiShapeFiller (in unit BGRAPolygon) | ||
poNone, | ||
No order, colors are mixed together | ||
poFirstOnTop, | ||
First polygon is on top | ||
poLastOnTop); | ||
Last polygon is on top | ||
TIntersectionInfo = class | ||
Contains an intersection between an horizontal line and any shape. It is used when filling shapes | ||
interX: single; | ||
Horizontal position of the intersection | ||
winding: integer; | ||
Winding count | ||
numSegment: integer; | ||
Number identifying the current segment where the intersection was found | ||
procedure SetValues(AInterX: Single; AWinding, ANumSegment: integer); | ||
Sets the position and other information about the intersection | ||
ArrayOfTIntersectionInfo = array of TIntersectionInfo; | ||
An array of intersections between an horizontal line and any shape | ||
TBGRACustomFillInfo = class | ||
Abstract class defining any shape that can be filled | ||
function SegmentsCurved: boolean; virtual; abstract; | ||
Returns true if one segment number can represent a curve and thus cannot be considered exactly straight | ||
function GetBounds: TRect; virtual; abstract; | ||
Returns integer bounds for the shape | ||
function IsPointInside(x,y: single; windingMode: boolean): boolean; virtual; abstract; | ||
Check if the point is inside the shape | ||
function CreateIntersectionArray: ArrayOfTIntersectionInfo; virtual; abstract; | ||
Create an array that will contain computed intersections. To augment that array, use CreateIntersectionInfo for new items | ||
function CreateIntersectionInfo: TIntersectionInfo; virtual; abstract; | ||
Create a structure to define one single intersection | ||
procedure FreeIntersectionArray(var inter: ArrayOfTIntersectionInfo); virtual; abstract; | ||
Free an array of intersections | ||
procedure ComputeAndSort(cury: single; var inter: ArrayOfTIntersectionInfo; out nbInter: integer; windingMode: boolean); virtual; abstract; | ||
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 | ||
function GetSliceIndex: integer; virtual; abstract; | ||
Returns the index of the current slice (horizontal stripe) | ||
TGradientType = ( | ||
Shape of a gradient | ||
gtLinear, | ||
The color changes along a certain vector and does not change along its perpendicular direction | ||
gtReflected, | ||
The color changes like in gtLinear however it is symmetrical to a specified direction | ||
gtDiamond, | ||
The color changes along a diamond shape | ||
gtRadial, | ||
The color changes in a radial way from a given center | ||
gtAngular); | ||
The color changes according to the angle relative to a given center | ||
const GradientTypeStr : array[TGradientType] of string | ||
List of string to represent gradient types | ||
function StrToGradientType(str: string): TGradientType; | ||
Returns the gradient type represented by the given string | ||
TBGRAGradientGetColorAtFunc = function(position: integer): TBGRAPixel of object; | ||
Function type to get the the color at a given integer position | ||
TBGRAGradientGetColorAtFloatFunc = function(position: single): TBGRAPixel of object; | ||
Function type to get the the color at a given single-precision floating type position | ||
TBGRAGradientGetExpandedColorAtFunc = function(position: integer): TExpandedPixel of object; | ||
Function type to get the the expanded color at a given integer position | ||
TBGRAGradientGetExpandedColorAtFloatFunc = function(position: single): TExpandedPixel of object; | ||
Function type to get the the expanded color at a given single-precision floating type position | ||
TBGRACustomGradient = class | ||
Defines a gradient of color, not specifying its shape but only the series of colors | ||
function GetColorAt(position: integer): TBGRAPixel; virtual; abstract; | ||
Returns the color at a given position. The reference range is from 0 to 65535, however values beyond are possible as well | ||
function GetExpandedColorAt(position: integer): TExpandedPixel; virtual; | ||
Returns the expanded color at a given position. The reference range is from 0 to 65535, however values beyond are possible as well | ||
function GetColorAtF(position: single): TBGRAPixel; virtual; | ||
Returns the color at a given position. The reference range is from 0 to 1, however values beyond are possible as well | ||
function GetExpandedColorAtF(position: single): TExpandedPixel; virtual; | ||
Returns the expanded color at a given position. The reference range is from 0 to 1, however values beyond are possible as well | ||
function GetAverageColor: TBGRAPixel; virtual; abstract; | ||
Returns the average color of the gradient | ||
function GetAverageExpandedColor: TExpandedPixel; virtual; | ||
Returns the average expanded color of the gradient | ||
function GetMonochrome: boolean; virtual; abstract; | ||
Returns whether the gradient has only one color | ||
property Monochrome: boolean read GetMonochrome; | ||
If the gradient contains only one color and thus is not really a gradient | ||
Bézier curves
TCubicBezierCurve = object | ||
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. | ||
function SimpleComputePoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF; | ||
Compute the points using the simple approach of computing for each time value | ||
p1: TPointF; | ||
Starting point (reached) | ||
c1: TPointF; | ||
First control point (not reached by the curve) | ||
c2: TPointF; | ||
Second control point (not reached by the curve) | ||
p2: TPointF; | ||
Ending point (reached) | ||
function ComputePointAt(t: single): TPointF; | ||
Computes the point at time t, varying from 0 to 1 | ||
procedure Split(out ALeft, ARight: TCubicBezierCurve); | ||
Split the curve in two such that ALeft.p2 = ARight.p1 | ||
function ComputeLength(AAcceptedDeviation: single = 0.1): single; | ||
Compute an approximation of the length of the curve. AAcceptedDeviation indicates the maximum orthogonal distance that is ignored and approximated by a straight line. | ||
function ToPoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF; | ||
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 | ||
procedure CopyToPath(ADest: IBGRAPath); | ||
Copy the curve to the given path | ||
function GetBounds: TRectF; | ||
Computes the rectangular bounds | ||
function BezierCurve(origin, control1, control2, destination: TPointF) : TCubicBezierCurve; overload; | ||
Creates a structure for a cubic Bézier curve | ||
TQuadraticBezierCurve = object | ||
Definition of a Bézier curve of order 2. It has one control point | ||
function SimpleComputePoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF; | ||
Compute the points using the simple approach of computing for each time value | ||
function ComputeExtremumPositionOutsideSegment: single; | ||
Computes the position where the curve has its extremum | ||
p1: TPointF; | ||
Starting point (reached) | ||
c: TPointF; | ||
Control point (not reached by the curve) | ||
p2: TPointF; | ||
Ending point (reached) | ||
function ComputePointAt(t: single): TPointF; | ||
Computes the point at time t, varying from 0 to 1 | ||
procedure Split(out ALeft, ARight: TQuadraticBezierCurve); | ||
Split the curve in two such that ALeft.p2 = ARight.p1 | ||
function ComputeLength: single; | ||
Compute the exact length of the curve | ||
function ToPoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF; | ||
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 | ||
procedure CopyToPath(ADest: IBGRAPath); | ||
Copy the curve to the given path | ||
function GetBounds: TRectF; | ||
Computes the rectangular bounds | ||
function BezierCurve(origin, control, destination: TPointF) : TQuadraticBezierCurve; overload; | ||
Creates a structure for a quadratic Bézier curve | ||
function BezierCurve(origin, destination: TPointF) : TQuadraticBezierCurve; overload; | ||
Creates a structure for a quadratic Bézier curve without curvature | ||
ArrayOfSingle = array of single; | ||
Array of single-precision floating point values | ||
TRationalQuadraticBezierCurve = object | ||
Quasi-standard rational quadratic Bezier curve, defined by three points and a number: p1 = starting point, c = control point, p2 = ending point, weight = weight for the control point. The curve is defined with the function (t in [0;1]): f: t -> ((1-t)^2*p1 + 2*t*(1-t)*weight*c + t^2*p2) / (1-t)^2 + 2*t*(1-t)*weight + t^2) The curve is an arc of: - ellipse when weight in ]-1;1[, - parabola when weight = 1 (classical quadratic Bezier curve), - hyperbola when weight > 1. A negative weight give the complementary curve for its positive counterpart. So when weight <= -1 the curve is discontinuous: - infinite branches of parabola when weight = -1, - infinite branches of hyperbola and symetric hyperbola when weight < -1. 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. | ||
p1, c, p2 : TPointF; | ||
Starting, control and ending points | ||
weight : single; | ||
Weight of control point | ||
function GetIsInfinite: boolean; | ||
Checks whether the curve is infinitely long | ||
function InternalComputePoints(AInfiniteBounds: TRectF; AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF; | ||
Compute points in the general case | ||
function GetBoundingPositions(AIncludeFirstAndLast: boolean; ASorted: boolean): ArrayOfSingle; | ||
Computes the points relevant to compute bounds | ||
function ComputePointAt(t: single): TPointF; | ||
Compute a point at the specified time | ||
function ComputeLength(AAcceptedDeviation: single = 0.1): single; | ||
Compute the length | ||
function ToPoints(AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF; overload; | ||
Computes the points of the curve | ||
function ToPoints(AInfiniteBounds: TRectF; AAcceptedDeviation: single = 0.1; AIncludeFirstPoint: boolean = true): ArrayOfTPointF; overload; | ||
Computes the points of the curve by providing where the infinite curve can stop | ||
function GetBounds: TRectF; | ||
Compute the rectangular bounds | ||
procedure Split(out ALeft, ARight: TRationalQuadraticBezierCurve); | ||
Split into two curves | ||
property IsInfinite: boolean read GetIsInfinite; | ||
Is the curve infinitely long | ||
function BezierCurve(origin, control, destination: TPointF; Aweight:single) : TRationalQuadraticBezierCurve; overload; | ||
Creates a rational Bézier curve | ||
TEasyBezierCurveMode = ( | ||
Enumerates modes for handling curves in a Bezier curve sequence | ||
cmAuto, | ||
Automatically determines whether to curve or form an angle based on the points' positions | ||
cmCurve, | ||
Forces a curve at the point | ||
cmAngle | ||
Forces an angle at the point, meaning the point is reached and forms an angle instead of a curve | ||
TEasyBezierPointTransformFunc = function(APoint: PPointF; AData: Pointer): TPointF of object; | ||
Function type for transforming Bezier curve points | ||
TEasyBezierCurve = object | ||
Object representing an easy-to-use Bezier curve, with configurable curve modes and transformation functions | ||
function GetCurveMode(AIndex: integer): TEasyBezierCurveMode; | ||
Retrieves the curve mode for a specified point index | ||
function GetCurveStartPoint: TPointF; | ||
Gets the starting point of the curve | ||
function GetPoint(AIndex: integer): TPointF; | ||
Retrieves the point at a specified index | ||
function GetPointCount: integer; | ||
Gets the total number of points in the curve | ||
procedure SetClosed(AValue: boolean); | ||
Sets whether the curve is closed | ||
procedure SetCurveMode(AIndex: integer; AValue: TEasyBezierCurveMode); | ||
Sets the curve mode for a specified point index | ||
procedure SetMinimumDotProduct(AValue: single); | ||
Sets the minimum dot product to form a curve instead of an angle | ||
procedure SetPoint(AIndex: integer; AValue: TPointF); | ||
Sets the point at a specified index | ||
FCurves: array of record | ||
Computed Bézier control points | ||
FInvalidated: boolean; | ||
Whether the curve need to be recomputed | ||
FPoints: array of record | ||
Definition of the curve by the user | ||
FMinimumDotProduct: single; | ||
Minimum dot product to form a curve instead of an angle | ||
FClosed: boolean; | ||
Is the curve is closed | ||
function MaybeCurve(start1, end1, start2, end2: integer): boolean; | ||
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. | ||
procedure ComputeQuadraticCurves; | ||
Computes the control points for the classical quadratic curve | ||
function PointTransformNone(APoint: PPointF; {%H-}AData: Pointer): TPointF; | ||
Fonction to apply no transformation | ||
function PointTransformOffset(APoint: PPointF; AData: Pointer): TPointF; | ||
Fonction to apply an offset | ||
procedure Init; | ||
Initializes the Bezier curve object | ||
procedure Clear; | ||
Clears all points and resets the curve | ||
procedure SetPoints(APoints: array of TPointF; ACurveMode: TEasyBezierCurveMode); overload; | ||
Sets the points and curve mode for the entire curve | ||
procedure SetPoints(APoints: array of TPointF; ACurveMode: array of TEasyBezierCurveMode); overload; | ||
Sets the points and individual curve modes for each point | ||
procedure SetPoints(APoints: array of TPointF; ACurveMode: TEasyBezierCurveMode; AStart, ACount: integer); overload; | ||
Sets a subset of points and a single curve mode for these points | ||
procedure SetPoints(APoints: array of TPointF; ACurveMode: array of TEasyBezierCurveMode; AStart, ACount: integer); overload; | ||
Sets a subset of points and individual curve modes for each of these points | ||
procedure CopyToPath(ADest: IBGRAPath); overload; | ||
Copies the Bezier curve to a path object | ||
procedure CopyToPath(ADest: IBGRAPath; AOffset: TPointF; AReverse: boolean = false); overload; | ||
Copies the Bezier curve to a path object with an offset and optional reversal | ||
procedure CopyToPath(ADest: IBGRAPath; ATransformFunc: TEasyBezierPointTransformFunc; ATransformData: Pointer; AReverse: boolean = false); overload; | ||
Copies the Bezier curve to a path object with a custom transformation | ||
property Point[AIndex: integer]: TPointF read GetPoint write SetPoint; | ||
Coordinates of the points | ||
property CurveMode[AIndex: integer]: TEasyBezierCurveMode read GetCurveMode write SetCurveMode; | ||
Mode to use for each point | ||
property PointCount: integer read GetPointCount; | ||
Number of points | ||
property MinimumDotProduct: single read FMinimumDotProduct write SetMinimumDotProduct; | ||
Minimum dot product to form a curve rather than an angle when using cmAuto mode | ||
property Closed: boolean read FClosed write SetClosed; | ||
Gets or sets whether to close the curve | ||
property CurveStartPoint: TPointF read GetCurveStartPoint; | ||
Coordinates of the starting point | ||
function ToPoints: ArrayOfTPointF; | ||
Converts the Bezier curve into an array of points | ||
function ComputeLength: single; | ||
Computes the total length of the Bezier curve | ||
const EasyBezierDefaultMinimumDotProduct = 0.707; | ||
Minimum dot product, corresponding to approximately 45 degrees, to form a curve instead of an angle | ||
function EasyBezierCurve(APoints: array of TPointF; AClosed: boolean; ACurveMode: TEasyBezierCurveMode; | ||
Create a TEasyBezierCurve object with only one curve mode | ||
function EasyBezierCurve(APoints: array of TPointF; AClosed: boolean; ACurveMode: array of TEasyBezierCurveMode; | ||
Create a TEasyBezierCurve object with a curve mode for each point | ||
function EasyBezierCurve(APoints: array of TPointF; AStart, ACount: integer; AClosed: boolean; ACurveMode: TEasyBezierCurveMode; | ||
Create a TEasyBezierCurve object with a subsection of the array of points, with only one curve mode | ||
function EasyBezierCurve(APoints: array of TPointF; AStart, ACount: integer; AClosed: boolean; ACurveMode: array of TEasyBezierCurveMode; | ||
Create a TEasyBezierCurve object with a subsection of the array of points, with a curve mode for each point | ||