--- title: Paths ---

A path is represented by an object with these mandatory properties:

Line

A line is a path with the type "line" and this additional property:

{% highlight javascript %} var line = { type: 'line', origin: [0, 0], end: [1, 1] }; {% endhighlight %}

Circle

A circle is a path with the type "circle" and this additional property:

{% highlight javascript %} var circle = { type: 'circle', origin: [0, 0], radius: 1 }; {% endhighlight %}

Arc

An arc is a path with the type "arc" and these additional properties:

Note: Property names are case-sensitive.

{% highlight javascript %} var arc = { type: 'arc', origin: [0, 0], radius: 1, startAngle: 0, endAngle: 45 }; {% endhighlight %} (additional optional properties covered in advanced lessons)