[]
        
(Showing Draft Content)

GrapeCity.Documents.Svg.SvgPathBuilder

Class SvgPathBuilder

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

A helper class for creating instances of SvgPathData.

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

Constructors

SvgPathBuilder()

Initializes a new instance of the SvgPathBuilder class.

public SvgPathBuilder()

Properties

ContainsOpenFigures

Gets a value indicating whether the path contains not closed figures.

public bool ContainsOpenFigures { get; }

Property Value

bool

FigureCount

Gets the number of figures in the path.

public int FigureCount { get; }

Property Value

int

HasFillingArea

Gets a value indicating whether the path has interior space for filling.

public bool HasFillingArea { get; }

Property Value

bool

Methods

Add(SvgPathCommand)

Appends the specified SvgPathCommand to the current path.

public void Add(SvgPathCommand command)

Parameters

command SvgPathCommand

AddClosePath(bool)

Adds the "closepath" command to the path.

public void AddClosePath(bool relative = true)

Parameters

relative bool

Indicates whether the command uses absolute (false) or relative (true) coordinates.

AddCurveTo(bool, float, float, float, float, float, float)

Adds the "curveto" command to the path.

public void AddCurveTo(bool relative, float x1, float y1, float x2, float y2, float x, float y)

Parameters

relative bool

Indicates whether the command uses absolute (false) or relative (true) coordinates.

x1 float

The X-coordinate of the first control point.

y1 float

The Y-coordinate of the first control point.

x2 float

The X-coordinate of the second control point.

y2 float

The Y-coordinate of the second control point.

x float

The X-coordinate of the destination point.

y float

The Y-coordinate of the destination point.

AddEllipticalArc(bool, float, float, float, ArcSize, SweepDirection, float, float)

Adds the "elliptical arc" command to the path.

public void AddEllipticalArc(bool relative, float rx, float ry, float xAxisRotation, ArcSize arcSize, SweepDirection sweepDirection, float x, float y)

Parameters

relative bool

Indicates whether the command uses absolute (false) or relative (true) coordinates.

rx float

The X-radius of the elliptical arc.

ry float

The Y-radius of the elliptical arc.

xAxisRotation float

A value indicating how the ellipse as a whole is rotated, in degrees, relative to the current coordinate system.

arcSize ArcSize

A value indicating whether the arc sweep is greater than or equal to 180 degrees.

sweepDirection SweepDirection

A value that specifies whether the arc sweep is clockwise or counterclockwise.

x float

The X-coordinate of the destination point.

y float

The Y-coordinate of the destination point.

AddHorizontalLineTo(bool, float)

Adds the "horizontal lineto" command to the path.

public void AddHorizontalLineTo(bool relative, float x)

Parameters

relative bool

Indicates whether the command uses absolute (false) or relative (true) coordinates.

x float

The X-coordinate of the destination point.

AddLineTo(bool, float, float)

Adds the "lineto" command to the path.

public void AddLineTo(bool relative, float x, float y)

Parameters

relative bool

Indicates whether the command uses absolute (false) or relative (true) coordinates.

x float

The X-coordinate of the destination point.

y float

The Y-coordinate of the destination point.

AddMoveTo(bool, float, float)

Adds the "moveto" command to the path.

public void AddMoveTo(bool relative, float x, float y)

Parameters

relative bool

Indicates whether the command uses absolute (false) or relative (true) coordinates.

x float

The X-coordinate of the destination point.

y float

The Y-coordinate of the destination point.

AddQuadraticBezierCurveTo(bool, float, float, float, float)

Adds the "quadratic Bézier curveto" command to the path.

public void AddQuadraticBezierCurveTo(bool relative, float x1, float y1, float x, float y)

Parameters

relative bool

Indicates whether the command uses absolute (false) or relative (true) coordinates.

x1 float

The X-coordinate of the control point.

y1 float

The Y-coordinate of the control point.

x float

The X-coordinate of the destination point.

y float

The Y-coordinate of the destination point.

AddSmoothCurveTo(bool, float, float, float, float)

Adds the "smooth curveto" command to the path.

public void AddSmoothCurveTo(bool relative, float x2, float y2, float x, float y)

Parameters

relative bool

Indicates whether the command uses absolute (false) or relative (true) coordinates.

x2 float

The X-coordinate of the second control point.

y2 float

The Y-coordinate of the second control point.

x float

The X-coordinate of the destination point.

y float

The Y-coordinate of the destination point.

AddSmoothQuadraticBezierCurveTo(bool, float, float)

Adds the "smooth quadratic Bézier curveto" command to the path.

public void AddSmoothQuadraticBezierCurveTo(bool relative, float x, float y)

Parameters

relative bool

Indicates whether the command uses absolute (false) or relative (true) coordinates.

x float

The X-coordinate of the destination point.

y float

The Y-coordinate of the destination point.

AddVerticalLineTo(bool, float)

Adds the "vertical lineto" command to the path.

public void AddVerticalLineTo(bool relative, float y)

Parameters

relative bool

Indicates whether the command uses absolute (false) or relative (true) coordinates.

y float

The Y-coordinate of the destination point.

Reset()

Clears the internal state of SvgPathBuilder and prepares for a new path.

public void Reset()

ToPathData()

Creates a new instance of the SvgPathData class.

public SvgPathData ToPathData()

Returns

SvgPathData