Table of Contents

Class Region

Namespace
Alternet.Drawing
Assembly
Alternet.UI.Common.dll

Describes the interior of a graphics shape composed of rectangles and paths.

public class Region : HandledObject<IRegionHandler>, IBaseObjectWithAttr, IBaseObjectWithId, INotifyPropertyChanged, IImmutableObject, IDisposableObject, IDisposable, IBaseObject
Inheritance
Region
Implements
Extension Methods

Constructors

Region()

This constructor creates an invalid (empty, null) Region.

Region(IRegionHandler)

Initializes a new instance of the Region class.

Region(RectD, float)

Initializes a new Region from the specified RectI structure.

Region(RectI)

Initializes a new Region from the specified RectI structure.

Region(Region)

Initializes a new Region from the specified Region.

Region(ReadOnlySpan<PointD>, FillMode, float)

Initializes a new Region from the polygon specified by the points array.

Properties

IsEmpty

Returns true if the region is empty, false otherwise.

IsOk

Returns true if the region is ok, false otherwise.

ScaleFactor

Gets or sets the scale factor for the region. This value is used when converting parameters for the region operations from device-independent units to pixels. Internally the region is stored in pixels.

Methods

Clear()

Clears the region.

Contains(PointI)

Returns a value indicating whether the given point is contained within the region.

Contains(RectI)

Returns a value indicating whether the given rectangle is contained within the region.

CreateHandler()

Creates handler.

Equals(object?)

Determines whether the specified object is equal to the current object.

GetBounds()

Gets a RectI structure that represents a rectangle that bounds this Region.

GetBounds(Graphics)

Gets a RectD structure that represents a rectangle that bounds this Region.

GetHashCode()

Calculates hash code for this object.

Intersect(RectI)

Updates this Region to the intersection of itself with the specified RectI structure.

Intersect(Region)

Updates this Region to the intersection of itself with the specified Region.

Subtract(RectI)

Subtracts a rectangular region from this region.

Subtract(Region)

Subtracts a region from this region.

Translate(int, int)

Offsets the coordinates of this Region by the specified amount.

Union(RectD)

Updates this Region to the union of itself with the specified RectD structure.

Union(RectI)

Updates this Region to the union of itself with the specified RectI structure.

Union(Region)

Updates this Region to the union of itself with the specified Region.

Xor(RectI)

Updates this Region to the xor of itself with the specified RectI structure.

Xor(Region)

Updates this Region to the xor of itself with the specified Region.