Closed
Bug 303584
Opened 20 years ago
Closed 18 years ago
SVG Gradients not displayed in standalone doc
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: codedread, Unassigned)
References
()
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050728 Firefox/1.0+
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050728 Firefox/1.0+
If you view http://www.codedread.com/svghead.svg there is no gradient. However,
if you view it as an embedded object (http://www.codedread.com/) the gradient is
properly displayed.
This seems to be a newer problem as I believe it used to work fine.
Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 1•20 years ago
|
||
this applies only to text elements, and only if gradientUnits="objectBoundingBox"
is used, which unfortunatly is the default. this might be connected to the fact
that getBBox is not implemented for text elements. you could rewrite the
gradient to use gradientUnits="userSpaceOnUse" as a workaround.
Comment 2•20 years ago
|
||
oh sorry for my ignorance, getBBox is implemented for text elements, it just
does not work on load.
the problem might still be connected to this.
Comment 3•20 years ago
|
||
Confirming. This has something to do with nsSVGLength::AxisLength not being able
to get the user unit length for percentage lengths.
http://lxr.mozilla.org/seamonkey/source/content/svg/content/src/nsSVGLength.cpp#556
If the user unit length can't be calculated we return 1.0f, so I think the
gradient is being drawn, it's just being drawn in a 1px height and width box
(perhaps outside the area we clip to). If you change the height and width on the
'svg' element to absolute units then the gradient works.
Status: UNCONFIRMED → NEW
Ever confirmed: true
| Reporter | ||
Comment 4•20 years ago
|
||
Actually I just fiddled with this a little more. Go to
http://www.codedread.com/svghead.svg and make the browser very wide
(x-direction) but very short (y-direction) and you'll see the gradient shows up
starting from the lower-right corner. So it seems that the heighth and width of
the SVG document are maybe improperly calculated?
Comment 5•20 years ago
|
||
I'm getting something similar. I've got a SVG with radial gradients. The gradients for irregular regions with 1pt outline strokes are rendered as solid colors. There are small rectangular boxes with a radial gradient that is rendered properly. Can anyone confirm that this is the same problem? I'm seeing this on Linux and Windows in FF 1.5rc Thanks.
SVG: http://upload.wikimedia.org/wikipedia/commons/e/e1/NJ_109th_congressional_districts_shaded_by_party.svg
As rendered by Inkscape:
http://en.wikipedia.org/wiki/Image:NJ_109th_congressional_districts_shaded_by_party.png
Comment 8•18 years ago
|
||
It looks like Firefox 3 will be 24.8. i.e. it will have a coordinate range of
±33,554,432. The nightlies have this range now.
The testcases in this bug now work
fixed by check in for bug 384681
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•