Qt4-preview-feedback Archive, April 2008
SVG rendering of a linearGradient with Qt 4.4.0-beta1 not working well anymore
Message 1 in thread
Hi,
I'm programming KDE games and I enjoy using the SVG possibilities of Qt 4.
I noticed something I suppose to be a bug with the current Qt version used
by KDE in the trunk: Qt 4.4.0-beta1.
SVG linear gradients that were working OK in the past (with Qt 4.3) are
now not working anymore like before. :( Is there a regression?
See in attachment a dummy code that tries to display in a QSvgWidget
following SVG file:
http://www.w3.org/TR/SVGMobile12/examples/13_01.svg
<?xml version="1.0"?>
<svg width="8cm" height="4cm" viewBox="0 0 800 400"
xmlns="http://www.w3.org/2000/svg" version="1.2" baseProfile="tiny">
<desc>Example lingrad01 - fill a rectangle using a
linear gradient paint server</desc>
<g>
<defs>
<linearGradient xml:id="MyGradient">
<stop offset="0.05" stop-color="#F60" />
<stop offset="0.95" stop-color="#FF6" />
</linearGradient>
</defs>
<!-- Outline the drawing area in blue -->
<rect fill="none" stroke="blue"
x="1" y="1" width="798" height="398"/>
<!-- The rectangle is filled using a linear gradient paint server -->
<rect fill="url(#MyGradient)" stroke="black" stroke-width="5"
x="100" y="100" width="600" height="200"/>
</g>
</svg>
(This SVG sample is taken from the W3C specification:
http://www.w3.org/TR/SVGMobile12/painting.html#LinearGradientElement .)
Please see in attachment the result I'm getting in the PNG file... :( Is
this a known problem? If it's not, I hope this e-mail can help you.
Good luck and thanks for everything! :)
--
[ signature omitted ]