After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 566389 - Dimensions given in "px" units scale with matrix, when they shouldn't
Dimensions given in "px" units scale with matrix, when they shouldn't
Status: RESOLVED OBSOLETE
Product: librsvg
Classification: Core
Component: general
2.0.x
Other All
: Normal normal
: ---
Assigned To: librsvg maintainers
librsvg maintainers
Depends on:
Blocks:
 
 
Reported: 2009-01-03 06:35 UTC by Dzonatas
Modified: 2017-12-13 17:35 UTC
See Also:
GNOME target: ---
GNOME version: 2.23/2.24



Description Dzonatas 2009-01-03 06:35:30 UTC
Please describe the problem:
Here is a snippet of SVG that you can plug in and test. Stroke-widths scale when they should not.

<svg xmlns="http://www.w3.org/2000/svg" baseProfile="full" style="height:100%; width:100%">
	<rect x="0%" y="0%" width="100%" height="100%" stroke="#000000" stroke-width="2px" fill="none"/>
	<line x1="0%" y1="0%" x2="100%" y2="100%" stroke="#000000" stroke-width="2px"/>
	<line x1="100%" y1="0%" x2="0%" y2="100%" stroke="#000000" stroke-width="2px"/>
</svg>

Steps to reproduce:
1. Copy snippet to file
2. 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



Actual results:
* 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.
Comment 1 GNOME Infrastructure Team 2017-12-13 17:35:23 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/librsvg/issues/28.