Class PathBuilder
Namespace: Aspose.Svg.Builder
Assembly: Aspose.SVG.dll (25.5.0)
Builder class for creating SVG path data strings.
[ComVisible(true)]
public class PathBuilder
Inheritance
Inherited Members
object.GetType() , object.MemberwiseClone() , object.ToString() , object.Equals(object?) , object.Equals(object?, object?) , object.ReferenceEquals(object?, object?) , object.GetHashCode()
Constructors
PathBuilder()
public PathBuilder()
Methods
A(double, double, double, bool, bool, double, double)
Adds an ‘Elliptical Arc Curve’ command to the path data.
public PathBuilder A(double r1, double r2, double angle, bool largeArcFlag, bool sweepFlag, double x, double y)
Parameters
r1
double
The x-radius of the ellipse.
r2
double
The y-radius of the ellipse.
angle
double
The rotation angle of the ellipse in degrees.
largeArcFlag
bool
Flag indicating if the arc should be greater than or equal to 180 degrees.
sweepFlag
bool
Flag indicating if the arc should be drawn in a positive angle direction.
x
double
The x-coordinate of the end point of the arc.
y
double
The y-coordinate of the end point of the arc.
Returns
The current PathBuilder instance.
AddPathSegment(string)
Adds a custom path segment to the path data.
public PathBuilder AddPathSegment(string segment)
Parameters
segment
string
The custom path segment string.
Returns
The current PathBuilder instance.
Ar(double, double, double, bool, bool, double, double)
Adds a relative ‘Elliptical Arc Curve’ command to the path data.
public PathBuilder Ar(double r1, double r2, double angle, bool largeArcFlag, bool sweepFlag, double x, double y)
Parameters
r1
double
The x-radius of the ellipse, relative to the current position.
r2
double
The y-radius of the ellipse, relative to the current position.
angle
double
The rotation angle of the ellipse in degrees, relative to the current position.
largeArcFlag
bool
Flag indicating if the arc should be greater than or equal to 180 degrees.
sweepFlag
bool
Flag indicating if the arc should be drawn in a positive angle direction.
x
double
The x-coordinate of the end point of the arc, relative to the current position.
y
double
The y-coordinate of the end point of the arc, relative to the current position.
Returns
The current PathBuilder instance.
Build()
Builds the path data string.
public string Build()
Returns
The constructed path data string.
C(double, double, double, double, double, double)
Adds a ‘Cubic Bezier Curve’ command to the path data.
public PathBuilder C(double x1, double y1, double x2, double y2, double x, double y)
Parameters
x1
double
The x-coordinate of the first control point.
y1
double
The y-coordinate of the first control point.
x2
double
The x-coordinate of the second control point.
y2
double
The y-coordinate of the second control point.
x
double
The x-coordinate of the end point of the curve.
y
double
The y-coordinate of the end point of the curve.
Returns
The current PathBuilder instance.
Cr(double, double, double, double, double, double)
Adds a relative ‘Cubic Bezier Curve’ command to the path data.
public PathBuilder Cr(double x1, double y1, double x2, double y2, double x, double y)
Parameters
x1
double
The x-coordinate of the first control point, relative to the current position.
y1
double
The y-coordinate of the first control point, relative to the current position.
x2
double
The x-coordinate of the second control point, relative to the current position.
y2
double
The y-coordinate of the second control point, relative to the current position.
x
double
The x-coordinate of the end point of the curve, relative to the current position.
y
double
The y-coordinate of the end point of the curve, relative to the current position.
Returns
The current PathBuilder instance.
H(double)
Adds a ‘Horizontal Line To’ command to the path data.
public PathBuilder H(double x)
Parameters
x
double
The x-coordinate to draw a horizontal line to.
Returns
The current PathBuilder instance.
Hr(double)
Adds a relative ‘Horizontal Line To’ command to the path data.
public PathBuilder Hr(double x)
Parameters
x
double
The x-coordinate to draw a horizontal line to, relative to the current position.
Returns
The current PathBuilder instance.
L(double, double)
Adds a ‘Line To’ command to the path data.
public PathBuilder L(double x, double y)
Parameters
x
double
The x-coordinate of the end point of the line.
y
double
The y-coordinate of the end point of the line.
Returns
The current PathBuilder instance.
Lr(double, double)
Adds a relative ‘Line To’ command to the path data.
public PathBuilder Lr(double x, double y)
Parameters
x
double
The x-coordinate of the end point of the line, relative to the current position.
y
double
The y-coordinate of the end point of the line, relative to the current position.
Returns
The current PathBuilder instance.
M(double, double)
Adds a ‘Move To’ command to the path data.
public PathBuilder M(double x, double y)
Parameters
x
double
The x-coordinate to move to.
y
double
The y-coordinate to move to.
Returns
The current PathBuilder instance.
Mr(double, double)
Adds a relative ‘Move To’ command to the path data.
public PathBuilder Mr(double x, double y)
Parameters
x
double
The x-coordinate to move to, relative to the current position.
y
double
The y-coordinate to move to, relative to the current position.
Returns
The current PathBuilder instance.
Q(double, double, double, double)
Adds a ‘Quadratic Bezier Curve’ command to the path data.
public PathBuilder Q(double x1, double y1, double x, double y)
Parameters
x1
double
The x-coordinate of the control point.
y1
double
The y-coordinate of the control point.
x
double
The x-coordinate of the end point of the curve.
y
double
The y-coordinate of the end point of the curve.
Returns
The current PathBuilder instance.
Qr(double, double, double, double)
Adds a relative ‘Quadratic Bezier Curve’ command to the path data.
public PathBuilder Qr(double x1, double y1, double x, double y)
Parameters
x1
double
The x-coordinate of the control point, relative to the current position.
y1
double
The y-coordinate of the control point, relative to the current position.
x
double
The x-coordinate of the end point of the curve, relative to the current position.
y
double
The y-coordinate of the end point of the curve, relative to the current position.
Returns
The current PathBuilder instance.
S(double, double, double, double)
Adds a ‘Smooth Cubic Bezier Curve To’ command to the path data.
public PathBuilder S(double x2, double y2, double x, double y)
Parameters
x2
double
The x-coordinate of the second control point.
y2
double
The y-coordinate of the second control point.
x
double
The x-coordinate of the end point of the curve.
y
double
The y-coordinate of the end point of the curve.
Returns
The current PathBuilder instance.
Sr(double, double, double, double)
Adds a relative ‘Smooth Cubic Bezier Curve To’ command to the path data.
public PathBuilder Sr(double x2, double y2, double x, double y)
Parameters
x2
double
The x-coordinate of the second control point, relative to the current position.
y2
double
The y-coordinate of the second control point, relative to the current position.
x
double
The x-coordinate of the end point of the curve, relative to the current position.
y
double
The y-coordinate of the end point of the curve, relative to the current position.
Returns
The current PathBuilder instance.
T(double, double)
Adds a ‘Smooth Quadratic Bezier Curve To’ command to the path data.
public PathBuilder T(double x, double y)
Parameters
x
double
The x-coordinate of the end point of the curve.
y
double
The y-coordinate of the end point of the curve.
Returns
The current PathBuilder instance.
Tr(double, double)
Adds a relative ‘Smooth Quadratic Bezier Curve To’ command to the path data.
public PathBuilder Tr(double x, double y)
Parameters
x
double
The x-coordinate of the end point of the curve, relative to the current position.
y
double
The y-coordinate of the end point of the curve, relative to the current position.
Returns
The current PathBuilder instance.
V(double)
Adds a ‘Vertical Line To’ command to the path data.
public PathBuilder V(double y)
Parameters
y
double
The y-coordinate to draw a vertical line to.
Returns
The current PathBuilder instance.
Vr(double)
Adds a relative ‘Vertical Line To’ command to the path data.
public PathBuilder Vr(double y)
Parameters
y
double
The y-coordinate to draw a vertical line to, relative to the current position.
Returns
The current PathBuilder instance.
Z()
Adds a ‘Close Path’ command to the path data.
public PathBuilder Z()
Returns
The current PathBuilder instance.