On Thu, 2003-12-11 at 13:06, Lauris Kaplinski wrote:
SVG spec is resolution agnostic.
Yes, but I finally read this part of the SVG spec...
All its units are just defined as certain ratios of undefined base unit (pixel), that may or may not be related to some real-world unit.
For the initial coordinate system, the SVG specification refers to CSS2's definition of length units, which broadly specifies two classes of units:
1. relative units which do NOT have fixed relationships with real-world units
* em and ex: determined by the current font size * px: determined by the user agent, generally some multiple of device pixels
2. absolute units which _are real-world units_ (subject to the user-agent's ability and desire to match them)
* mm: real-world mm * cm: 10 mm * in: 2.54 cm * pt: 1/72 in * pc: 12 pt
Sodipodi document has real-world dimensions. To map resolution agnostic SVG onto real-world paper, it uses mapping:
1 SVG point == 1 typographic point
(To be totally pedantic, typographic points are 0.0138 in, which is not _quite_ the same as Postscript/SVG points [1/72 = 0.01388888...]; I think everyone uses the Postscript definition nowadays though.)
As 1SVG point == 1.25 SVG pixels, and pixels are SVG base units, SVG base unit == 0.8 typographic points on all sodipodi documents.
Unless a viewBox is set, the relationship between user-space base units (pixels) and the absolute units is totally user-agent dependent.
(this is why all examples in the SVG spec specify a viewBox)
Thinking about this, if Sodipodi intends to be completely interoperable, it needs to always write a default viewBox according to the base units/points mapping it imposes.
e.g. for a document 100ptx100pt, the viewBox should be "0 0 125 125".
-mental
participants (1)
-
MenTaLguY