XML technologies / SVG / The coordinate system of SVG graphics / What is the coordinate system? / Units in the coordinate system
(Excerpt from “Das Einsteigerseminar SVG — Webgrafiken mit XML” by Helma Spona)
Sizes and lengths in SVG graphics require units. If none is specified, the number refers to viewport units. If one unit equals one pixel, values are interpreted in pixels. But if the user enlarges the graphic, specifying width="10" may display a width of 20 pixels instead of 10. This would be a twofold magnification.
You can also specify all sizes using units partly shared with stylesheets and HTML: em, ex, px, pt, pc, cm, mm, in and %. Put the unit immediately after the value, for example: width="20px" or width="20mm".
Note:
Never mix units. Consistently use absolute sizes in millimeters or pixels, no units, or percentages. Mixing units can produce unwanted results when zooming or printing.
Copyright © verlag moderne industrie GmbH 2001
You may print the online version for your private use.
Otherwise, this chapter from “Das Einsteigerseminar SVG — Webgrafiken mit XML” is subject to the same conditions as the bound edition. The work, including all its parts, is protected by copyright. All rights reserved, including reproduction, translation, microfilming, and storage and processing in electronic systems.
verlag moderne industrie GmbH, Justus-von-Liebig-Straße 1, D-86899 Landsberg/Lech, fon ++49 (0) 81 91 / 125 – 0, leserservice(at)mi-verlag.de
back to top