[BZ#566389] Dimensions given in "px" units scale with matrix, when they shouldn't
Submitted by Dzonatas
Please describe the problem: Here is a snippet of SVG that you can plug in and test. Stroke-widths scale when they should not.
Steps to reproduce:
- Copy snippet to file
- use a rsvg util or embedded tool to paste the pixbuf output to a window, and have it do "pixbuf from file at size" with various "given" widths and heights parameters
- notice that stroke width scales relative to the given width and height when it shouldn't since "2px" is absolute value and the viewport specifies a percentage width and height (i.e. style="height:100%; width:100%")
Expected results: The stroke-width value should not scale with is viewport width and height is a percentage, as the given width and height should override the percentage. Anotherwords, if "100%" is given for viewport width, then "px" should scale to one user unit for any given width or height value -- the rendered stroke-width should be the same.
Does this happen every time? Yes. Note: I have not tried to set a cairo matrix to see if it makes a difference to render to cairo instead of a pixbuf.
Other information: This snippet work correct under Firefox. You can look at http://www.dzonux.net for an example, which you can adjust the size of firefox window and notice how the stroke-widths are absolute and do not scale.
I checked the SVG documentation, and it confirms that firefox does it correctly for relative specified viewports. If viewport height and width are absolute, then then the stroke-widths scale to the given height and width.