ICanvasPathMethods Interface

ICanvasPathMethods interface

The ICanvasPathMethods interface is used to manipulate paths of objects.

public interface ICanvasPathMethods

Methods

NameDescription
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).
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).
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.
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.
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.
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).
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).
LineTo(double, double)Connects the last point in the subpath to the x, y coordinates with a straight line.
MoveTo(double, double)Moves the starting point of a new sub-path to the (x, y) coordinates.
QuadraticCurveTo(double, double, double, double)Adds a quadratic Bézier curve to the current path.
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.

See Also