The TRSGPCanvasRegion class describes an area of the display surface. The area can be any shape. In other words, the boundary of the area can be a combination of curved and straight lines. Regions can also be created from the interiors of rectangles, paths, or a combination of these. Regions are used in clipping and hit-testing operations.
Note |
---|
This region class requires a canvas owner. |
Namespace: RSGdiPlusGraphics
TPersistent |
Delphi |
type |
|
|
By default, the region is replaced with the input. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Overloaded. Combines the current region with the rectangle region The mode parameter controls how the combining takes place: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cmReplace |
New region replaces existing region |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cmComplement |
Specifies that the existing region is replaced by the portion of the new region that is outside of the existing region. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cmExclude |
Specifies that the existing region is replaced by the portion of itself that is outside of the new region. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cmIntersect |
Updates this region to the portion of itself that intersects the specified object's interior. |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cmUnion |
Updates this region to all portions (intersecting and nonintersecting) of itself and all portions of another object |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
cmXOR |
Updates this region to the nonintersecting portions of itself and the specified object's interior |
By default, the region is replaced with the input.
Combine(TRSGPPath,TRSGPRegionCombineMode)
Overloaded. Combines the current region with the path.
The mode parameter controls how the combining takes place:
cmReplace
New region replaces existing region
cmComplement
Specifies that the existing region is replaced by the portion of the new region that is outside of the existing region.
cmExclude
Specifies that the existing region is replaced by the portion of itself that is outside of the new region.
cmIntersect
Updates this region to the portion of itself that intersects the specified object's interior.
cmUnion
Updates this region to all portions (intersecting and nonintersecting) of itself and all portions of another object
cmXOR
Updates this region to the nonintersecting portions of itself and the specified object's interior
By default, the region is replaced with the input.
Combine(TRSGPRegion,TRSGPRegionCombineMode)
Overloaded. Combines the current region with the data from the input region
The mode parameter controls how the combining takes place:
cmReplace
New region replaces existing region
cmComplement
Specifies that the existing region is replaced by the portion of the new region that is outside of the existing region.
cmExclude
Specifies that the existing region is replaced by the portion of itself that is outside of the new region.
cmIntersect
Updates this region to the portion of itself that intersects the specified object's interior.
cmUnion
Updates this region to all portions (intersecting and nonintersecting) of itself and all portions of another object
cmXOR
Updates this region to the nonintersecting portions of itself and the specified object's interior
By default, the region is replaced with the input.
Overloaded. Determines whether this region is equal to an object. If the Obj is a region, the method compares the shape of the region to see if they are equal.
Returns a rectangle that encloses this region.
Returns the data that describes this region.
Call this method to acquire a handle from the GDI+ flat API library (Overrides RSGdiPlusGraphics.TRSGPGraphicsObject.GetHandle.)
Creates a Windows Graphics Device Interface (GDI) region from this region.
Overloaded. Gets an array of rectangles that approximate this region. The region is transformed by the owner canvas' matrix before the rectangles are calculated.
Determines whether this region is empty.
Determines whether this region is infinite.
Overloaded. Returns true if the point is inside this region.
Overloaded. Returns true if the point is inside this region.
Overloaded. Returns true if a rectangle intersects this region.
Overloaded. Returns true if a rectangle intersects this region.
Updates this region to an infinite region.
Called when the Canvas is releasing control of the graphics object. The canvas will no longer be responsible for freeing the graphics object. (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
Prepare the graphics object for drawing. Graphics objects respond in this method to upcoming calls. For example, gradient brushes can make sure the gradient will cover the entire rectangle. (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
Represents method QueryInterface(TGUID,Void). (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
Releases the underlying GDI+ object back to the GDI+ library. (Overrides RSGdiPlusGraphics.TRSGPGraphicsObject.ReleaseHandle.)
Overloaded. Offsets this region by specified amounts in the horizontal and vertical directions.
Overloaded. Offsets this region by specified amounts in the horizontal and vertical directions.
Update native graphics object (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
Represents method _AddRef. (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
Represents method _Release. (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
|
Reference |