If you do not specify a viewport, all unit numbers in an element are considered pixels. (and SVG assumes 90 dpi or pixels per inch to convert from units such as cm to pixels.)
In the viewport, you can make unit numbers in elements meaning "custom units" and determines how these units are mapped to size. For simplicity, we consider only the x coordinates, that is, the ruler. Your viewport indicates that your ruler will have 1,500 units to match the width of the svg size by 200 pixels.
A linear element from 0 to 1500 (without a unit, that is, custom units) will stretch 200 pixels, as shown in the figure, that is, the width of the svg drawing.
(And since SVG scales without loss of resolution, pixels are really not significant in the real world when the user zooms in or out.)
Its coordinate transformation, kind.
I suggest you learn from a book such as "SVG Essentials," about $ 10, from which I freely quote this answer.
bootchk Jun 03 '13 at 1:36 on 2013-06-03 01:36
source share