TLazRegion class
Represents a custom region in the Lazarus LCL.
Declaration
TLazRegion = class(TFPCustomRegion)Inheritance
- TLazRegion
TFPCustomRegion
Descends from it: TLazRegionWithChilds
Description
TLazRegion is a
TFPCustomRegion descendant which
represents a region as used in the Lazarus LCL. It is used to implement the
clipping region in
TLazCanvas, and in custom-drawn windowed LCL
controls. The region is composed of
TLazRegionPart 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.
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
Parts, they are all validly inside the region area.
See also
Methods
Create | public | Constructor for the class instance. |
Destroy | public | Destructor for the class instance. |
Assign | public | Stores values from ASrcRegion in the current class instance. |
Clear | public | Frees the TLazRegionPart instances in Parts, and clears the list storage. |
CombineWith | public | Combines the specified source region using the given region operation. |
GetRegionKind | public | Gets the type of region represented in the class instance. |
IsSimpleRectEmpty | public | Indicates whether the Rect member contains empty or invalid rectangle coordinates. |
AddPart | public | Adds the specified part as a subregion in the Parts member. |
AddRectangle | public | Adds the specified TRect instance to the Parts member. |
AddPolygon | public | Adds a polygonal area with the specified vertices to the region. |
AddEllipse | public | Adds an elliptical area with the specified co-vertices to the region. |
SetAsSimpleRectRegion | public | Sets the area for the region to the specified rectangle. |
AddPartsFromRegion | public | Adds the region (and any subregions) from ASrcRegion to the current class instance. |
DoChangeToComplexRegion | public | Adds the value in Rect to the Parts member, and resets the value in IsSimpleRectRegion. |
GetBoundingRect | public | Gets the bounds for the region as a rectangle. |
IsPointInRegion | public | Checks whether the specified point is inside the region. |
Fields
Parts | public | List with the Rectangles, Polygons, and Ellipses that define the display area for the region. |
IsSimpleRectRegion | public | Indicates whether this region is composed of a single rectangular part. |
Rect | public | TRect instance with the bounds for the region. |
An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.
