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
|
<?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="lcl">
<!--
====================================================================
LazRegions
====================================================================
-->
<module name="LazRegions">
<short>
Implements non-native regions with support for managing their Z-order.
</short>
<descr>
<p>
<file>lazregions.pas</file> contains classes, types, and routines used to
implement clipping regions in <var>TLazCanvas</var>, and regions used in
custom-drawn LCL controls.
</p>
<p>
Author: Felipe Monteiro de Carvalho
</p>
</descr>
<!-- unresolved external references -->
<element name="Classes"/>
<element name="SysUtils"/>
<element name="fpcanvas"/>
<element name="LCLType"/>
<!-- enumeration type Visibility: default -->
<element name="TLazRegionFillMode">
<short>
Represents region fill modes used for polygons in Lazarus regions.
</short>
<descr>
<p>
Adheres to the nomenclature used in the Windows GDI API.
</p>
</descr>
<seealso>
<link id="TLazRegionPolygon.FillMode"/>
<link id="TLazRegion.AddPolygon"/>
</seealso>
</element>
<element name="TLazRegionFillMode.rfmOddEven">
<short>
Use the alternate fill mode (fills the area between odd-numbered and
even-numbered polygon sides on each scan line).
</short>
</element>
<element name="TLazRegionFillMode.rfmWinding">
<short>
Use the winding fill mode (fills any region with a non-zero winding value).
</short>
</element>
<element name="TPointArray">
<short>
Defines an array type used for TPoint values.
</short>
<descr>
<p>
<var>TPointArray</var> is an array type used for <var>TPoint</var> instances
which define the vertices in a polygon. It is used to implement the
<var>Points</var> member in <var>TLazRegionPolygon</var>, and passed as an
argument to the <var>AddPolygon</var> method in <var>TLazRegion</var>.
</p>
<p>
TPointArray is an alias for the TPointArray type defined in the
<file>LazUtils</file> <file>graphtype.pp</file> unit.
</p>
</descr>
<version>
Modified in LCL version 4.0 to be an alias to the TPointArray type defined in
the <file>graphtype.pp</file> unit (LazUtils).
</version>
<seealso>
<link id="TLazRegionPolygon.Points"/>
<link id="TLazRegion.AddPolygon"/>
<link id="#lazutils.graphtype.TPointArray">TPointArray</link>
</seealso>
</element>
<!-- class Visibility: default -->
<element name="TLazRegionPart">
<short>Base class used for rectangular areas in a region.</short>
<descr>
<p>
<var>TLazRegionPart</var> defines the base class used to represent a
rectangular area in a region. <var>TLazRegionPart</var> is used as the
ancestor for the <var>TLazRegionRect</var> class.
</p>
</descr>
<seealso>
<link id="TLazRegionRect"/>
</seealso>
</element>
<element name="TLazRegionPart.GetBoundingRect">
<short>Gets the rectangle with the Bounds for an area in a region.</short>
<descr>
<p>
<var>GetBoundingRect</var> is a <var>TRect</var> function used to get the
rectangle with the Bounds for a rectangular area in a region. In
TLazRegionPart, the return value contains an empty rectangle (with zero
assigned to its Left, Top, Right, Bottom, Width, and Height members).
</p>
</descr>
<seealso/>
</element>
<!-- function Visibility: public -->
<element name="TLazRegionPart.IsPointInPart">
<short>
Indicates if a point with the specified coordinates is within the bounds for
the rectangular area.
</short>
<descr>
<p>
Always returns <var>False</var> in <var>TLazRegionPart</var>; it uses an
empty rectangle as its Bounds (Left, Top, Bottom, and Right set to zero).
</p>
</descr>
<errors></errors>
<seealso/>
</element>
<element name="TLazRegionPart.IsPointInPart.Result">
<short>
<b>True</b> when the coordinates are located in the bounds for the
rectangular area.
</short>
</element>
<element name="TLazRegionPart.IsPointInPart.AX">
<short>Horizontal coordinate for the point.</short>
</element>
<element name="TLazRegionPart.IsPointInPart.AY">
<short>Vertical coordinate for the point.</short>
</element>
<!-- class Visibility: default -->
<element name="TLazRegionRect">
<short>Implements a region defined by a TRect structure.</short>
<descr>
<p>
<var>TLazRegionRect</var> is a <var>TLazRegionPart</var> descendant which
implements a region as a rectangular area. It includes a <var>Rect</var>
member used to store the <var>TRect</var> with the bounds for the region. It
also provides an overridden <var>IsPointInPart</var> method to examine the
Rect member when locating a point in the region. Instances of TLazRegionRect
are created when the <var>AddRectangle</var> method in <var>TLazRegion</var>
is called.
</p>
</descr>
<seealso>
<link id="TLazRegionPart"/>
<link id="TLazRegion.Parts"/>
<link id="TLazRegion.AddRectangle"/>
</seealso>
</element>
<!-- variable Visibility: public -->
<element name="TLazRegionRect.Rect">
<short>Rectangle with the bounds that defines the region.</short>
<descr>
<p>
<var>Rect</var> is a <var>TRect</var> member which contains the rectangular
area that is the bounds for the region.
</p>
</descr>
<seealso/>
</element>
<!-- function Visibility: public -->
<element name="TLazRegionRect.IsPointInPart">
<short>
Indicates if a point with the specified coordinates is within the rectangle
used as the bounds for the region.
</short>
<descr>
<p>
Overrides the method in the ancestor class to use the <var>Rect</var> member
as the bounds for the region.
</p>
</descr>
<seealso/>
</element>
<element name="TLazRegionRect.IsPointInPart.Result">
<short>
<b>True</b> when the coordinates are located in the bounds rectangle for the
region.
</short>
</element>
<element name="TLazRegionRect.IsPointInPart.AX">
<short>Horizontal coordinate for the point.</short>
</element>
<element name="TLazRegionRect.IsPointInPart.AY">
<short>Vertical coordinate for the point.</short>
</element>
<!-- class Visibility: default -->
<element name="TLazRegionPolygon">
<short>
Represents a region defined as a series of vertices for a polygon.
</short>
<descr>
<p>
<var>TLazRegionPolygon</var> is a <var>TLazRegionPart</var> descendant which
implements a region as a polygonal area defined by a series of vertices.
</p>
<p>
The <var>Points</var> member contains the <var>TPoint</var> values that
define the vertices for the polygon. <var>FillMode</var> defines how the
interior of the polygon is filled, and uses values like those defined for the
Windows GDI API. An overridden <var>IsPointInPart</var> is provided to
determine if a point is within the bounds for the polygonal area.
</p>
<p>
Instances of TLazRegionPolygon are created when the <var>AddPolygon</var>
method in <var>TLazRegion</var> is called.
</p>
</descr>
<seealso>
<link id="TLazRegion.AddPolygon"/>
<link id="TLazRegion.Parts"/>
<link id="TLazRegionPart"/>
</seealso>
</element>
<!-- variable Visibility: public -->
<element name="TLazRegionPolygon.Points">
<short>
Array of TPoint values that define the vertices for the polygonal region.
</short>
<descr/>
<seealso/>
</element>
<!-- variable Visibility: public -->
<element name="TLazRegionPolygon.FillMode">
<short>Fill mode used for the polygon.</short>
<descr/>
<seealso/>
</element>
<!-- function Visibility: public -->
<element name="TLazRegionPolygon.IsPointInPart">
<short>
Indicates if a point with the specified coordinates is within the vertices
for the polygonal region.
</short>
<descr>
<p>
<var>IsPointInPart</var> is an overridden <var>Boolean</var> function which
indicates if a point with the specified coordinates is within the vertices
for the polygonal region.
</p>
<p>
<var>IsPointInPart</var> calls the <var>IsPointInPolygon</var> routine to get
the return value for the method. The return value is <b>True</b> when the
point in <var>AX</var> and <var>AY</var> is located inside the polygon
vertices defined in the <var>Points</var> member.
</p>
</descr>
<seealso>
<link id="IsPointInPolygon"/>
<link id="TLazRegionPolygon.Points"/>
</seealso>
</element>
<element name="TLazRegionPolygon.IsPointInPart.Result">
<short>
<b>True</b> when the point occurs inside the vertices for the polygonal
region.
</short>
</element>
<element name="TLazRegionPolygon.IsPointInPart.AX">
<short>Horizontal coordinate for the point.</short>
</element>
<element name="TLazRegionPolygon.IsPointInPart.AY">
<short>Vertical coordinate for the point.</short>
</element>
<element name="TLazRegionEllipse">
<short>Implements a region defined as an Ellipse.</short>
<descr>
<p>
<var>TLazRegionEllipse</var> is a <var>TLazRegionPart</var> descendant which
implements a region defined as an elliptical area with the specified vertex
and co-vertex. The <var>X1</var>, <var>X2</var>, <var>Y1</var>, and
<var>Y2</var> members are provided to represent the horizontal and vertical
coordinates for the vertex and co-vertex points.
</p>
<p>
Instances of <var>TLazRegionEllipse</var> are created when the
<var>AddEllipse</var> method in <var>TLazRegion</var> is called.
</p>
</descr>
<seealso>
<link id="TLazRegion.AddEllipse"/>
<link id="TLazRegion.Parts"/>
<link id="TLazRegionPart"/>
</seealso>
</element>
<element name="TLazRegionEllipse.X1">
<short>Horizontal coordinate for the vertex.</short>
<descr/>
<seealso/>
</element>
<element name="TLazRegionEllipse.Y1">
<short>Vertical coordinate for the vertex.</short>
<descr/>
<seealso/>
</element>
<element name="TLazRegionEllipse.X2">
<short>Horizontal coordinate for the co-vertex.</short>
<descr/>
<seealso/>
</element>
<element name="TLazRegionEllipse.Y2">
<short>Vertical coordinate for the co-vertex.</short>
<descr/>
<seealso/>
</element>
<element name="TLazRegionEllipse.IsPointInPart">
<short>
Indicates if the specified point is located inside the elliptical area for
the region.
</short>
<descr>
<p>
The equation for the inner area of an axis aligned ellipse is:
</p>
<code>(X/a)^2 + (Y/b)^2 <= 1</code>
</descr>
<seealso/>
</element>
<element name="TLazRegionEllipse.IsPointInPart.Result">
<short>
<b>True</b> when the specified point is located inside the area for the
ellipse.
</short>
</element>
<element name="TLazRegionEllipse.IsPointInPart.AX">
<short>Horizontal coordinate for the point.</short>
</element>
<element name="TLazRegionEllipse.IsPointInPart.AY">
<short>Vertical coordinate for the point.</short>
</element>
<element name="TFPCustomRegion">
<short/>
<descr/>
<seealso/>
<version>
Defined for FPC version 2.6 or older. Defined in <file>fpcanvas.pp</file> in
the FCL for later FPC versions.
</version>
</element>
<element name="TFPCustomRegion.GetBoundingRect">
<short/>
<descr/>
<seealso/>
<version>
Defined for FPC version 2.6. Defined in <file>fpcanvas.pp</file> for later
FPC versions.
</version>
</element>
<element name="TFPCustomRegion.GetBoundingRect.Result">
<short/>
<version>
Defined for FPC version 2.6. Defined in <file>fpcanvas.pp</file> for later
FPC versions.
</version>
</element>
<element name="TFPCustomRegion.IsPointInRegion">
<short/>
<version>
Defined for FPC version 2.6. Defined in <file>fpcanvas.pp</file> for later
FPC versions.
</version>
</element>
<element name="TFPCustomRegion.IsPointInRegion.Result">
<short/>
<version>
Defined for FPC version 2.6. Defined in <file>fpcanvas.pp</file> for later
FPC versions.
</version>
</element>
<element name="TFPCustomRegion.IsPointInRegion.AX">
<short/>
<version>
Defined for FPC version 2.6. Defined in <file>fpcanvas.pp</file> for later
FPC versions.
</version>
</element>
<element name="TFPCustomRegion.IsPointInRegion.AY">
<short/>
<version>
Defined for FPC version 2.6. Defined in <file>fpcanvas.pp</file> for later
FPC versions.
</version>
</element>
<!-- class Visibility: default -->
<element name="TLazRegion">
<short>Represents a custom region in the Lazarus LCL.</short>
<descr>
<p>
<var>TLazRegion</var> is a <var>TFPCustomRegion</var> descendant which
represents a region as used in the Lazarus LCL. It is used to implement the
clipping region in <var>TLazCanvas</var>, and in custom-drawn windowed LCL
controls. The region is composed of <var>TLazRegionPart</var> descendants
representing the rectangles, polygons, and ellipses that define the display
area on a device. TLazRegion provides overridden methods to query information
for the composite display area.
</p>
<p>
The parts of a region should all be inside valid areas for the region. If a
combine operation removes an area in the region, then the area should be
removed from all parts for the region. There is no z-order for the
<var>Parts</var>, they are all validly inside the region area.
</p>
</descr>
<seealso>
<link id="TLazRegionWithChilds"/>
<link id="#lcl.lazcanvas.TLazCanvas">TLazCanvas</link>
<link id="#lcl.lazcanvas.TLazCanvasState.ClipRegion">TLazCanvasState.ClipRegion</link>
</seealso>
</element>
<!-- variable Visibility: public -->
<element name="TLazRegion.Parts">
<short>
List with the Rectangles, Polygons, and Ellipses that define the display area
for the region.
</short>
<descr/>
<seealso/>
</element>
<!-- variable Visibility: public -->
<element name="TLazRegion.IsSimpleRectRegion">
<short>
Indicates whether this region is composed of a single rectangular part.
</short>
<descr>
<p>
Use <var>Rect</var> to access the <var>TRect</var> structure with the bounds
for the rectangular region.
</p>
</descr>
<seealso/>
</element>
<!-- variable Visibility: public -->
<element name="TLazRegion.Rect">
<short>TRect instance with the bounds for the region.</short>
<descr/>
<seealso/>
</element>
<!-- constructor Visibility: public -->
<element name="TLazRegion.Create">
<short>Constructor for the class instance.</short>
<descr>
<p>
<var>Create</var> is the constructor for the class instance. Create calls the
inherited constructor to initialize the class instance. Create allocates
resources needed for the <var>Parts</var> member, and sets the default value
for <var>IsSimpleRectRegion</var> to <b>True</b>.
</p>
</descr>
<seealso/>
</element>
<!-- destructor Visibility: public -->
<element name="TLazRegion.Destroy">
<short>Destructor for the class instance.</short>
<descr>
<p>
<var>Destroy</var> is the overridden destructor for the class instance.
Destroy ensures that resource allocated for the <var>Parts</var> member are
freed. Destroy calls the inherited destructor prior to exiting from the
method.
</p>
<remark>
Destroy does not call <var>Parts.Clear</var> prior to freeing the
<var>Parts</var> member; that action is performed in the destructor for the
<var>TFPList</var> class instance.
</remark>
</descr>
<seealso/>
</element>
<element name="TLazRegion.Assign">
<short>Stores values from ASrcRegion in the current class instance.</short>
<descr>
<p>
Calls <var>Clear</var> to remove any items stored in <var>Parts</var>.
Calls <var>AddPartsFromRegion</var> to capture the values from the source
region.
</p>
</descr>
<seealso/>
</element>
<element name="TLazRegion.Assign.ASrcRegion">
<short>Region with the values stored in the method.</short>
</element>
<element name="TLazRegion.Clear">
<short>
Frees all of the TLazRegionPart instances in Parts, and clears the list.
</short>
<descr>
<p>
Frees all of the <var>TLazRegionPart</var> instances in the <var>Parts</var>
member, and clears the list.
</p>
</descr>
<seealso/>
</element>
<element name="TLazRegion.CombineWith">
<short>
Combines the specified source region using the given region operation.
</short>
<descr>
<p>
<var>ASrcRegion</var> is the source region with the Parts applied in the
method.
</p>
<p>
<var>AOperation</var> can contain a Combine Region flag that includes:
</p>
<ul>
<li>RGN_AND (1)</li>
<li>RGN_OR (2)</li>
<li>RGN_XOR (3)</li>
<li>RGN_DIFF (4)</li>
<li>RGN_COPY(5)</li>
</ul>
<remark>
In the current LCL version, only <var>RGN_COPY</var> and <var>RGN_OR</var>
are implemented; all other values are ignored and no actions are performed in
the method. RGN_COPY causes the Parts in ASrcRegion to be assigned to the
Parts in the current class instance. RGN_OR cause the Parts in ASrcRegion to
the be added to the Parts in the current class instance.
</remark>
</descr>
<seealso/>
</element>
<element name="TLazRegion.CombineWith.ASrcRegion">
<short>Source region with values applied in the method.</short>
</element>
<element name="TLazRegion.CombineWith.AOperation">
<short>
Combine region flag with the operation to perform for the subregions.
</short>
</element>
<element name="TLazRegion.GetRegionKind">
<short>Gets the type of region represented in the class instance.</short>
<descr>
<p>
<var>GetRegionKind</var> is a <var>Longint</var> function used to get the
type of region represented in the class instance. The return value adheres to
the region flag values used in the Windows GDI API, and can include one of
the following:
</p>
<dl>
<dt>COMPLEXREGION (3)</dt>
<dd>
The region has more than one rectangle, polygon, or ellipse. Used when
IsSimpleRectRegion is <b>False</b>.
</dd>
<dt>SIMPLEREGION (2)</dt>
<dd>
The region is a simple rectangle defined using the Rect member. Used when
IsSimpleRectRegion is <b>True</b>, and Rect is not an empty rectangle (Left,
Top, Bottom, and Right all contain zero).
</dd>
<dt>NULLREGION (1)</dt>
<dd>
The region has an empty value in its Rect member (Left, Top, Width, and
Height all contain zero).
</dd>
<dt>REGION_ERROR (0)</dt>
<dd>An error occurred. Not used in GetRegionKind.</dd>
</dl>
</descr>
<seealso/>
</element>
<element name="TLazRegion.GetRegionKind.Result">
<short>Region flag value for the class instance.</short>
</element>
<element name="TLazRegion.IsSimpleRectEmpty">
<short>
Indicates whether the Rect member contains empty or invalid rectangle
coordinates.
</short>
<descr/>
<seealso/>
</element>
<element name="TLazRegion.IsSimpleRectEmpty.Result">
<short>
<b>True</b> when the dimensions for the rectangle are invalid.
</short>
</element>
<element name="TLazRegion.AddPart">
<short>Adds the specified part as a subregion in the Parts member.</short>
<descr>
<p>
<var>AddPart</var> is a procedure used to add the specified
<var>TLazRegionPart</var> in <var>APart</var> to the <var>Parts</var> member
in the class instance. AddPart calls the <var>TFPList.Add</var> method to
store the value in APart in the list. AddPart calls
<var>DoChangeToComplexRegion</var> to update <var>IsSimpleRectRegion</var> to
reflect the current composition for the region.
</p>
<p>
AddPart is used in the implementation of the <var>AddRectangle</var>,
<var>AddPolygon</var>, and <var>AddEllipse</var> methods.
</p>
</descr>
<seealso>
<link id="TLazRegion.DoChangeToComplexRegion"/>
<link id="TLazRegion.IsSimpleRectRegion"/>
<link id="TLazRegion.AddRectangle"/>
<link id="TLazRegion.AddPolygon"/>
<link id="TLazRegion.AddEllipse"/>
<link id="TLazRegionPart"/>
</seealso>
</element>
<element name="TLazRegion.AddPart.APart">
<short>TLazRegionPart (or descendant) added in the method.</short>
</element>
<!-- procedure Visibility: public -->
<element name="TLazRegion.AddRectangle">
<short>Adds the specified TRect instance to the Parts member.</short>
<descr>
<p>
<var>AddRectangle</var> is a procedure used to add a rectangular region
defined by the <var>TRect</var> instance in <var>ARect</var> to the
<var>Parts</var> member. AddRectangle creates a <var>TLazRegionRect</var>
instance and assigns ARect to its <var>Rect</var> member. AddRectangle calls
<var>AddPart</var> to store the TLazRegionRect instance in Parts.
</p>
</descr>
<seealso>
<link id="TLazRegionRect"/>
<link id="TLazRegion.AddPart"/>
<link id="TLazRegion.Parts"/>
</seealso>
</element>
<element name="TLazRegion.AddRectangle.ARect">
<short>TRect instance with the rectangular region added in the method.</short>
</element>
<!-- procedure Visibility: public -->
<element name="TLazRegion.AddPolygon">
<short>
Adds a polygonal area with the specified vertices to the region.
</short>
<descr>
<p>
<var>AddPolygon</var> is a procedure used to add a polygonal area with the
specified vertices to the region. <var>APoints</var> is an array with
<var>TPoint</var> instances that define each of the vertices for the polygon.
<var>AFillMode</var> is a <var>TLazRegionFillMode</var> value that defines
the fill mode for the polygonal area.
</p>
<p>
AddPolygon creates a <var>TLazRegionPolygon</var> instance that is used to
store the area definition in the <var>Parts</var> member. The arguments to
the method are assigned to the <var>Points</var> and <var>FillMode</var>
members in the new class instance. AddPolygon calls <var>AddPart</var> to
store the new TLazRegionPolygon instance in Parts.
</p>
</descr>
<seealso>
<link id="TLazRegion.AddPart"/>
<link id="TLazRegionPolygon"/>
<link id="TLazRegionPolygon.Points"/>
<link id="TLazRegionPolygon.FillMode"/>
<link id="TPointArray"/>
<link id="TLazRegionFillMode"/>
<link id="#lazutils.graphtype.TPointArray">GraphType.TPointArray</link>
</seealso>
</element>
<element name="TLazRegion.AddPolygon.APoints">
<short>
Array of TPoint instances representing the vertices for the polygon.
</short>
</element>
<element name="TLazRegion.AddPolygon.AFillMode">
<short>TLazRegionFillMode value used for the polygon.</short>
</element>
<element name="TLazRegion.AddEllipse">
<short>
Adds an elliptical area with the specified co-vertices to the region.
</short>
<descr>
<p>
<var>AddEllipse</var> is a procedure used to add an elliptical area with the
specified co-vertices to the region. <var>AX1</var> and <var>AY1</var> is the
point where the endpoint for the long axis is located. <var>AX2</var> and
<var>AY2</var> is the point where the endpoint for the short axis is located.
Each point is located perpendicular to the opposing axis, and its diameter
bisects the opposing axis.
</p>
<p>
AddEllipse creates an instance of <var>TLazRegionEllipse</var> and assigns
the arguments to the corresponding members in the new class instance.
AddEllipse calls the <var>AddPart</var> method to store the new
TLazRegionEllipse instance in the <var>Parts</var> member.
</p>
</descr>
<seealso>
<link id="TLazRegion.Parts"/>
<link id="TLazRegion.AddPart"/>
<link id="TLazRegionEllipse"/>
</seealso>
</element>
<element name="TLazRegion.AddEllipse.AX1">
<short>Horizontal coordinate for the endpoint of the major axis.</short>
</element>
<element name="TLazRegion.AddEllipse.AY1">
<short>Vertical coordinate for the endpoint of the major axis.</short>
</element>
<element name="TLazRegion.AddEllipse.AX2">
<short>Horizontal coordinate for the endpoint of the minor axis.</short>
</element>
<element name="TLazRegion.AddEllipse.AY2">
<short>Vertical coordinate for the endpoint of the minor axis.</short>
</element>
<!-- procedure Visibility: public -->
<element name="TLazRegion.SetAsSimpleRectRegion">
<short>Sets the area for the region to the specified rectangle.</short>
<descr/>
<errors></errors>
<seealso/>
</element>
<element name="TLazRegion.SetAsSimpleRectRegion.ARect">
<short>TRect with the bounds for the region.</short>
</element>
<element name="TLazRegion.AddPartsFromRegion">
<short>
Adds the region (and any subregions) from ASrcRegion to the current class
instance.
</short>
<descr>
<p>
<var>AddPartsFromRegion</var> is a procedure used to add the region in
<var>ASrcRegion</var> to the current class instance. ASrcRegion can be
represented as a simple rectangular region, or a complex region using
rectangles, polygons, and/or ellipses.
</p>
<p>
AddPartsFromRegion ensures that the <var>Rect</var> or <var>Parts</var>
members from ASrcRegion are combined in the correct manner with the values in
Rect or Parts for the current class instance. The value in
<var>IsSimpleRectRegion</var> is set to <b>False</b> if it was necessary to
add entries to the <var>Parts</var> member in the method.
</p>
</descr>
<seealso>
<link id="TLazRegion.Rect"/>
<link id="TLazRegion.IsSimpleRectRegion"/>
<link id="TLazRegion.Parts"/>
<link id="TLazRegion.AddPart"/>
</seealso>
</element>
<element name="TLazRegion.AddPartsFromRegion.ASrcRegion">
<short>Region with the values added in the method.</short>
</element>
<element name="TLazRegion.DoChangeToComplexRegion">
<short>
Adds the value in Rect to the Parts member, and resets the value in
IsSimpleRectRegion.
</short>
<descr>
<p>
<var>DoChangeToComplexRegion</var> is a procedure used to change the region
from a simple rectangle to a complex region as defined in the
<var>Parts</var> member. DoChangeToComplexRegion uses the values from
<var>IsSimpleRectRegion</var> and <var>IsSimpleRectEmpty</var> to determine
if any actions are required in the method. No actions are performed when
IsSimpleRectRegion is <b>False</b>, or when IsSimpleRectEmpty returns
<b>True</b>.
</p>
<p>
DoChangeToComplexRegion changes the value in IsSimpleRectRegion to
<b>False</b>, and calls <var>AddRectangle</var> to store the value in
<var>Rect</var> in the <var>Parts</var> member.
</p>
</descr>
<seealso/>
</element>
<!-- function Visibility: public -->
<element name="TLazRegion.GetBoundingRect">
<short>Gets the bounds for the region as a rectangle.</short>
<descr>
<p>
<var>GetBoundingRect</var> is a <var>TRect</var> function used to get the
rectangle structure with the bounds for the region. GetBoundingRect uses the
value in the <var>Rect</var> member as the return value for the method.
</p>
</descr>
<seealso/>
</element>
<element name="TLazRegion.GetBoundingRect.Result">
<short>TRect with the bounds for the region.</short>
</element>
<!-- function Visibility: public -->
<element name="TLazRegion.IsPointInRegion">
<short>Checks whether the specified point is inside the region.</short>
<descr>
<p>
Checks if the specified point is inside the display area for the region. Uses
the value in <var>IsSimpleRectRegion</var> to determine whether
<var>Rect</var> contains the bounds for the region. When it contains
<b>False</b>, the values in the <var>Parts</var> member are used to determine
the return value.
</p>
<p>
Returns <b>True</b> when the specified point is located inside the rectangle
or one of the subregions.
</p>
</descr>
<seealso/>
</element>
<element name="TLazRegion.IsPointInRegion.Result">
<short>
<b>True</b> when the point is located inside the rectangle or one of the
subregions that define the bounds for the region.
</short>
</element>
<element name="TLazRegion.IsPointInRegion.AX">
<short>Horizontal coordinate for the point.</short>
</element>
<element name="TLazRegion.IsPointInRegion.AY">
<short>Vertical coordinate for the point.</short>
</element>
<!-- class Visibility: default -->
<element name="TLazRegionWithChilds">
<short>Implement a region which can have other regions as children.</short>
<descr>
<p>
<var>TLazRegionWithChilds</var> is a <var>TLazRegion</var> descendant which
implements a region which can hold a list of other region holders. Use
<var>Parent</var> to access the complex region which owns the current class
instance. Use <var>Childs</var> to access the list of subregions for the
class instance.
</p>
</descr>
<seealso/>
</element>
<!-- variable Visibility: public -->
<element name="TLazRegionWithChilds.Parent">
<short>
Complex region which hosts the subregions in the current class instance.
</short>
<descr>
<remark>
<var>Parent</var> is not maintain in methods for the class instance; it is
available for use in widget set classes which utilize the region.
</remark>
</descr>
<seealso/>
</element>
<!-- variable Visibility: public -->
<element name="TLazRegionWithChilds.Childs">
<short>List of subregions for the current class instance.</short>
<descr>
<p>
The order in this list is also the Z-Order of the sub regions inside it. The
element with index zero is the bottom-most one.
</p>
</descr>
<seealso/>
</element>
<!-- variable Visibility: public -->
<element name="TLazRegionWithChilds.UserData">
<short>Contains an available link to another object.</short>
<descr>
Contains an available link to another object.
</descr>
<seealso/>
</element>
<!-- constructor Visibility: public -->
<element name="TLazRegionWithChilds.Create">
<short>Constructor for the class instance.</short>
<descr>
<p>
<var>Create</var> is the overridden constructor for the class instance.
Create calls the inherited constructor to initialize the class instance, and
allocates resources needed for the <var>Childs</var> member.
</p>
</descr>
<seealso/>
</element>
<!-- destructor Visibility: public -->
<element name="TLazRegionWithChilds.Destroy">
<short>Destructor for the class instance.</short>
<descr>
<p>
<var>Destroy</var> is the overridden destructor for the class instance.
Destroy ensures that resources allocated to the <var>Childs</var> member are
freed. Destroy calls the inherited destructor prior to exiting from the
method.
</p>
</descr>
<seealso/>
</element>
<!-- function Visibility: public -->
<element name="TLazRegionWithChilds.IsPointInRegion">
<short>
Indicates if the specified point is within the bounds for the region.
</short>
<descr>
<p>
Returns itself or a child, depending on where the point was found, or nil if
the point is neither in the region nor in any children.
</p>
<p>
Part of the behavior is implemented in TLazRegionWithChilds.
</p>
</descr>
<seealso/>
</element>
<element name="TLazRegionWithChilds.IsPointInRegion.Result">
<short>
<b>True</b> when the point is within the bounds for one of the child areas in
the region.
</short>
</element>
<element name="TLazRegionWithChilds.IsPointInRegion.AX">
<short>Horizontal coordinate for the point.</short>
</element>
<element name="TLazRegionWithChilds.IsPointInRegion.AY">
<short>Vertical coordinate for the point.</short>
</element>
<!-- function Visibility: default -->
<element name="IsPointInPolygon">
<short>
Determines if the specified point is inside the vertices for the specified
polygon.
</short>
<descr>
<p>
The function will return <b>True</b> if the point at AX, AY is inside the
specified polygon. Returns <b>False</b> if it is not.
</p>
<p>
Original C code:
<url href="http://www.visibone.com/inpoly/inpoly.c.txt">
http://www.visibone.com/inpoly/inpoly.c.txt
</url>.
</p>
<p>
Translated from C to Pascal by: Felipe Monteiro de Carvalho.
</p>
</descr>
<seealso>
<link id="TLazRegionPolygon.IsPointInPart"/>
</seealso>
</element>
<element name="IsPointInPolygon.Result">
<short>
<b>True</b> when the specified point is located within the polygon using the
specified vertices.
</short>
</element>
<element name="IsPointInPolygon.AX">
<short>Horizontal coordinate for the point.</short>
</element>
<element name="IsPointInPolygon.AY">
<short>Vertical coordinate for the point.</short>
</element>
<element name="IsPointInPolygon.APolygon">
<short>
Array with the TPoint values that define the vertices for the polygon.
</short>
</element>
</module>
<!-- LazRegions -->
</package>
</fpdoc-descriptions>
|