Table of Contents

Class XGraphicsPath

Namespace
PdfSharp.Drawing
Assembly
PdfSharp-gdi.dll

Represents a series of connected lines and curves.

public sealed class XGraphicsPath
Inheritance
XGraphicsPath
Inherited Members

Constructors

XGraphicsPath()

Initializes a new instance of the XGraphicsPath class.

public XGraphicsPath()

XGraphicsPath(PointF[], byte[], XFillMode)

Initializes a new instance of the XGraphicsPath class.

public XGraphicsPath(PointF[] points, byte[] types, XFillMode fillMode)

Parameters

points PointF[]
types byte[]
fillMode XFillMode

Properties

FillMode

Gets or sets an XFillMode that determines how the interiors of shapes are filled.

public XFillMode FillMode { get; set; }

Property Value

XFillMode

Internals

Grants access to internal objects of this class.

public XGraphicsPathInternals Internals { get; }

Property Value

XGraphicsPathInternals

Methods

AddArc(XPoint, XPoint, XSize, double, bool, XSweepDirection)

Adds an elliptical arc to the current figure. The arc is specified WPF like.

public void AddArc(XPoint point1, XPoint point2, XSize size, double rotationAngle, bool isLargeArg, XSweepDirection sweepDirection)

Parameters

point1 XPoint
point2 XPoint
size XSize
rotationAngle double
isLargeArg bool
sweepDirection XSweepDirection

AddArc(XRect, double, double)

Adds an elliptical arc to the current figure.

public void AddArc(XRect rect, double startAngle, double sweepAngle)

Parameters

rect XRect
startAngle double
sweepAngle double

AddArc(double, double, double, double, double, double)

Adds an elliptical arc to the current figure.

public void AddArc(double x, double y, double width, double height, double startAngle, double sweepAngle)

Parameters

x double
y double
width double
height double
startAngle double
sweepAngle double

AddArc(Rectangle, double, double)

Adds an elliptical arc to the current figure.

public void AddArc(Rectangle rect, double startAngle, double sweepAngle)

Parameters

rect Rectangle
startAngle double
sweepAngle double

AddArc(RectangleF, double, double)

Adds an elliptical arc to the current figure.

public void AddArc(RectangleF rect, double startAngle, double sweepAngle)

Parameters

rect RectangleF
startAngle double
sweepAngle double

AddBezier(XPoint, XPoint, XPoint, XPoint)

Adds a cubic Bézier curve to the current figure.

public void AddBezier(XPoint pt1, XPoint pt2, XPoint pt3, XPoint pt4)

Parameters

pt1 XPoint
pt2 XPoint
pt3 XPoint
pt4 XPoint

AddBezier(double, double, double, double, double, double, double, double)

Adds a cubic Bézier curve to the current figure.

public void AddBezier(double x1, double y1, double x2, double y2, double x3, double y3, double x4, double y4)

Parameters

x1 double
y1 double
x2 double
y2 double
x3 double
y3 double
x4 double
y4 double

AddBezier(Point, Point, Point, Point)

Adds a cubic Bézier curve to the current figure.

public void AddBezier(Point pt1, Point pt2, Point pt3, Point pt4)

Parameters

pt1 Point
pt2 Point
pt3 Point
pt4 Point

AddBezier(PointF, PointF, PointF, PointF)

Adds a cubic Bézier curve to the current figure.

public void AddBezier(PointF pt1, PointF pt2, PointF pt3, PointF pt4)

Parameters

pt1 PointF
pt2 PointF
pt3 PointF
pt4 PointF

AddBeziers(XPoint[])

Adds a sequence of connected cubic Bézier curves to the current figure.

public void AddBeziers(XPoint[] points)

Parameters

points XPoint[]

AddBeziers(PointF[])

Adds a sequence of connected cubic Bézier curves to the current figure.

public void AddBeziers(PointF[] points)

Parameters

points PointF[]

AddBeziers(Point[])

Adds a sequence of connected cubic Bézier curves to the current figure.

public void AddBeziers(Point[] points)

Parameters

points Point[]

AddClosedCurve(XPoint[])

Adds a closed curve to this path.

public void AddClosedCurve(XPoint[] points)

Parameters

points XPoint[]

AddClosedCurve(XPoint[], double)

Adds a closed curve to this path.

public void AddClosedCurve(XPoint[] points, double tension)

Parameters

points XPoint[]
tension double

AddClosedCurve(PointF[])

Adds a closed curve to this path.

public void AddClosedCurve(PointF[] points)

Parameters

points PointF[]

AddClosedCurve(PointF[], double)

Adds a closed curve to this path.

public void AddClosedCurve(PointF[] points, double tension)

Parameters

points PointF[]
tension double

AddClosedCurve(Point[])

Adds a closed curve to this path.

public void AddClosedCurve(Point[] points)

Parameters

points Point[]

AddClosedCurve(Point[], double)

Adds a closed curve to this path.

public void AddClosedCurve(Point[] points, double tension)

Parameters

points Point[]
tension double

AddCurve(XPoint[])

Adds a spline curve to the current figure.

public void AddCurve(XPoint[] points)

Parameters

points XPoint[]

AddCurve(XPoint[], double)

Adds a spline curve to the current figure.

public void AddCurve(XPoint[] points, double tension)

Parameters

points XPoint[]
tension double

AddCurve(XPoint[], int, int, double)

Adds a spline curve to the current figure.

public void AddCurve(XPoint[] points, int offset, int numberOfSegments, double tension)

Parameters

points XPoint[]
offset int
numberOfSegments int
tension double

AddCurve(PointF[])

Adds a spline curve to the current figure.

public void AddCurve(PointF[] points)

Parameters

points PointF[]

AddCurve(PointF[], double)

Adds a spline curve to the current figure.

public void AddCurve(PointF[] points, double tension)

Parameters

points PointF[]
tension double

AddCurve(PointF[], int, int, float)

Adds a spline curve to the current figure.

public void AddCurve(PointF[] points, int offset, int numberOfSegments, float tension)

Parameters

points PointF[]
offset int
numberOfSegments int
tension float

AddCurve(Point[])

Adds a spline curve to the current figure.

public void AddCurve(Point[] points)

Parameters

points Point[]

AddCurve(Point[], double)

Adds a spline curve to the current figure.

public void AddCurve(Point[] points, double tension)

Parameters

points Point[]
tension double

AddCurve(Point[], int, int, float)

Adds a spline curve to the current figure.

public void AddCurve(Point[] points, int offset, int numberOfSegments, float tension)

Parameters

points Point[]
offset int
numberOfSegments int
tension float

AddEllipse(XRect)

Adds an ellipse to the current path.

public void AddEllipse(XRect rect)

Parameters

rect XRect

AddEllipse(double, double, double, double)

Adds an ellipse to the current path.

public void AddEllipse(double x, double y, double width, double height)

Parameters

x double
y double
width double
height double

AddEllipse(Rectangle)

Adds an ellipse to the current path.

public void AddEllipse(Rectangle rect)

Parameters

rect Rectangle

AddEllipse(RectangleF)

Adds an ellipse to the current path.

public void AddEllipse(RectangleF rect)

Parameters

rect RectangleF

AddLine(XPoint, XPoint)

Adds a line segment to current figure.

public void AddLine(XPoint pt1, XPoint pt2)

Parameters

pt1 XPoint
pt2 XPoint

AddLine(double, double, double, double)

Adds a line segment to current figure.

public void AddLine(double x1, double y1, double x2, double y2)

Parameters

x1 double
y1 double
x2 double
y2 double

AddLine(Point, Point)

Adds a line segment to current figure.

public void AddLine(Point pt1, Point pt2)

Parameters

pt1 Point
pt2 Point

AddLine(PointF, PointF)

Adds a line segment to current figure.

public void AddLine(PointF pt1, PointF pt2)

Parameters

pt1 PointF
pt2 PointF

AddLines(XPoint[])

Adds a series of connected line segments to current figure.

public void AddLines(XPoint[] points)

Parameters

points XPoint[]

AddLines(PointF[])

Adds a series of connected line segments to current figure.

public void AddLines(PointF[] points)

Parameters

points PointF[]

AddLines(Point[])

Adds a series of connected line segments to current figure.

public void AddLines(Point[] points)

Parameters

points Point[]

AddPath(XGraphicsPath, bool)

Adds the specified path to this path.

public void AddPath(XGraphicsPath path, bool connect)

Parameters

path XGraphicsPath
connect bool

AddPie(XRect, double, double)

Adds the outline of a pie shape to this path.

public void AddPie(XRect rect, double startAngle, double sweepAngle)

Parameters

rect XRect
startAngle double
sweepAngle double

AddPie(double, double, double, double, double, double)

Adds the outline of a pie shape to this path.

public void AddPie(double x, double y, double width, double height, double startAngle, double sweepAngle)

Parameters

x double
y double
width double
height double
startAngle double
sweepAngle double

AddPie(Rectangle, double, double)

Adds the outline of a pie shape to this path.

public void AddPie(Rectangle rect, double startAngle, double sweepAngle)

Parameters

rect Rectangle
startAngle double
sweepAngle double

AddPie(RectangleF, double, double)

Adds the outline of a pie shape to this path.

public void AddPie(RectangleF rect, double startAngle, double sweepAngle)

Parameters

rect RectangleF
startAngle double
sweepAngle double

AddPolygon(XPoint[])

Adds a polygon to this path.

public void AddPolygon(XPoint[] points)

Parameters

points XPoint[]

AddPolygon(PointF[])

Adds a polygon to this path.

public void AddPolygon(PointF[] points)

Parameters

points PointF[]

AddPolygon(Point[])

Adds a polygon to this path.

public void AddPolygon(Point[] points)

Parameters

points Point[]

AddRectangle(XRect)

Adds a rectangle to this path.

public void AddRectangle(XRect rect)

Parameters

rect XRect

AddRectangle(double, double, double, double)

Adds a rectangle to this path.

public void AddRectangle(double x, double y, double width, double height)

Parameters

x double
y double
width double
height double

AddRectangle(Rectangle)

Adds a rectangle to this path.

public void AddRectangle(Rectangle rect)

Parameters

rect Rectangle

AddRectangle(RectangleF)

Adds a rectangle to this path.

public void AddRectangle(RectangleF rect)

Parameters

rect RectangleF

AddRectangles(XRect[])

Adds a series of rectangles to this path.

public void AddRectangles(XRect[] rects)

Parameters

rects XRect[]

AddRectangles(RectangleF[])

Adds a series of rectangles to this path.

public void AddRectangles(RectangleF[] rects)

Parameters

rects RectangleF[]

AddRectangles(Rectangle[])

Adds a series of rectangles to this path.

public void AddRectangles(Rectangle[] rects)

Parameters

rects Rectangle[]

AddRoundedRectangle(XRect, SizeF)

Adds a rectangle with rounded corners to this path.

public void AddRoundedRectangle(XRect rect, SizeF ellipseSize)

Parameters

rect XRect
ellipseSize SizeF

AddRoundedRectangle(double, double, double, double, double, double)

Adds a rectangle with rounded corners to this path.

public void AddRoundedRectangle(double x, double y, double width, double height, double ellipseWidth, double ellipseHeight)

Parameters

x double
y double
width double
height double
ellipseWidth double
ellipseHeight double

AddRoundedRectangle(Rectangle, Size)

Adds a rectangle with rounded corners to this path.

public void AddRoundedRectangle(Rectangle rect, Size ellipseSize)

Parameters

rect Rectangle
ellipseSize Size

AddRoundedRectangle(RectangleF, SizeF)

Adds a rectangle with rounded corners to this path.

public void AddRoundedRectangle(RectangleF rect, SizeF ellipseSize)

Parameters

rect RectangleF
ellipseSize SizeF

AddString(string, XFontFamily, XFontStyleEx, double, XPoint, XStringFormat)

Adds a text string to this path.

public void AddString(string s, XFontFamily family, XFontStyleEx style, double emSize, XPoint origin, XStringFormat format)

Parameters

s string
family XFontFamily
style XFontStyleEx
emSize double
origin XPoint
format XStringFormat

AddString(string, XFontFamily, XFontStyleEx, double, XRect, XStringFormat)

Adds a text string to this path.

public void AddString(string s, XFontFamily family, XFontStyleEx style, double emSize, XRect layoutRect, XStringFormat format)

Parameters

s string
family XFontFamily
style XFontStyleEx
emSize double
layoutRect XRect
format XStringFormat

AddString(string, XFontFamily, XFontStyleEx, double, Point, XStringFormat)

Adds a text string to this path.

public void AddString(string s, XFontFamily family, XFontStyleEx style, double emSize, Point origin, XStringFormat format)

Parameters

s string
family XFontFamily
style XFontStyleEx
emSize double
origin Point
format XStringFormat

AddString(string, XFontFamily, XFontStyleEx, double, PointF, XStringFormat)

Adds a text string to this path.

public void AddString(string s, XFontFamily family, XFontStyleEx style, double emSize, PointF origin, XStringFormat format)

Parameters

s string
family XFontFamily
style XFontStyleEx
emSize double
origin PointF
format XStringFormat

AddString(string, XFontFamily, XFontStyleEx, double, Rectangle, XStringFormat)

Adds a text string to this path.

public void AddString(string s, XFontFamily family, XFontStyleEx style, double emSize, Rectangle layoutRect, XStringFormat format)

Parameters

s string
family XFontFamily
style XFontStyleEx
emSize double
layoutRect Rectangle
format XStringFormat

AddString(string, XFontFamily, XFontStyleEx, double, RectangleF, XStringFormat)

Adds a text string to this path.

public void AddString(string s, XFontFamily family, XFontStyleEx style, double emSize, RectangleF layoutRect, XStringFormat format)

Parameters

s string
family XFontFamily
style XFontStyleEx
emSize double
layoutRect RectangleF
format XStringFormat

Clone()

Clones this instance.

public XGraphicsPath Clone()

Returns

XGraphicsPath

CloseFigure()

Closes the current figure and starts a new figure.

public void CloseFigure()

Flatten()

Converts each curve in this XGraphicsPath into a sequence of connected line segments.

public void Flatten()

Flatten(XMatrix)

Converts each curve in this XGraphicsPath into a sequence of connected line segments.

public void Flatten(XMatrix matrix)

Parameters

matrix XMatrix

Flatten(XMatrix, double)

Converts each curve in this XGraphicsPath into a sequence of connected line segments.

public void Flatten(XMatrix matrix, double flatness)

Parameters

matrix XMatrix
flatness double

StartFigure()

Starts a new figure without closing the current figure.

public void StartFigure()

Widen(XPen)

Replaces this path with curves that enclose the area that is filled when this path is drawn by the specified pen.

public void Widen(XPen pen)

Parameters

pen XPen

Widen(XPen, XMatrix)

Replaces this path with curves that enclose the area that is filled when this path is drawn by the specified pen.

public void Widen(XPen pen, XMatrix matrix)

Parameters

pen XPen
matrix XMatrix

Widen(XPen, XMatrix, double)

Replaces this path with curves that enclose the area that is filled when this path is drawn by the specified pen.

public void Widen(XPen pen, XMatrix matrix, double flatness)

Parameters

pen XPen
matrix XMatrix
flatness double