File: graphmath.xml

package info (click to toggle)
lazarus 4.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 275,760 kB
  • sloc: pascal: 2,341,904; xml: 509,420; makefile: 348,726; cpp: 93,608; sh: 3,387; java: 609; perl: 297; sql: 222; ansic: 137
file content (1315 lines) | stat: -rw-r--r-- 34,570 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
<?xml version="1.0" encoding="UTF-8"?>
<!--

Documentation for LCL (Lazarus Component Library) and LazUtils (Lazarus 
Utilities) are published under the Creative Commons Attribution-ShareAlike 4.0 
International public license.

https://creativecommons.org/licenses/by-sa/4.0/legalcode.txt
https://gitlab.com/freepascal.org/lazarus/lazarus/-/blob/main/docs/cc-by-sa-4-0.txt

Copyright (c) 1997-2025, by the Lazarus Development Team.

-->
<fpdoc-descriptions>
<package name="lazutils">
<!--
====================================================================
GraphMath
====================================================================
-->
<module name="GraphMath">
<short>
A set of mathematical helper routines to simply cross-platform canvas
drawing.
</short>
<descr>
<p>
<file>graphmath.pp</file> contains math helper routines for use for
graphics drawing. It is used to simply cross-platform canvas drawing
operations. <file>graphmath.pp</file> is part of the <file>LazUtils</file> 
package.
</p>
</descr>

<!-- unresolved references -->
<element name="Types"/>
<element name="Classes"/>
<element name="SysUtils"/>
<element name="Math"/>
<element name="GraphType"/>
<element name="LazUtilities"/>

<element name="TFloatPoint">
<short>
<var>TFloatPoint</var> is an extended precision record specifying the X and
Y coordinates of a point in a graphic environment.
</short>
<descr/>
<seealso/>
</element>
<element name="TFloatPoint.X">
<short>
Horizontal position for the coordinate.
</short>
</element>
<element name="TFloatPoint.Y">
<short>
Vertical position for the coordinate.
</short>
</element>

<element name="TBezier">
<short>
Array type used to store the coordinates for Bezier control points as 
floating point values.
</short>
<descr>
<p>
<var>TBezier</var> allows up to 4 coordinates to be specified which represent 
the control points for the parametric curve. Each coordinate is implemented 
using the TFloatPoint type, and stored as elements in the array.
</p>
<p>
TBezier is the type returned by the Bezier function. The type is passed as an 
argument to routines like: Arc2Bezier, Bezier2Polyline, BezierMidPoint, and 
SplitBezier.
</p>
</descr>
<seealso>
<link id="Bezier"/>
<link id="Arc2Bezier"/>
<link id="Bezier2Polyline"/>
<link id="BezierMidPoint"/>
<link id="SplitBezier"/>
</seealso>
</element>

<element name="PPoint">
<short>
Pointer to the TPoint type.
</short>
<descr/>
<seealso>
<link id="#rtl.classes.TPoint">TPoint</link>
</seealso>
</element>

<element name="Angles2Coords">
<short>
Converts an Eccentric Angle and an Angle-Length, into the coordinates for
the Start and End radial Points.
</short>
<descr>
<p>
Use <var>Angles2Coords</var> to convert an Eccentric (Radial) angle and an
angle-length, such as are used in X-Windows and GTK, into the coordinates
for the Start and End radial Points. Like those used in the Arc, Pie, and
Chord routines from the Windows API.
</p>
<p>
The angles are specified in 1/16th of a degree. For example, a full circle
equals 5760 (16*360).
</p>
<p>
Positive values in Angle and AngleLength mean counter-clockwise, while
negative values mean clockwise direction. Zero degrees is at the 3
o&apos;clock position.
</p>
</descr>
<seealso/>
</element>
<element name="Angles2Coords.X">
<short/>
</element>
<element name="Angles2Coords.Y">
<short/>
</element>
<element name="Angles2Coords.Width">
<short/>
</element>
<element name="Angles2Coords.Height">
<short/>
</element>
<element name="Angles2Coords.Angle1">
<short/>
</element>
<element name="Angles2Coords.Angle2">
<short/>
</element>
<element name="Angles2Coords.SX">
<short/>
</element>
<element name="Angles2Coords.SY">
<short/>
</element>
<element name="Angles2Coords.EX">
<short/>
</element>
<element name="Angles2Coords.EY">
<short/>
</element>

<element name="Arc2Bezier">
<short>
Converts an Arc and ArcLength into a Bezier Approximation of the Arc.
</short>
<descr>
<p>
Use <var>Arc2Bezier</var> to convert an Arc and ArcLength into a Bezier
approximation of the Arc. The Rotation parameter accepts a Rotation-Angle
for a rotated Ellipse. For a non-rotated ellipse this value would be 0, or
360. If the AngleLength is greater than 90 degrees, or is equal to 0, it
automatically exits, as Bezier cannot accurately approximate any angle
greater then 90 degrees, and in fact for best result no angle greater than
45 should be converted, instead an array of Bezier's should be created,
each Bezier describing a portion of the total arc no greater than 45
degrees.
</p>
<p>
The angles are specified in 1/16th of a degree. For example, a full circle
equals 5760 (16*360).
</p>
<p>
Positive values in Angle and AngleLength mean counter-clockwise while
negative values mean clockwise direction. Zero degrees is at the 3
o&apos;clock position.
</p>
</descr>
<seealso/>
</element>
<element name="Arc2Bezier.X">
<short/>
</element>
<element name="Arc2Bezier.Y">
<short/>
</element>
<element name="Arc2Bezier.Width">
<short/>
</element>
<element name="Arc2Bezier.Height">
<short/>
</element>
<element name="Arc2Bezier.Angle1">
<short/>
</element>
<element name="Arc2Bezier.Angle2">
<short/>
</element>
<element name="Arc2Bezier.Rotation">
<short/>
</element>
<element name="Arc2Bezier.Points">
<short/>
</element>

<element name="Bezier">
<short>
Gets a TBezier instance representing the specified Bezier control points.
</short>
<descr/>
<seealso/>
</element>
<element name="Bezier.Result">
<short>
TBezier instance with the values in C1, C2, C3, and C4.
</short>
</element>
<element name="Bezier.C1">
<short>
Control point on the parametric curve. C1 is an endpoint.
</short>
</element>
<element name="Bezier.C2">
<short>
Control point on the parametric curve. C2 is a directional control point for 
a Quadratic or Cubic Bezier.
</short>
</element>
<element name="Bezier.C3">
<short>
Control point on the parametric curve. C3 is a directional control point for 
a Cubic Bezier.
</short>
</element>
<element name="Bezier.C4">
<short>
Control point on the parametric curve. C4 is an endpoint.
</short>
</element>

<element name="Bezier2Polyline">
<short>
<var>Bezier2Polyline</var> - convert a 4-Point Bezier into a Pointer Array
of TPoint and a Count variable.
</short>
<descr>
<p>
Use BezierToPolyline to convert a 4-Point Bezier into a Pointer Array of
TPoint and a Count variable which can then be used within either a
Polyline, or Polygon routine. It is primarily for use within
PolyBezier2Polyline.
</p>
<p>
If Points is not initialized or Count is less then 0, it is set to nil and
the array starts at 0, otherwise it tries to append points to the array
starting at Count. Points should ALWAYS be Freed when done by calling to
ReallocMem(Points, 0) or FreeMem.
</p>
</descr>
<seealso/>
</element>
<element name="Bezier2Polyline.Bezier">
<short/>
</element>
<element name="Bezier2Polyline.Points">
<short/>
</element>
<element name="Bezier2Polyline.Count">
<short/>
</element>

<element name="BezierArcPoints">
<short>
<var>BezierArcPoints</var> - convert an Arc and ArcLength into a Pointer
Array of TPoints for use with Polyline or Polygon.
</short>
<descr>
<p>
Use BezierArcPoints to convert an Arc and ArcLength into a Pointer Array of
TPoints for use with Polyline or Polygon. The Rotation parameter accepts a
Rotation-Angle for a rotated Ellipse. For a non-rotated ellipse this value
would be 0, or 360. The result is an Approximation based on 1 or more
Beziers.
</p>
<p>
If the AngleLength is greater than 90 degrees, it calls
PolyBezierArcPoints, otherwise it Converts the angles into a Bezier by
calling to Arc2Bezier, and then converts the Bezier into an array of Points
by calling to Bezier2Polyline.
</p>
<p>
The angles are specified in 1/16th of a degree. For example, a full circle
equals 5760 (16*360).
</p>
<p>
Positive values in Angle and AngleLength mean counter-clockwise while
negative values mean clockwise direction. Zero degrees is at the 3
o&apos;clock position.
</p>
<p>
If Points is not initialized or Count is less then 0, it is set to nil and
the array starts at 0, otherwise it tries to append points to the array
starting at Count. Points should ALWAYS be Freed when done by calling
ReallocMem(Points, 0) or FreeMem.
</p>
</descr>
<seealso/>
</element>
<element name="BezierArcPoints.X">
<short/>
</element>
<element name="BezierArcPoints.Y">
<short/>
</element>
<element name="BezierArcPoints.Width">
<short/>
</element>
<element name="BezierArcPoints.Height">
<short/>
</element>
<element name="BezierArcPoints.Angle1">
<short/>
</element>
<element name="BezierArcPoints.Angle2">
<short/>
</element>
<element name="BezierArcPoints.Rotation">
<short/>
</element>
<element name="BezierArcPoints.Points">
<short/>
</element>
<element name="BezierArcPoints.Count">
<short/>
</element>

<element name="BezierMidPoint">
<short>
<var>BezierMidPoint</var> - get the Mid-Point of any 4-Point Bezier. It is
primarily for use in SplitBezier.
</short>
<descr/>
<seealso/>
</element>
<element name="BezierMidPoint.Result">
<short/>
</element>
<element name="BezierMidPoint.Bezier">
<short/>
</element>

<element name="CenterPoint">
<short>
<var>CenterPoint</var> - get the Center-Point of any rectangle. It is
primarily for use with, and in, other routines such as Quadrant, and
RadialPoint.
</short>
<descr/>
<seealso/>
</element>
<element name="CenterPoint.Result">
<short/>
</element>
<element name="CenterPoint.Rect">
<short/>
</element>


<element name="CalculateLeftTopWidthHeight">
<short>
Calculates the values for the output variables in Left, Top, Width, and Height.
</short>
<descr>
<p>
<var>CalculateLeftTopWidthHeight</var> checks values in the X1, X2, Y1, and Y2 
arguments and sets the values for the Left, Top, Width, and Height output 
parameters accordingly.
</p>
<dl>
<dt>Left</dt>
<dd>
Set to the smaller of the two values in X1 and X2.
</dd>
<dt>Width</dt>
<dd>
Set to the difference between the X1 and X2 values. The value will be a 
positive integer value or zero (0).
</dd>
<dt>Top</dt>
<dd>
Set to the smaller of the two values in Y1 and Y2.
</dd>
<dt>Height</dt>
<dd>
Set to the difference between Y1 and Y2. The value will be a positive integer 
value or zero (0).
</dd>
</dl>
<p>
Used in the implementation of the Rectangle and Ellipse routines for the GTK 
widgetset.
</p>
</descr>
<version>
Added in LazUtils version 3.0.
</version>
<seealso/>
</element>
<element name="CalculateLeftTopWidthHeight.X1">
<short>
Horizontal coordinate examined in the routine.
</short>
</element>
<element name="CalculateLeftTopWidthHeight.Y1">
<short>
Vertical coordinate examined in the routine.
</short>
</element>
<element name="CalculateLeftTopWidthHeight.X2">
<short>
Horizontal coordinate examined in the routine.
</short>
</element>
<element name="CalculateLeftTopWidthHeight.Y2">
<short>
Vertical coordinate examined in the routine.
</short>
</element>
<element name="CalculateLeftTopWidthHeight.Left">
<short>
Returns the left coordinate for the specified values.
</short>
</element>
<element name="CalculateLeftTopWidthHeight.Top">
<short>
Returns the top coordinate for the specified values.
</short>
</element>
<element name="CalculateLeftTopWidthHeight.Width">
<short>
Returns the width for the specified horizontal coordinates.
</short>
</element>
<element name="CalculateLeftTopWidthHeight.Height">
<short>
Returns the height for the specified vertical coordinates.
</short>
</element>

<element name="Coords2Angles">
<short>
<var>Coords2Angles</var> - convert the coords for Start and End Radial-
Points into an Eccentric counter clockwise Angle and an Angle-Length.
</short>
<descr>
<p>
Use Coords2Angles to convert the coords for Start and End Radial-Points,
such as are used in the Windows API Arc Pie and Chord routines, into an
Eccentric (aka Radial) counter clockwise Angle and an Angle-Length, such as
are used in X-Windows and GTK.
</p>
<p>
The angles angle1 and angle2 are returned in 1/16th of a degree. For
example, a full circle equals 5760 (16*360).
</p>
<p>
Zero degrees is at the 3 o&apos;clock position.
</p>
</descr>
<seealso/>
</element>
<element name="Coords2Angles.X">
<short/>
</element>
<element name="Coords2Angles.Y">
<short/>
</element>
<element name="Coords2Angles.Width">
<short/>
</element>
<element name="Coords2Angles.Height">
<short/>
</element>
<element name="Coords2Angles.SX">
<short/>
</element>
<element name="Coords2Angles.SY">
<short/>
</element>
<element name="Coords2Angles.EX">
<short/>
</element>
<element name="Coords2Angles.EY">
<short/>
</element>
<element name="Coords2Angles.Angle1">
<short/>
</element>
<element name="Coords2Angles.Angle2">
<short/>
</element>

<element name="Distance">
<short>
Gets the distance between two points, or the distance of a point from a 
specified line.
</short>
<descr>
<p>  
<var>Distance</var> is an overloaded function with variants that operate on 
either two point coordinates, or on a point and a line defined by two 
additional points values. The Distance() function is used primarily for 
internal purposes (such as in Bezier2PolyLine and EccentricAngle) 
but can be used for any purpose.
</p>
<p>
The return value is an Extended type with the calculated distance between the 
argument values. The return value is always a positive value.
</p>
<p>
The variants using two point arguments (TPoint or TFloatPoint) calculates the 
length of a straight line between the coordinates in PT1 and PT2 using the 
Pythagorean theorem. The distance between identical points is always zero (0). 
</p>
<p>
The variant with three TFloatPoint arguments calculates the distance between 
the point Pt and the line represented by the points in SP and EP using 
Euclidean geometry. The distance is derived by finding the length of an 
imaginary line between Pt and the closest point that intersects the slope of 
the line in SP and EP. The distance for a point which lies on the defined line 
is always zero (0).
</p>
</descr>
<seealso/>
</element>
<element name="Distance.Result">
<short>
Straight-line distance between the specified coordinates or objects.
</short>
</element>
<element name="Distance.PT1">
<short>
Starting point for the calculated distance.
</short>
</element>
<element name="Distance.PT2">
<short>
Ending point for the calculated distance.
</short>
</element>
<element name="Distance.Pt">
<short>
Fixed point for the calculated distance.
</short>
</element>
<element name="Distance.SP">
<short>
Starting point for the line used in the distance calculation.
</short>
</element>
<element name="Distance.WP">
<short>
Ending point for the line used in the distance calculation.
</short>
</element>

<element name="EccentricAngle">
<short>
<var>EccentricAngle</var> - get the Eccentric Angle of a given point on any
non-rotated ellipse.
</short>
<descr>
<p>
Use EccentricAngle to get the Eccentric( aka Radial ) Angle of a given
point on any non-rotated ellipse. It is primarily for use in Coords2Angles.
The result is in 1/16th of a degree. For example, a full circle equals 5760
(16*360). Zero degrees is at the 3 o&apos;clock position.
</p>
</descr>
<seealso/>
</element>
<element name="EccentricAngle.Result">
<short/>
</element>
<element name="EccentricAngle.PT">
<short/>
</element>
<element name="EccentricAngle.Rect">
<short/>
</element>

<element name="EllipseRadialLength">
<short>
<var>EllipseRadialLength</var> - Radial-Length of non-rotated ellipse at
any given Eccentric Angle.
</short>
<descr>
<p>
Use EllipseRadialLength to get the Radial-Length of non-rotated ellipse at
any given Eccentric( aka Radial ) Angle. It is primarily for use in other
routines such as RadialPoint. The Eccentric angle is in 1/16th of a degree.
For example, a full circle equals 5760 (16*360). Zero degrees is at the 3
o&apos;clock position.
</p>
</descr>
<seealso/>
</element>
<element name="EllipseRadialLength.Result">
<short/>
</element>
<element name="EllipseRadialLength.Rect">
<short/>
</element>
<element name="EllipseRadialLength.EccentricAngle">
<short/>
</element>

<element name="EllipsePolygon">
<short>
Gets an array of points for a polygon which approximates an ellipse in the 
specified rectangle.
</short>
<descr>
<p>
<var>EllipsePolygon</var> is a <var>TPointArray</var> function used to 
calculate the array of points which approximate an ellipse bounded by the 
rectangle specified in the ARect argument. In EllipsePolygon, the ellipse is 
aligned to X and Y axes in the rectangle. It calculates the center point, 
radii, and diameter for the ellipse using ARect as well as the minimum number 
of points needed such that the distance between the edges of the rectangle and 
the mathematical circle is less than the rounding error (0.5) and a smoother 
stepping value of 0.4. The points for the polygon are calculated and stored in 
the return value.
</p>
</descr>
<version>
Added in LCL version 4.0.  
</version>
<seealso/>
</element>
<element name="EllipsePolygon.Result">
<short>
Array with the points for the polygon.
</short>
</element>
<element name="EllipsePolygon.ARect">
<short>
Rectangle instance with the bounds for an X- and Y-aligned ellipse.
</short>
</element>

<element name="FloatPoint">
<short>
<var>FloatPoint</var> - it is essentially like Classes.Point in use, except
that it accepts Extended Parameters. It is Primarily for use with and in
Bezier routines.
</short>
<descr/>
<seealso/>
</element>
<element name="FloatPoint.Result">
<short/>
</element>
<element name="FloatPoint.AX">
<short/>
</element>
<element name="FloatPoint.AY">
<short/>
</element>

<element name="LineEndPoint">
<short>
<var>LineEndPoint</var> - get the End-Point of a line of any given Length
at any given angle with any given Start-Point.
</short>
<descr>
<p>
Use LineEndPoint to get the End-Point of a line of any given Length at any
given angle with any given Start-Point. It is primarily for use in other
routines such as RadialPoint. The angle is in 1/16th of a degree. For
example, a full circle equals 5760 (16*360). Zero degrees is at the 3
o&apos;clock position.
</p>
</descr>
<seealso/>
</element>
<element name="LineEndPoint.Result">
<short/>
</element>
<element name="LineEndPoint.StartPoint">
<short/>
</element>
<element name="LineEndPoint.Angle">
<short/>
</element>
<element name="LineEndPoint.Length">
<short/>
</element>

<element name="MakeMinMax">
<short>
Ensures that the i1 argument is the smaller of the two Integer values.
</short>
<descr>
<p>
<var>MakeMinMax</var> swaps the values in i1 and i2 variable parameters when 
i1 is larger than i2. No actions are performed in the routine if i1 is smaller 
than i2, or the arguments have the same value.
</p>
</descr>
<version>
Added in LazUtils version 3.0.
</version>
<seealso/>
</element>
<element name="MakeMinMax.i1">
<short>
Integer value compared (and potentially updated) in the routine.
</short>
</element>
<element name="MakeMinMax.i2">
<short>
Integer value compared (and potentially updated) in the routine.
</short></element>

<element name="MoveRect">
<short>
Moves the specified rectangle to the origin in the x and y arguments.
</short>
<descr>
<p>
<var>MoveRect</var> sets the Left and Top members in ARect to the values 
specified in x and y (respectively). The Right and Bottom members in ARect are 
updated to reflect the relative distance from the original Top and Left on 
entry.
</p>
</descr>
<version>
Added in LazUtils version 3.0.
</version>
<seealso/>
</element>
<element name="MoveRect.ARect">
<short>
TRect instance updated in the routine.
</short>
</element>
<element name="MoveRect.x">
<short>
New position for the Top coordinate in the rectangle.
</short>
</element>
<element name="MoveRect.y">
<short>
New position for the Left coordinate in the rectangle.
</short>
</element>

<element name="MoveRectToFit">
<short>
Moves and potentially resizes a rectangle to fit within the specified target 
rectangle.
</short>
<descr>
<p>
<var>ARect</var> is the TRect instance repositioned in the routine. Values in 
the Left, Right, Top, and Bottom members may be updated in the routine if the 
rectangle is not located within the bounds for the target rectangle.
</p>
<p>
<var>MaxRect</var> is the TRectangle instance where ARect is repositioned. It 
also establishes the maximum size for ARect after it has been repositioned. If 
aRect is larger than MaxRect, ARect is resized to fit with in the constraints 
in MaxRect.
</p>
<p>
MoveRectToFit is used in the implementation for the DoDock method in TControl.
</p>
</descr>
<version>
Added in LazUtils version 3.0.
</version>
<seealso/>
</element>
<element name="MoveRectToFit.ARect">
<short>
TRect instance moved and optionally resized in the routine.
</short>
</element>
<element name="MoveRectToFit.MaxRect">
<short>
TRect instance where the rectangle is relocated. It also specifies the maximum 
size for the relocated rectangle.
</short>
</element>

<element name="SameRect">
<short>
Indicates whether member in the specified rectangles have the same values.
</short>
<descr>
<p>
<var>SameRect</var> is <var>Boolean</var> function used to determine whether 
the <var>TRect</var> instances R1 and R2 represent the same rectangular areas. 
It compares the values for the Left, Right, Top, and Bottom members in the 
TRect instances. The return value is <b>True</b> when members in R1 have the 
same values as the corresponding members in R2.
</p>
<p>
SameRect replaces the deprecated CompareRect routine in the 
<file>lclproc.pas</file> unit in the LCL.
</p>
</descr>
<version>
Added in LazUtils version 3.99.
</version>
<seealso>
<link id="#lcl.lclproc.CompareRect">CompareRect</link>
<link id="#rtl.types.PRect">PRect</link>
<link id="#rtl.types.TRect">TRect</link>
</seealso>
</element>
<element name="SameRect.Result">
<short>
True when the specified rectangles have the same values in the members.
</short>
</element>
<element name="SameRect.R1">
<short>
Pointer to a TRect instance examined in the routine.
</short>
</element>
<element name="SameRect.R2">
<short>
Pointer to a TRect instance examined in the routine.
</short>
</element>

<element name="PolyBezier2Polyline">
<short>
<var>PolyBezier2Polyline</var> - convert an array of 4-Point Bezier into a
Pointer Array of TPoint and a Count variable.
</short>
<descr>
<p>
Use BezierToPolyline to convert an array of 4-Point Bezier into a Pointer
Array of TPoint and a Count variable which can then be used within either a
Polyline, or Polygon routine. Points is automatically initialized, so any
existing information is lost, and the array starts at 0. Points should
ALWAYS be Freed when done by calling to ReallocMem(Points, 0).
</p>
</descr>
<seealso/>
</element>
<element name="PolyBezier2Polyline.Beziers">
<short/>
</element>
<element name="PolyBezier2Polyline.Points">
<short/>
</element>
<element name="PolyBezier2Polyline.Count">
<short/>
</element>

<element name="PolyBezierArcPoints">
<short>
<var>PolyBezierArcPoints</var> - convert an Arc and ArcLength into a
Pointer Array of TPoints for use with Polyline or Polygon.
</short>
<descr>
<p>
Use PolyBezierArcPoints to convert an arc between two angles Angle1 and Angle2
into a pointer array of TPoints for use with Polyline or Polygon.
The Rotation parameter accepts a rotation angle for a rotated ellipse - for
a non-rotated ellipse this value would be 0, or 360*16.
</p>
<p>
The result is an approximation based on 1 or more Beziers. If the angle length
is greater than 45*16 degrees, it recursively breaks the arc into arcs of
45*16 degrees or less, and converts them into beziers with BezierArcPoints.
The angles are 1/16th of a degree. For example, a full circle equals
5760 (16*360).
</p>
<p>
Positive values in Angle1 and Angle2 mean counter-clockwise while negative
values mean clockwise direction. Zero degrees is at the 3'o clock position.
Points is automatically initialized, so any existing information is lost,
and the array starts at 0. Points should ALWAYS be freed when done by calling
to ReallocMem(Points, 0).
</p>
</descr>
<seealso/>
</element>
<element name="PolyBezierArcPoints.X">
<short/>
</element>
<element name="PolyBezierArcPoints.Y">
<short/>
</element>
<element name="PolyBezierArcPoints.Width">
<short/>
</element>
<element name="PolyBezierArcPoints.Height">
<short/>
</element>
<element name="PolyBezierArcPoints.Angle1">
<short/>
</element>
<element name="PolyBezierArcPoints.Angle2">
<short/>
</element>
<element name="PolyBezierArcPoints.Rotation">
<short/>
</element>
<element name="PolyBezierArcPoints.Points">
<short/>
</element>
<element name="PolyBezierArcPoints.Count">
<short/>
</element>

<element name="Quadrant">
<short>
Determine the <var>Quadrant</var> of any point, given the Center.
</short>
<descr>
<p>
Use Quadrant to determine the Quadrant of any point, given the Center. It
is primarily for use in other routines such as EccentricAngle. A result of
1-4 represents the primary 4 quadrants. A result of 5-8 means the point
lies on one of the Axis, 5 = -Y Axis, 6 = +X Axis, 7 = +Y Axis, and 8 = -X
Axis. A result of -1 means that it does not fall in any quadrant, that is,
it is the Center.
</p>
</descr>
<seealso/>
</element>
<element name="Quadrant.Result">
<short/>
</element>
<element name="Quadrant.PT">
<short/>
</element>
<element name="Quadrant.Center">
<short/>
</element>

<element name="RadialPoint">
<short>
Get the <var>RadialPoint</var> at any given Eccentric angle on any non-
rotated ellipse.
</short>
<descr>
<p>
Use RadialPoint to get the Radial-Point at any given Eccentric(aka Radial)
angle on any non-rotated ellipse. It is primarily for use in Angles2Coords.
The EccentricAngle is in 1/16th of a degree. For example, a full circle
equals 5760 (16*360). Zero degrees is at the 3 o&apos;clock position.
</p>
</descr>
<seealso/>
</element>
<element name="RadialPoint.Result">
<short/>
</element>
<element name="RadialPoint.EccentricAngle">
<short/>
</element>
<element name="RadialPoint.Rect">
<short/>
</element>

<element name="RotatePoint">
<short>
Rotates a point around the origin by the specified angle (in radians).
</short>
<descr>
<p>
Rotates a point around the origin (0,0) by the angle in AAngle. The angle is
in radians and positive for counter-clockwise rotation.
Note that y points downwards.
</p>
</descr>
<seealso/>
</element>
<element name="RotatePoint.Result">
<short>TPoint with the coordinates after rotation.</short>
</element>
<element name="RotatePoint.APoint">
<short>TPoint with coordinates rotated in the routine.</short>
</element>
<element name="RotatePoint.AAngle">
<short>Rotation angle in radians.</short>
</element>

<element name="RotateRect">
<short>
Rotates a rectangle with the specified dimensions by the specified angle
(in radians).
</short>
<descr>
<p>
Rotates the rectangle (0, 0, AWidth, AHeight) around its top-left corner
(0,0) by the angle in AAngle (in radians).
Note that y points downwards.
</p>
</descr>
<seealso/>
</element>
<element name="RotateRect.Result">
<short>The smallest TRect which contains the rotated rectangle.</short>
</element>
<element name="RotateRect.AWidth">
<short>Width for the rectangle.</short>
</element>
<element name="RotateRect.AHeight">
<short>Height for the rectangle.</short>
</element>
<element name="RotateRect.AAngle">
<short>Rotation angle in radians.</short>
</element>

<element name="SplitBezier">
<short>
<var>SplitBezier</var> - split any 4-Point Bezier into two 4-Point Beziers:
a 'Left' and a 'Right'
</short>
<descr>
<p>
Use SplitBezier to split any 4-Point Bezier into two 4-Point Beziers: a
'Left' and a 'Right'. It is primarily for use in Bezier2Polyline.
</p>
</descr>
<seealso/>
</element>
<element name="SplitBezier.Bezier">
<short/>
</element>
<element name="SplitBezier.Left">
<short/>
</element>
<element name="SplitBezier.Right">
<short/>
</element>

<element name="operator +(TFloatPoint,TFloatPoint):TFloatPoint">
<short>
Implements the Add operator (+) for values using the TFloatPoint type.
</short>
<descr>
<p>
Values for the X and Y members in the addends are summed and stored in the 
corresponding members in the TFloatPoint result.
</p>
</descr>
</element>

<element name="operator +(TFloatPoint,Extended):TFloatPoint">
<short>
Implements the Add operator (+) for values using the TFloatPoint and Extended 
types.
</short>
<descr>
<p>
The Extended value is added to both the X and Y members in the TFloatPoint 
type and used in the result for the operator.
</p>
</descr>
<seealso/>
</element>

<element name="operator +(Extended,TFloatPoint):TFloatPoint">
<short>
Implements the Add operator (+) for values using the Extended and TFloatPoint 
types.
</short>
<descr>
<p>
The Extended value is added to both the X and Y members in the TFloatPoint 
type and used in the result for the operator.
</p>
</descr>
<seealso/>
</element>

<element name="operator +(TFloatPoint,TPoint):TFloatPoint">
<short>
Implements the Add operator (+) for values using the TFloatPoint and TPoint 
types.
</short>
<descr/>
<seealso/>
</element>

<element name="operator +(TPoint,TFloatPoint):TFloatPoint">
<short>
Implements the Add operator (+) for values using the TPoint and TFloatPoint 
types.
</short>
<descr/>
<seealso/>
</element>

<element name="operator -(TFloatPoint,Extended):TFloatPoint">
<short>
Implements the Subtract operator (-) for values using the TFloatPoint and 
Extended types.
</short>
<descr>
<p>
The value in the Extended type is subtracted from both the X and Y members in 
the TFloatPoint type and used in the result for the operator.
</p>
</descr>
</element>

<element name="operator -(TFloatPoint,TFloatPoint):TFloatPoint">
<short>
Implements the Subtract operator (-) for values using the TFloatPoint type.
</short>
<descr/>
</element>

<element name="operator -(TFloatPoint,TPoint):TFloatPoint">
<short>
Implements the Subtract operator (-) for values using the TFloatPoint and 
TPoint types.
</short>
<descr/>
</element>

<element name="operator -(TPoint,TFloatPoint):TFloatPoint">
<short>
Implements the Subtract operator (-) for values using the TPoint and 
TFloatPoint types.
</short>
<descr/>
</element>

<element name="operator *(TFloatPoint,TFloatPoint):TFloatPoint">
<short>
Implements the Multiply operator (*) for values using the TFloatPoint type.
</short>
<descr/>
</element>

<element name="operator *(TFloatPoint,Extended):TFloatPoint">
<short>
Implements the Multiply operator (*) for values using the TFloatPoint and 
Extended types.
</short>
<descr>
<p>
The value in the Extended type is applied to both the X and Y members in the TFloatPoint type and used in the result for the operator.
</p>  
</descr>
</element>

<element name="operator *(Extended,TFloatPoint):TFloatPoint">
<short>
Implements the Multiply operator (*) for values using the Extended and 
TFloatPoint types.
</short>
<descr>
<p>
The value in the Extended type is applied to both the X and Y members in the TFloatPoint type and used in the result for the operator.
</p>  
</descr>
</element>

<element name="operator *(TFloatPoint,TPoint):TFloatPoint">
<short>
Implements the Multiply operator (*) for values using the TFloatPoint and 
TPoint types.
</short>
<descr/>
</element>

<element name="operator *(TPoint,TFloatPoint):TFloatPoint">
<short>
Implements the Multiply operator (*) for values using the TPoint and 
TFloatPoint types.
</short>
<descr/>
</element>

<element name="operator /(TFloatPoint,TFloatPoint):TFloatPoint">
<short>
Implements the Divide operator (/) for values using the TFloatPoint type.
</short>
<descr/>
</element>

<element name="operator /(TFloatPoint,Extended):TFloatPoint">
<short>
Implements the Divide operator (/) for values using the TFloatPoint and 
Extended types.
</short>
<descr>
<p>
The value in the Extended type is applied to both the X and Y members in the 
TFloatPoint type and used in the result for the operator. No validation is 
performed for the divisor in the operator.
</p>
</descr>
</element>

<element name="operator /(TFloatPoint,TPoint):TFloatPoint">
<short>
Implements the Divide operator (/) for values using the TFloatPoint and 
TPoint types.
</short>
<descr/>
</element>

<element name="operator /(TPoint,TFloatPoint):TFloatPoint">
<short>
Implements the Divide operator (/) for values using the TPoint and 
TFloatPoint types.
</short>
<descr/>
</element>

<element name="operator =(TPoint,TPoint):Boolean">
<short>
Implements the Equal operator (=) to compare values using the TPoint type.
</short>
<descr>
<p>
The result is <b>True</b> when the X and Y members in the compared values are 
the same.
</p>
</descr>
</element>

<element name="operator =(TFloatPoint,TFloatPoint):Boolean">
<short>
Implements the Equal operator (=) to compare values using the TFloatPoint type.
</short>
<descr>
<p>
The result is <b>True</b> when the X and Y members in the compared values are 
the same.
</p>
</descr>
</element>

<element name="operator =(TRect,TRect):Boolean">
<short>
Implements the Equal operator (=) to compare values using the TRect type.
</short>
<descr>
<p>
The result is <b>True</b> when the Left, Top, Right, and Bottom members in the 
compared values are the same.
</p>
</descr>
</element>

<element name="operator :=(TFloatPoint):TPoint">
<short>
Implements the Assign operator (=) to store a value using the TFloatPoint type 
to a TPoint instance.
</short>
<descr>
<p>
<var>SimpleRoundTo</var> in the RTL <file>math.pp</file> unit is called to 
round both the X and Y members to a Double value with 0 decimals in the 
precision. The Double values are truncated and stored to the Longint types 
used for the X and Y members in the result for the operator.
</p>
</descr>
</element>

<element name="operator :=(TPoint):TFloatPoint">
<short>
Implements the Assign operator (=) to store a value using the TPoint type to a 
TFloatPoint instance.
</short>
<descr/>
</element>

<topic name="GraphMathOperators">
<short>
<b>GraphMath Operators</b>.
</short>
<descr>
<p>
This Unit contains a number of routines for calculating and converting
series of graphic points from one coordinate system to another.
</p>
<p>
A fundamental type is introduced, called TFloatPoint. It is an extended
precision record containing an X and a Y coordinate for a graphic point.
Its structure is as follows:
</p>
<code>
type
  TFloatPoint = record
    X, Y: Extended;
  end;
</code>
<p>
The Unit contains definitions for mathematical operators which extend the
normal definitions of addition, subtraction, multiplication, division and
comparison to cover manipulations with TFloatPoints, allowing, for example,
addition or multiplication of two TFloatPoints, a TFloatPoint and a TPoint,
or a TFloatPoint and an Extended precision number.
</p>
</descr>
</topic>
</module>
<!-- GraphMath -->
</package>
</fpdoc-descriptions>