PathBuilder Class
Builds a PathData.
public sealed class PathBuilderConstructors
| Name | Description |
|---|---|
| PathBuilder() |
PathBuilder()
PathBuilder.cspublic PathBuilder()No documentation is available.
Properties
| Name | Description |
|---|---|
| IsEmpty | Gets a value that indicates whether no command was added. |
IsEmpty
PathBuilder.csMethods
| Name | Description |
|---|---|
| AddCircle(double, double, double) | Adds a circle, as two half arcs, clockwise. |
| AddRectangle(double, double, double, double) | Adds a rectangle, clockwise. |
| ArcTo(double, double, double, bool, bool, double, double) | Draws an elliptical arc, as the SVG A command. |
| Build() | Creates the path. |
| Close() | Closes the current contour. |
| CubicTo(double, double, double, double, double, double) | Draws a cubic Bézier curve. |
| LineTo(double, double) | Draws a straight line. |
| MoveTo(double, double) | Starts a new contour. |
| QuadraticTo(double, double, double, double) | Draws a quadratic Bézier curve. |
AddCircle(double, double, double)
PathBuilder.csAdds a circle, as two half arcs, clockwise.
public PathBuilder AddCircle(double centerX, double centerY, double radius)Parameters
centerXdouble- The x coordinate of the center.
centerYdouble- The y coordinate of the center.
radiusdouble- The radius.
Returns
PathBuilder The builder.
AddRectangle(double, double, double, double)
PathBuilder.csAdds a rectangle, clockwise.
public PathBuilder AddRectangle(double x, double y, double width, double height)ArcTo(double, double, double, bool, bool, double, double)
PathBuilder.csDraws an elliptical arc, as the SVG A command.
public PathBuilder ArcTo(double radiusX, double radiusY, double rotation, bool largeArc, bool sweep, double x, double y)Parameters
radiusXdouble- The x radius.
radiusYdouble- The y radius.
rotationdouble- The rotation of the ellipse, in degrees.
largeArcbool- Whether the arc is the larger of the two candidate arcs.
sweepbool- Whether the arc is drawn clockwise.
xdouble- The x coordinate of the end.
ydouble- The y coordinate of the end.
Returns
PathBuilder The builder.
Build()
PathBuilder.csClose()
PathBuilder.csCubicTo(double, double, double, double, double, double)
PathBuilder.csDraws a cubic Bézier curve.
Parameters
x1double- The x coordinate of the first control point.
y1double- The y coordinate of the first control point.
x2double- The x coordinate of the second control point.
y2double- The y coordinate of the second control point.
xdouble- The x coordinate of the end.
ydouble- The y coordinate of the end.
Returns
PathBuilder The builder.
LineTo(double, double)
PathBuilder.csDraws a straight line.
public PathBuilder LineTo(double x, double y)MoveTo(double, double)
PathBuilder.csStarts a new contour.
public PathBuilder MoveTo(double x, double y)QuadraticTo(double, double, double, double)
PathBuilder.csDraws a quadratic Bézier curve.
public PathBuilder QuadraticTo(double x1, double y1, double x, double y)Parameters
x1double- The x coordinate of the control point.
y1double- The y coordinate of the control point.
xdouble- The x coordinate of the end.
ydouble- The y coordinate of the end.
Returns
PathBuilder The builder.