[]
        
(Showing Draft Content)

GrapeCity.Documents.Imaging.PathBuilder

Class PathBuilder

Namespace
GrapeCity.Documents.Imaging
Assembly
GcDocs.Imaging.dll

A helper class for creating GraphicsPath objects.

public class PathBuilder
Inheritance
object
PathBuilder
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

PathBuilder()

Initializes a new instance of the PathBuilder class.

public PathBuilder()

Properties

FigureHasSegments

Gets a value indicating if the active figure contains one or more segments.

public bool FigureHasSegments { get; }

Property Value

bool

Figures

Gets the list of figures to be converted to a path.

public List<IFigure> Figures { get; }

Property Value

System.Collections.Generic.List<T><IFigure>

FigureStarted

Gets a value indicating if there is an active figure to update.

public bool FigureStarted { get; }

Property Value

bool

Methods

AddArc(ArcSegment)

Adds a single arc to the path geometry.

public void AddArc(ArcSegment arcSegment)

Parameters

arcSegment ArcSegment

The arc segment to add to the figure.

AddCubicBezier(PointF, PointF, PointF)

Creates a cubic Bezier curve and adds it to the figure.

public void AddCubicBezier(PointF controlPoint1, PointF controlPoint2, PointF endPoint)

Parameters

controlPoint1 System.Drawing.PointF
controlPoint2 System.Drawing.PointF
endPoint System.Drawing.PointF

AddCubicBeziers(params PointF[])

Creates a sequence of cubic Bezier curves and adds them to the figure.

public void AddCubicBeziers(params PointF[] points)

Parameters

points System.Drawing.PointF[]

Control point 1, control point 2, and the end point for one or several cubic Bezier curves.

AddFigure(IFigure)

Adds an existing figure to the path.

public void AddFigure(IFigure figure)

Parameters

figure IFigure

AddFigures(params IFigure[])

Adds one or several existing figures to the path.

public void AddFigures(params IFigure[] figures)

Parameters

figures IFigure[]

AddLine(PointF)

Creates a line segment between the current point and the specified end point and adds it to the figure.

public void AddLine(PointF endPoint)

Parameters

endPoint System.Drawing.PointF

The end point of the line to draw.

AddLine(float, float)

Creates a line segment between the current point and the specified end point and adds it to the figure.

public void AddLine(float endPointX, float endPointY)

Parameters

endPointX float

The x-coordinate of the end point of the line to draw.

endPointY float

The y-coordinate of the end point of the line to draw.

AddLines(params PointF[])

Creates a sequence of lines using the specified points and adds them to the figure.

public void AddLines(params PointF[] points)

Parameters

points System.Drawing.PointF[]

An array of one or more points that describe the lines to draw.

AddQuadraticBezier(PointF, PointF)

Creates a quadratic Bezier curve and adds it to the figure.

public void AddQuadraticBezier(PointF controlPoint, PointF endPoint)

Parameters

controlPoint System.Drawing.PointF
endPoint System.Drawing.PointF

AddQuadraticBeziers(params PointF[])

Creates a sequence of quadratic Bezier curves and adds them to the figure.

public void AddQuadraticBeziers(params PointF[] points)

Parameters

points System.Drawing.PointF[]

Control point and the end point for one or several quadratic Bezier curves.

BeginFigure(PointF)

Starts a new figure at the specified point.

public void BeginFigure(PointF startPoint)

Parameters

startPoint System.Drawing.PointF

The point at which to begin the new figure.

BeginFigure(float, float)

Starts a new figure at the specified point.

public void BeginFigure(float startX, float startY)

Parameters

startX float

The x-coordinate of the point at which to begin the new figure.

startY float

The y-coordinate of the point at which to begin the new figure.

CancelFigure()

Discards the active figure.

public void CancelFigure()

Clear()

Clears the list of figures and all pending changes.

public void Clear()

EndFigure(bool)

Ends the current figure; optionally, closes it.

public IFigure EndFigure(bool closeFigure)

Parameters

closeFigure bool

A value indicating whether the current figure should be closed. If the figure is closed, a line is drawn between the end point of the last segment and the start point.

Returns

IFigure

ToPath(FillMode, Matrix3x2)

Creates a GraphicsPath from the current set of figures.

public GraphicsPath ToPath(FillMode fillMode, Matrix3x2 worldTransform)

Parameters

fillMode FillMode

Specifies how the interior of closed figures is filled.

worldTransform System.Numerics.Matrix3x2

The transformation to apply to path figures.

Returns

GraphicsPath

ToPath(FillMode)

Creates a GraphicsPath from the current set of figures.

public GraphicsPath ToPath(FillMode fillMode = FillMode.Alternate)

Parameters

fillMode FillMode

Specifies how the interior of closed figures is filled.

Returns

GraphicsPath