O'Reilly logo

Learning Raphaël JS Vector Graphics by Damian Dawber

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Path drawing commands

Paths are based on a number of drawing commands executed in the order in which they're defined. Commands are expressed as a single letter that is either uppercase, meaning that a subsequent drawing uses absolute coordinates in the drawing context, or lowercase, meaning that a subsequent drawing uses coordinates relative to the current point. Most commands take parameters as arguments that determine the behavior of the command. Consider, for example, the following path string:

"M100,180 a140,140,0,0,1,280,0"

This path string is used in drawing the arbelos of the previous section. Drawing is started using the M command and subsequent arcs are then drawn using the a command.

We draw paths in Raphaël using the path method, which ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required