mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-21 18:39:28 +02:00
1025 lines
30 KiB
XML
1025 lines
30 KiB
XML
<?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>
|