The TRSGPRegion 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.
Notes to Implementers |
---|
Wraps the Canvas' region. Needed because GDI+ API doesn't expose handle for Graphic's Region |
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. (Overrides RSGdiPlusGraphics.TRSGPRegion.Equals(TObject).)
Returns a rectangle that encloses this region. (Overrides RSGdiPlusGraphics.TRSGPRegion.GetBounds.)
Returns the data that describes this region. (Overrides RSGdiPlusGraphics.TRSGPRegion.GetData.)
Call this method to acquire a handle from the GDI+ flat API library (Overrides RSGdiPlusGraphics.TRSGPRegion.GetHandle.)
Creates a Windows Graphics Device Interface (GDI) region from this region. (Overrides RSGdiPlusGraphics.TRSGPRegion.GetHRGN.)
Overloaded. Gets an array of rectangles that approximate this region. The region is transformed by the owner canvas' matrix before the rectangles are calculated. (Overrides RSGdiPlusGraphics.TRSGPRegion.GetRegionScans.)
Determines whether this region is empty. (Overrides RSGdiPlusGraphics.TRSGPRegion.IsEmpty.)
Determines whether this region is infinite. (Overrides RSGdiPlusGraphics.TRSGPRegion.IsInfinite.)
Overloaded. Returns true if the point is inside this region. (Overrides RSGdiPlusGraphics.TRSGPRegion.IsVisible(TPoint).)
Overloaded. Returns true if the point is inside this region.
(Overrides RSGdiPlusGraphics.TRSGPRegion.IsVisible(TPointF).)
Overloaded. Returns true if a rectangle intersects this region. (Overrides RSGdiPlusGraphics.TRSGPRegion.IsVisible(TRect).)
Overloaded. Returns true if a rectangle intersects this region. (Overrides RSGdiPlusGraphics.TRSGPRegion.IsVisible(TRectF).)
Updates this region to an infinite region. (Overrides RSGdiPlusGraphics.TRSGPRegion.MakeInfinite.)
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.TRSGPRegion.ReleaseHandle.)
Overloaded. Offsets this region by specified amounts in the horizontal and vertical directions. (Overrides RSGdiPlusGraphics.TRSGPRegion.Translate(Integer,Integer).)
Overloaded. Offsets this region by specified amounts in the horizontal and vertical directions. (Overrides RSGdiPlusGraphics.TRSGPRegion.Translate(Single,Single).)
Update native graphics object (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
Represents method _AddRef. (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
Represents method _Release. (Inherited from RSGdiPlusGraphics.TRSGPGraphicsObject.)
|
Reference |