Skip to Main Content
SVG for Web Developers
book

SVG for Web Developers

by Ellen Pearlman, Lorien House
December 2002
Beginner to intermediate content levelBeginner to intermediate
464 pages
8h 34m
English
Pearson
Content preview from SVG for Web Developers

SVG Coordinate System

We've explained how to size an SVG viewport and place it, (using width and height, and x and y attributes), using the <svg> element. We've seen examples of the viewBox attribute, and we've streamlined code with container elements. Now it's time to take a look at SVG's coordinate system to understand how to create and control SVG images.

All drawing in SVG references a coordinate system. Because SVG is a vector-based graphic programming language, SVG drawings consist of mathematical formulae plotting points in a coordinate system with instructions on how to render those points as images. The “canvas” on which these drawings are displayed is the SVG viewport.

Points are drawn using x and y coordinate positions, similar to ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Building Web Applications with SVG

Building Web Applications with SVG

Jon Frost David Dailey and Domenico Strazzullo
SVG Text Layout

SVG Text Layout

Amelia Bellamy-Royds, Kurt Cagle
Using SVG with CSS3 and HTML5

Using SVG with CSS3 and HTML5

Amelia Bellamy-Royds, Kurt Cagle, Dudley Storey

Publisher Resources

ISBN: 0131004999Purchase book