<PackageReference Include="System.Drawing.Common" Version="9.0.5" />

Region

public sealed class Region : MarshalByRefObject, IDisposable
Describes the interior of a graphics shape composed of rectangles and paths. This class cannot be inherited.
public Region()

Initializes a new Region.

public Region(GraphicsPath path)

Initializes a new Region with the specified GraphicsPath.

public Region(RegionData rgnData)

Initializes a new Region from the specified data.

public Region(Rectangle rect)

Initializes a new Region from the specified Rectangle structure.

public Region(RectangleF rect)

Initializes a new Region from the specified RectangleF structure.

public static Region FromHrgn(IntPtr hrgn)

Initializes a new Region from a handle to the specified existing GDI region.

public Region Clone()

Creates an exact copy of this Region.

public void Complement(GraphicsPath path)

Updates this Region to contain the portion of the specified GraphicsPath that does not intersect with this Region.

public void Complement(Rectangle rect)

Updates this Region to contain the portion of the specified Rectangle structure that does not intersect with this Region.

public void Complement(RectangleF rect)

Updates this Region to contain the portion of the specified RectangleF structure that does not intersect with this Region.

public void Complement(Region region)

Updates this Region to contain the portion of the specified Region that does not intersect with this Region.

public void Dispose()

Releases all resources used by this Region.

public bool Equals(Region region, Graphics g)

Tests whether the specified Region is identical to this Region on the specified drawing surface.

public void Exclude(GraphicsPath path)

Updates this Region to contain only the portion of its interior that does not intersect with the specified GraphicsPath.

public void Exclude(Rectangle rect)

Updates this Region to contain only the portion of its interior that does not intersect with the specified Rectangle structure.

public void Exclude(RectangleF rect)

Updates this Region to contain only the portion of its interior that does not intersect with the specified RectangleF structure.

public void Exclude(Region region)

Updates this Region to contain only the portion of its interior that does not intersect with the specified Region.

Gets a RectangleF structure that represents a rectangle that bounds this Region on the drawing surface of a Graphics object.

public IntPtr GetHrgn(Graphics g)

Returns a Windows handle to this Region in the specified graphics context.

Returns a RegionData that represents the information that describes this Region.

public RectangleF[] GetRegionScans(Matrix matrix)

Returns an array of RectangleF structures that approximate this Region after the specified matrix transformation is applied.

public void Intersect(GraphicsPath path)

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

public void Intersect(Rectangle rect)

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

public void Intersect(RectangleF rect)

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

public void Intersect(Region region)

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

public bool IsEmpty(Graphics g)

Tests whether this Region has an empty interior on the specified drawing surface.

public bool IsInfinite(Graphics g)

Tests whether this Region has an infinite interior on the specified drawing surface.

public bool IsVisible(Point point)

Tests whether the specified Point structure is contained within this Region.

public bool IsVisible(Point point, Graphics g)

Tests whether the specified Point structure is contained within this Region when drawn using the specified Graphics.

public bool IsVisible(PointF point)

Tests whether the specified PointF structure is contained within this Region.

public bool IsVisible(PointF point, Graphics g)

Tests whether the specified PointF structure is contained within this Region when drawn using the specified Graphics.

public bool IsVisible(Rectangle rect)

Tests whether any portion of the specified Rectangle structure is contained within this Region.

public bool IsVisible(Rectangle rect, Graphics g)

Tests whether any portion of the specified Rectangle structure is contained within this Region when drawn using the specified Graphics.

public bool IsVisible(RectangleF rect)

Tests whether any portion of the specified RectangleF structure is contained within this Region.

public bool IsVisible(RectangleF rect, Graphics g)

Tests whether any portion of the specified RectangleF structure is contained within this Region when drawn using the specified Graphics.

public bool IsVisible(int x, int y, Graphics g)

Tests whether the specified point is contained within this Region object when drawn using the specified Graphics object.

public bool IsVisible(int x, int y, int width, int height)

Tests whether any portion of the specified rectangle is contained within this Region.

public bool IsVisible(int x, int y, int width, int height, Graphics g)

Tests whether any portion of the specified rectangle is contained within this Region when drawn using the specified Graphics.

public bool IsVisible(float x, float y)

Tests whether the specified point is contained within this Region.

public bool IsVisible(float x, float y, Graphics g)

Tests whether the specified point is contained within this Region when drawn using the specified Graphics.

public bool IsVisible(float x, float y, float width, float height)

Tests whether any portion of the specified rectangle is contained within this Region.

public bool IsVisible(float x, float y, float width, float height, Graphics g)

Tests whether any portion of the specified rectangle is contained within this Region when drawn using the specified Graphics.

public void MakeEmpty()

Initializes this Region to an empty interior.

public void MakeInfinite()

Initializes this Region object to an infinite interior.

public void ReleaseHrgn(IntPtr regionHandle)

Releases the handle of the Region.

public void Transform(Matrix matrix)

Transforms this Region by the specified Matrix.

public void Translate(int dx, int dy)

Offsets the coordinates of this Region by the specified amount.

public void Translate(float dx, float dy)

Offsets the coordinates of this Region by the specified amount.

public void Union(GraphicsPath path)

Updates this Region to the union of itself and the specified GraphicsPath.

public void Union(Rectangle rect)

Updates this Region to the union of itself and the specified Rectangle structure.

public void Union(RectangleF rect)

Updates this Region to the union of itself and the specified RectangleF structure.

public void Union(Region region)

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

public void Xor(GraphicsPath path)

Updates this Region to the union minus the intersection of itself with the specified GraphicsPath.

public void Xor(Rectangle rect)

Updates this Region to the union minus the intersection of itself with the specified Rectangle structure.

public void Xor(RectangleF rect)

Updates this Region to the union minus the intersection of itself with the specified RectangleF structure.

public void Xor(Region region)

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