[]
A helper class for creating instances of SvgPathData.
public class SvgPathBuilder
Initializes a new instance of the SvgPathBuilder class.
public SvgPathBuilder()
Gets a value indicating whether the path contains not closed figures.
public bool ContainsOpenFigures { get; }
Gets the number of figures in the path.
public int FigureCount { get; }
Gets a value indicating whether the path has interior space for filling.
public bool HasFillingArea { get; }
Appends the specified SvgPathCommand to the current path.
public void Add(SvgPathCommand command)
command
SvgPathCommandAdds the "closepath" command to the path.
public void AddClosePath(bool relative = true)
relative
boolIndicates whether the command uses absolute (false) or relative (true) coordinates.
Adds the "curveto" command to the path.
public void AddCurveTo(bool relative, float x1, float y1, float x2, float y2, float x, float y)
relative
boolIndicates whether the command uses absolute (false) or relative (true) coordinates.
x1
floatThe X-coordinate of the first control point.
y1
floatThe Y-coordinate of the first control point.
x2
floatThe X-coordinate of the second control point.
y2
floatThe Y-coordinate of the second control point.
x
floatThe X-coordinate of the destination point.
y
floatThe Y-coordinate of the destination point.
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)
relative
boolIndicates whether the command uses absolute (false) or relative (true) coordinates.
rx
floatThe X-radius of the elliptical arc.
ry
floatThe Y-radius of the elliptical arc.
xAxisRotation
floatA value indicating how the ellipse as a whole is rotated, in degrees, relative to the current coordinate system.
arcSize
ArcSizeA value indicating whether the arc sweep is greater than or equal to 180 degrees.
sweepDirection
SweepDirectionA value that specifies whether the arc sweep is clockwise or counterclockwise.
x
floatThe X-coordinate of the destination point.
y
floatThe Y-coordinate of the destination point.
Adds the "horizontal lineto" command to the path.
public void AddHorizontalLineTo(bool relative, float x)
relative
boolIndicates whether the command uses absolute (false) or relative (true) coordinates.
x
floatThe X-coordinate of the destination point.
Adds the "lineto" command to the path.
public void AddLineTo(bool relative, float x, float y)
relative
boolIndicates whether the command uses absolute (false) or relative (true) coordinates.
x
floatThe X-coordinate of the destination point.
y
floatThe Y-coordinate of the destination point.
Adds the "moveto" command to the path.
public void AddMoveTo(bool relative, float x, float y)
relative
boolIndicates whether the command uses absolute (false) or relative (true) coordinates.
x
floatThe X-coordinate of the destination point.
y
floatThe Y-coordinate of the destination point.
Adds the "quadratic Bézier curveto" command to the path.
public void AddQuadraticBezierCurveTo(bool relative, float x1, float y1, float x, float y)
relative
boolIndicates whether the command uses absolute (false) or relative (true) coordinates.
x1
floatThe X-coordinate of the control point.
y1
floatThe Y-coordinate of the control point.
x
floatThe X-coordinate of the destination point.
y
floatThe Y-coordinate of the destination point.
Adds the "smooth curveto" command to the path.
public void AddSmoothCurveTo(bool relative, float x2, float y2, float x, float y)
relative
boolIndicates whether the command uses absolute (false) or relative (true) coordinates.
x2
floatThe X-coordinate of the second control point.
y2
floatThe Y-coordinate of the second control point.
x
floatThe X-coordinate of the destination point.
y
floatThe Y-coordinate of the destination point.
Adds the "smooth quadratic Bézier curveto" command to the path.
public void AddSmoothQuadraticBezierCurveTo(bool relative, float x, float y)
relative
boolIndicates whether the command uses absolute (false) or relative (true) coordinates.
x
floatThe X-coordinate of the destination point.
y
floatThe Y-coordinate of the destination point.
Adds the "vertical lineto" command to the path.
public void AddVerticalLineTo(bool relative, float y)
relative
boolIndicates whether the command uses absolute (false) or relative (true) coordinates.
y
floatThe Y-coordinate of the destination point.
Clears the internal state of SvgPathBuilder and prepares for a new path.
public void Reset()
Creates a new instance of the SvgPathData class.
public SvgPathData ToPathData()