[cairo] What should the units of size be for an SVG surface?

Carl Worth cworth at cworth.org
Wed May 3 16:32:24 PDT 2006

On Wed, 03 May 2006 00:19:35 +0200, Emmanuel Pacaud wrote:
> No, it doesn't. But my last patch sets a viewBox in order to have points
> as user space unit.

Just before the last snapshot, I went ahead and enabled the SVG
backend by default. That means I'm now testing it in my runs of the
test suite, and now it's getting in my way.

It appears that some of the PNG images are being rendered at the wrong
size. For example, for the clip-fill-rule-pixel-aligned case the SVG
file has the correct width of 43:

	<?xml version="1.0" encoding="UTF-8"?>
	<svg width="43pt" height="22pt" viewBox="0 0 43 22"
	     xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1">

but this is currently being rendered to an image with a width of 42
instead of 43.

I don't know whose bug this is, but it still seems to me that we
should be using px, not pt units here. Interestingly enough, dropping
the "pt" from the above file does fix it to start rendering at a width
of 43 again.

-Carl (dropping back to --disable-svg to be able to use the test suite)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/cairo/attachments/20060503/385a604d/attachment.pgp

More information about the cairo mailing list