• Create BookmarkCreate Bookmark
• Create Note or TagCreate Note or Tag
• PrintPrint

## Relative moveto and lineto

The preceding commands are all represented by uppercase letters, and the coordinates are presumed to be absolute coordinates. If you use a lowercase command letter, the coordinates are interpreted as being relative to the current pen position. Thus, the following two paths are equivalent:

```<path d="M 10 10 L 20 10 L 20 30  M 40 40 L 55 35"
style="stroke: black;"/>
<path d="M 10 10 l 10  0 l  0 20  m 20 10 l 15 -5"
style="stroke: black;"/>```

If you start a path with a lowercase `m` (moveto), its coordinates will be interpreted as an absolute position since there’s no previous pen position from which to calculate a relative position. All the other commands in this chapter also have the same upper- and lowercase distinction. An uppercase command’s coordinates are absolute and a lowercase command’s coordinates are relative. The

PREVIEW

Not a subscriber?

Start A Free Trial

• Create BookmarkCreate Bookmark
• Create Note or TagCreate Note or Tag
• PrintPrint