Interface ICanvasPathMethods
Namespace: Aspose.Html.Dom.Canvas
Assembly: Aspose.HTML.dll (25.4.0)
The ICanvasPathMethods interface is used to manipulate paths of objects.
[DOMNoInterfaceObject]
[ComVisible(true)]
[DOMObject]
public interface ICanvasPathMethods
Methods
Arc(double, double, double, double, double)
Adds an arc to the path which is centered at (x, y) position with radius r starting at startAngle and ending at endAngle going in the given direction by anticlockwise (defaulting to clockwise).
[DOMName("arc")]
void Arc(double x, double y, double radius, double startAngle, double endAngle)
Parameters
x
double
The x coordinate of the arc’s center.
y
double
The y coordinate of the arc’s center.
radius
double
The arc’s radius.
startAngle
double
The angle at which the arc starts, measured clockwise from the positive x axis and expressed in radians.
endAngle
double
The angle at which the arc ends, measured clockwise from the positive x axis and expressed in radians.
Arc(double, double, double, double, double, bool)
Adds an arc to the path which is centered at (x, y) position with radius r starting at startAngle and ending at endAngle going in the given direction by anticlockwise (defaulting to clockwise).
[DOMName("arc")]
void Arc(double x, double y, double radius, double startAngle, double endAngle, bool counterclockwise)
Parameters
x
double
The x coordinate of the arc’s center.
y
double
The y coordinate of the arc’s center.
radius
double
The arc’s radius.
startAngle
double
The angle at which the arc starts, measured clockwise from the positive x axis and expressed in radians.
endAngle
double
The angle at which the arc ends, measured clockwise from the positive x axis and expressed in radians.
counterclockwise
bool
Causes the arc to be drawn counter-clockwise between the two angles. By default it is drawn clockwise.
ArcTo(double, double, double, double, double)
Adds an arc to the path with the given control points and radius, connected to the previous point by a straight line.
[DOMName("arcTo")]
void ArcTo(double x1, double y1, double x2, double y2, double radius)
Parameters
x1
double
x-axis coordinates for the first control point.
y1
double
y-axis coordinates for the first control point.
x2
double
x-axis coordinates for the second control point.
y2
double
y-axis coordinates for the second control point.
radius
double
The arc’s radius.
BezierCurveTo(double, double, double, double, double, double)
Adds a cubic Bézier curve to the path. It requires three points. The first two points are control points and the third one is the end point. The starting point is the last point in the current path, which can be changed using moveTo() before creating the Bézier curve.
[DOMName("bezierCurveTo")]
void BezierCurveTo(double cp1x, double cp1y, double cp2x, double cp2y, double x, double y)
Parameters
cp1x
double
The x axis of the coordinate for the first control point.
cp1y
double
The y axis of the coordinate for the first control point.
cp2x
double
The x axis of the coordinate for the second control point.
cp2y
double
The y axis of the coordinate for the second control point.
x
double
The x axis of the coordinate for the end point.
y
double
The y axis of the coordinate for the end point.
ClosePath()
Causes the point of the pen to move back to the start of the current sub-path. It tries to draw a straight line from the current point to the start. If the shape has already been closed or has only one point, this function does nothing.
[DOMName("closePath")]
void ClosePath()
Ellipse(double, double, double, double, double, double, double)
Adds an ellipse to the path which is centered at (x, y) position with the radii radiusX and radiusY starting at startAngle and ending at endAngle going in the given direction by anticlockwise (defaulting to clockwise).
[DOMName("ellipse")]
void Ellipse(double x, double y, double radiusX, double radiusY, double rotation, double startAngle, double endAngle)
Parameters
x
double
The x axis of the coordinate for the ellipse’s center.
y
double
The y axis of the coordinate for the ellipse’s center.
radiusX
double
The ellipse’s major-axis radius.
radiusY
double
The ellipse’s minor-axis radius.
rotation
double
The rotation for this ellipse, expressed in radians.
startAngle
double
The starting point, measured from the x axis, from which it will be drawn, expressed in radians.
endAngle
double
The end ellipse’s angle to which it will be drawn, expressed in radians.
Ellipse(double, double, double, double, double, double, double, bool)
Adds an ellipse to the path which is centered at (x, y) position with the radii radiusX and radiusY starting at startAngle and ending at endAngle going in the given direction by anticlockwise (defaulting to clockwise).
[DOMName("ellipse")]
void Ellipse(double x, double y, double radiusX, double radiusY, double rotation, double startAngle, double endAngle, bool anticlockwise)
Parameters
x
double
The x axis of the coordinate for the ellipse’s center.
y
double
The y axis of the coordinate for the ellipse’s center.
radiusX
double
The ellipse’s major-axis radius.
radiusY
double
The ellipse’s minor-axis radius.
rotation
double
The rotation for this ellipse, expressed in radians.
startAngle
double
The starting point, measured from the x axis, from which it will be drawn, expressed in radians.
endAngle
double
The end ellipse’s angle to which it will be drawn, expressed in radians.
anticlockwise
bool
An optional boolean which, if true, draws the ellipse anticlockwise (counter-clockwise), otherwise in a clockwise direction.
LineTo(double, double)
Connects the last point in the subpath to the x, y coordinates with a straight line.
[DOMName("lineTo")]
void LineTo(double x, double y)
Parameters
x
double
The x axis of the coordinate for the end of the line.
y
double
The y axis of the coordinate for the end of the line.
MoveTo(double, double)
Moves the starting point of a new sub-path to the (x, y) coordinates.
[DOMName("moveTo")]
void MoveTo(double x, double y)
Parameters
x
double
The x axis of the point
y
double
The y axis of the point
QuadraticCurveTo(double, double, double, double)
Adds a quadratic Bézier curve to the current path.
[DOMName("quadraticCurveTo")]
void QuadraticCurveTo(double cpx, double cpy, double x, double y)
Parameters
cpx
double
The x axis of the coordinate for the control point.
cpy
double
The y axis of the coordinate for the control point.
x
double
The x axis of the coordinate for the end point.
y
double
The y axis of the coordinate for the end point.
Rect(double, double, double, double)
Creates a path for a rectangle at position (x, y) with a size that is determined by width and height.
[DOMName("rect")]
void Rect(double x, double y, double w, double h)
Parameters
x
double
The x axis of the coordinate for the rectangle starting point.
y
double
The y axis of the coordinate for the rectangle starting point.
w
double
The rectangle’s width.
h
double
The rectangle’s height.