Path2D Class
The Path2D interface of the Canvas 2D API is used to declare paths that are then later used on CanvasRenderingContext2D objects. The path methods of the CanvasRenderingContext2D interface are present on this interface as well and are allowing you to create paths that you can retain and replay as required on a canvas.
Inheritance Hierarchy

Namespace: Aspose.Html.Dom.Canvas
Assembly: Aspose.HTML (in Aspose.HTML.dll) Version: 21.1
Syntax
public class Path2D : DOMObject, ICanvasPathMethods, 
	IDisposable

The Path2D type exposes the following members.

Constructors
  NameDescription
Public methodPath2D
returns a newly instantiated Path2D object
Public methodPath2D(String)
returns a newly instantiated Path2D object with a string consisting of SVG path data.
Public methodPath2D(Path2D)
returns a newly instantiated Path2D object with another path as an argument (creates a copy)
Methods
  NameDescription
Public methodAddPath(Path2D)
Adds to the path the path given by the argument.
Public methodAddPath(Path2D, SVGMatrix)
Adds to the path the path given by the argument.
Public methodArc(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).
Public methodArc(Double, Double, Double, Double, Double, Boolean)
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).
Public methodArcTo
Adds an arc to the path with the given control points and radius, connected to the previous point by a straight line.
Public methodBezierCurveTo
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.
Public methodClosePath
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.
Public methodDispose
Disposes object.
Public methodEllipse(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).
Public methodEllipse(Double, Double, Double, Double, Double, Double, Double, Boolean)
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).
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodLineTo
Connects the last point in the subpath to the x, y coordinates with a straight line.
Protected methodMemberwiseClone (Inherited from Object.)
Public methodMoveTo
Moves the starting point of a new sub-path to the (x, y) coordinates.
Public methodQuadraticCurveTo
Adds a quadratic Bézier curve to the current path.
Public methodRect
Creates a path for a rectangle at position (x, y) with a size that is determined by width and height.
Public methodToString (Inherited from Object.)
See Also