Table of Contents

Class PdnRegion

Namespace
PaintDotNet
Assembly
PaintDotNet.Core.dll

Designed as a proxy to the GDI+ Region class, while allowing for a replacement that won't break code. The main reason for having this right now is to work around some bugs in System.Drawing.Region, especially the memory leak in GetRegionScans().

public sealed class PdnRegion : IIsDisposed, IDisposable
Inheritance
PdnRegion
Implements
Inherited Members

Constructors

PdnRegion()
PdnRegion(PdnGraphicsPath)
PdnRegion(RectDouble)
PdnRegion(RectInt32)
PdnRegion(GraphicsPath)
PdnRegion(RegionData)
PdnRegion(Rectangle)
PdnRegion(RectangleF)
PdnRegion(Region)
PdnRegion(Region, bool)

Properties

IsDisposed
SyncRoot

Methods

Clone()
Complement(PdnRegion)
Complement(GraphicsPath)
Complement(Rectangle)
Complement(RectangleF)
Complement(Region)
CreateEmpty()
Dispose()
Exclude(PdnRegion)
Exclude(RectInt32)
Exclude(GraphicsPath)
Exclude(Rectangle)
Exclude(RectangleF)
Exclude(Region)
~PdnRegion()
FromRectangles(RectInt32[])
FromRectangles(RectInt32[], int, int)
FromRectangles(IEnumerable<RectInt32>)
FromRectangles(IList<RectInt32>)
FromRectangles(IList<RectInt32>, int, int)
FromRectangles(IReadOnlyList<RectInt32>)
FromRectangles(IReadOnlyList<RectInt32>, int, int)
FromRectangles(RectangleF[])
FromRectangles(RectangleF[], int, int)
FromRectangles(Rectangle[])
FromRectangles(Rectangle[], int, int)
GetArea64()
GetBounds()
GetBounds(Graphics)
GetBoundsInt()
GetBoundsRectInt32()
GetRegionData()
GetRegionReadOnly()
GetRegionScans()
GetRegionScansInt()
GetRegionScansReadOnly()

This is an optimized version of GetRegionScans that returns a reference to the array that is used to cache the region scans. This mitigates performance when this array is requested many times on an unmodified PdnRegion. Thus, by using this method you are promising to not modify the array that is returned.

GetRegionScansReadOnlyInt()
Intersect(PdnRegion)
Intersect(GraphicsPath)
Intersect(Rectangle)
Intersect(RectangleF)
Intersect(Region)
IsEmpty()
IsEmpty(Graphics)
IsInfinite(Graphics)
IsVisible(Point)
IsVisible(Point, Graphics)
IsVisible(PointF)
IsVisible(PointF, Graphics)
IsVisible(Rectangle)
IsVisible(Rectangle, Graphics)
IsVisible(RectangleF)
IsVisible(RectangleF, Graphics)
IsVisible(int, int, Graphics)
IsVisible(int, int, int, int)
IsVisible(int, int, int, int, Graphics)
IsVisible(float, float)
IsVisible(float, float, Graphics)
IsVisible(float, float, float, float)
IsVisible(float, float, float, float, Graphics)
MakeEmpty()
MakeInfinite()
Transform(Matrix)
Union(PdnRegion)
Union(GraphicsPath)
Union(Rectangle)
Union(RectangleF)
Union(RectangleF[])
Union(Region)
WrapRegion(Region)
Xor(PdnRegion)
Xor(Rectangle)
Xor(RectangleF)
Xor(Region)