[cairo] What should the units of size be for an SVG surface?
jwatt at jwatt.org
Fri Dec 15 07:18:47 PST 2006
Emmanuel Pacaud wrote:
> Le mardi 02 mai 2006 à 15:10 -0700, Carl Worth a écrit :
>> On Tue, 02 May 2006 23:48:32 +0200, Emmanuel Pacaud wrote:
>>>> However, in SVG, an identity matrix does not map one user-space unit
>>>> to one point. Instead one user-space unit maps to one "px" unit,
>>>> (which I believe is defined in CSS2 with the intentionally vague
>>>> notion of "arm's length", etc. to achieve a consistent size in angular
>>>> viewing space).
>>> Not necessarly. It depends on viewBox property.
>> Yes, that's true. But cairo's SVG backend doesn't allow the user to
>> control viewBox does it?
> No, it doesn't. But my last patch sets a viewBox in order to have points
> as user space unit.
How about an extra argument for cairo_svg_surface_create to specify the unit of
the width and height passed in, whereby if none or px is specified as the unit,
you don't specify a unit on the root SVG element's width/height and you don't
specify a viewBox?
More information about the cairo