SKRegion Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Encapsulates the geometric region used to specify clipping areas for drawing.
public class SKRegion : SkiaSharp.SKObject
- Inheritance
Constructors
| Name | Description |
|---|---|
| SKRegion() |
Creates an empty region. |
| SKRegion(SKPath) |
Initializes a new instance of the SKRegion class using the area described by the path. |
| SKRegion(SKRectI) |
Initializes a new instance of the SKRegion class using the area described by the rectangle. |
| SKRegion(SKRegion) |
Initializes a new instance of the SKRegion class by copying an existing region. |
Properties
| Name | Description |
|---|---|
| Bounds |
Gets the bounds of this region. |
| Handle |
Gets or sets the handle to the underlying native object. (Inherited from SKObject) |
| IgnorePublicDispose |
Gets or sets a value indicating whether the call the public Dispose() should be no-op. (Inherited from SKNativeObject) |
| IsComplex |
Gets a value indicating whether the region is complex (more than a single rectangle). |
| IsDisposed |
Gets or sets a value indicating whether the object has already been disposed. (Inherited from SKNativeObject) |
| IsEmpty |
Gets a value indicating whether the region is empty. |
| IsRect |
Gets a value indicating whether the region is a single rectangle. |
| OwnsHandle |
Gets or sets a value indicating whether this object owns its handle and should destroy the native object when it is disposed. (Inherited from SKNativeObject) |
Methods
| Name | Description |
|---|---|
| Contains(Int32, Int32) |
Check to see if the specified coordinates are completely inside the current region. |
| Contains(SKPath) |
Check to see if the specified path is completely inside the current region. |
| Contains(SKPointI) |
Check to see if the specified coordinates are completely inside the current region. |
| Contains(SKRectI) |
Check to see if the specified rect is completely inside the current region. |
| Contains(SKRegion) |
Check to see if the specified region is completely inside the current region. |
| CreateClipIterator(SKRectI) |
Creates an iterator that returns the rectangles of the region clipped to the specified rectangle. |
| CreateRectIterator() |
Creates an iterator that returns the rectangles that make up the region. |
| CreateSpanIterator(Int32, Int32, Int32) |
Creates an iterator that returns the horizontal spans of the region intersected with the specified line. |
| Dispose() |
Releases all resources used by this SKNativeObject. (Inherited from SKNativeObject) |
| Dispose(Boolean) |
Releases the unmanaged resources used by the SKRegion and optionally releases the managed resources. |
| DisposeInternal() |
Triggers a dispose, ignoring the value of IgnorePublicDispose. (Inherited from SKNativeObject) |
| DisposeManaged() |
Implemented by derived SKObject types to destroy any managed objects. (Inherited from SKObject) |
| DisposeNative() |
Implemented by derived SKObject types to destroy any native objects. |
| DisposeUnownedManaged() |
Implemented by derived SKObject types to dispose managed objects that are not owned by this instance. (Inherited from SKObject) |
| GetBoundaryPath() |
Returns a path that describes the boundary of the region. |
| Intersects(SKPath) |
Check to see if the specified path intersects with the current region. |
| Intersects(SKRectI) |
Check to see if the specified rectangle intersects with the current region. |
| Intersects(SKRegion) |
Check to see if the specified region intersects with the current region. |
| Op(Int32, Int32, Int32, Int32, SKRegionOperation) |
Sets this region to the result of applying the operation to this region and the specified rectangle. |
| Op(SKPath, SKRegionOperation) |
Sets this region to the result of applying the operation to this region and the specified path. |
| Op(SKRectI, SKRegionOperation) |
Sets this region to the result of applying the operation to this region and the specified rectangle. |
| Op(SKRegion, SKRegionOperation) |
Sets this region to the result of applying the operation to this region and the specified region. |
| QuickContains(SKRectI) |
Quickly checks if the specified rectangle is completely inside the region. |
| QuickReject(SKPath) |
Quickly checks if the specified path does not intersect the region. |
| QuickReject(SKRectI) |
Quickly checks if the specified rectangle does not intersect the region. |
| QuickReject(SKRegion) |
Quickly checks if the specified region does not intersect the current region. |
| SetEmpty() |
Sets the region to be empty. |
| SetPath(SKPath, SKRegion) |
Sets this region to the area described by the path, clipped. |
| SetPath(SKPath) |
Sets this region to the area described by the path, clipped to the current region. |
| SetRect(SKRectI) |
Sets this region to the specified rectangle. |
| SetRects(ReadOnlySpan<SKRectI>) |
Sets the region to the union of the specified rectangles. |
| SetRects(SKRectI[]) |
Sets the region to the union of the specified rectangles. |
| SetRegion(SKRegion) |
Sets this region to the specified region. |
| Translate(Int32, Int32) |
Translates the region by the specified offset. |