Basic Shapes

Drawing shapes in SVG can be quite simple. Whereas most designers use their drawing program's shape tools to eyeball the dimensions and placement of the shapes they draw, SVG demands precision from the start. You will never need to guess whether some piece of your artwork is aligned with another, as the mathematical coordinates you use to define every piece of artwork will answer such a question. Although entering exact values for every element may seem a bit demanding of the designer at first, you will quickly come to appreciate the opportunities this precision affords.

In some ways, it is more fitting to think of drawing in SVG with words than with a paintbrush. To help ease this “verbal drawing,” the authors of the specification ...

Get Sams Teach Yourself SVG in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.