Closed
Bug 886309
Opened 12 years ago
Closed 12 years ago
SVG's rendered with incorrect stroke-width when small units attached.
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 364638
People
(Reporter: wphooper, Unassigned)
Details
Attachments
(2 files)
User Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:21.0) Gecko/20100101 Firefox/21.0 (Beta/Release)
Build ID: 20130511120803
Steps to reproduce:
Open a SVG file such as the one attached, whose source code is given below:
<svg version="1.1" baseProfile="full" xmlns="http://www.w3.org/2000/svg" width="200px" height="200px" viewBox="0 0 1 1">
<line x1="0" y1="0" x2="1" y2="1" stroke="purple" stroke-width="0.005px"/>
</svg>
Actual results:
No line is appears.
Expected results:
A purple diagonal line of width 1 pixel should appear.
Please note that it renders correctly if the "px" units are removed from the line tag. The attached graphic should look the same, since "px" units should agree with user units.
It also renders correctly on two other browsers I've looked at: Chrome and Opera.
Comment 1•12 years ago
|
||
We use cairo with 24.8 precision. That mean's there's 24 bits of precision before the decimal place and 8 bits after so 1/256 is the smallest distinct value we can use. I'm afraid this is a limitation of that. Soeey about that, you'll just have to use larger units I'm afraid.
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → WONTFIX
| Reporter | ||
Comment 2•12 years ago
|
||
| Reporter | ||
Comment 3•12 years ago
|
||
Hi Robert,
Thanks for your fast response. However, there are a few things that still concern me about this:
1. The width is 1/200, which is larger than the 1/256 lower limit you described.
2. The graphic renders correctly with the units removed. (See latest attachment.) Why are they rendered differently?
Finally, I find the suggestion to avoid units like this a little bothersome. I'm a mathematician and originally noticed this when drawing some figures on the unit circle, where the natural coordinates all have values between zero and one. Unless it is against SVG specifications, I strongly prefer to have figures rendered described in their natural coordinates.
Comment 4•12 years ago
|
||
OK, I admit it, I got that wrong! This is an existing bug that's still open...
Resolution: WONTFIX → DUPLICATE
You need to log in
before you can comment on or make changes to this bug.
Description
•