PDFsharp-net6

XGraphicsPath

Namespace: PdfSharp.Drawing

Represents a series of connected lines and curves.

public sealed class XGraphicsPath

Inheritance ObjectXGraphicsPath

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

Constructors

XGraphicsPath()

Initializes a new instance of the XGraphicsPath class.

public XGraphicsPath()

Methods

Clone()

Clones this instance.

public XGraphicsPath Clone()

Returns

XGraphicsPath

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

AddLines(XPoint[])

Adds a series of connected line segments to current figure.

public void AddLines(XPoint[] points)

Parameters

points XPoint[]

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

AddBeziers(XPoint[])

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

public void AddBeziers(XPoint[] points)

Parameters

points XPoint[]

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[], Int32, Int32, Double)

Adds a spline curve to the current figure.

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

Parameters

points XPoint[]

offset Int32

numberOfSegments Int32

tension Double

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(XPoint, XPoint, XSize, Double, Boolean, 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 Boolean

sweepDirection XSweepDirection

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

AddRectangles(XRect[])

Adds a series of rectangles to this path.

public void AddRectangles(XRect[] rects)

Parameters

rects XRect[]

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

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

AddPolygon(XPoint[])

Adds a polygon to this path.

public void AddPolygon(XPoint[] points)

Parameters

points XPoint[]

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

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

AddPath(XGraphicsPath, Boolean)

Adds the specified path to this path.

public void AddPath(XGraphicsPath path, bool connect)

Parameters

path XGraphicsPath

connect Boolean

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

CloseFigure()

Closes the current figure and starts a new figure.

public void CloseFigure()

StartFigure()

Starts a new figure without closing the current figure.

public void StartFigure()

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

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