Sign in Join
FPDoc Onlineexperiment

TLazRegion class

In unit LazRegions

Represents a custom region in the Lazarus LCL.

Declaration

pascal
TLazRegion = class(TFPCustomRegion)

Inheritance

  1. TLazRegion
  2. 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

CreatepublicConstructor for the class instance.
DestroypublicDestructor for the class instance.
AssignpublicStores values from ASrcRegion in the current class instance.
ClearpublicFrees the TLazRegionPart instances in Parts, and clears the list storage.
CombineWithpublicCombines the specified source region using the given region operation.
GetRegionKindpublicGets the type of region represented in the class instance.
IsSimpleRectEmptypublicIndicates whether the Rect member contains empty or invalid rectangle coordinates.
AddPartpublicAdds the specified part as a subregion in the Parts member.
AddRectanglepublicAdds the specified TRect instance to the Parts member.
AddPolygonpublicAdds a polygonal area with the specified vertices to the region.
AddEllipsepublicAdds an elliptical area with the specified co-vertices to the region.
SetAsSimpleRectRegionpublicSets the area for the region to the specified rectangle.
AddPartsFromRegionpublicAdds the region (and any subregions) from ASrcRegion to the current class instance.
DoChangeToComplexRegionpublicAdds the value in Rect to the Parts member, and resets the value in IsSimpleRectRegion.
GetBoundingRectpublicGets the bounds for the region as a rectangle.
IsPointInRegionpublicChecks whether the specified point is inside the region.

Fields

PartspublicList with the Rectangles, Polygons, and Ellipses that define the display area for the region.
IsSimpleRectRegionpublicIndicates whether this region is composed of a single rectangular part.
RectpublicTRect instance with the bounds for the region.

An experiment, built from development snapshots. Not the official Free Pascal or Lazarus documentation.