[Issue N193466] SVG Rendering Regresion in > Qt 4.3.0

Marco Martin notmart at gmail.com
Sat Feb 9 12:48:19 CET 2008


On Saturday 09 February 2008, Thomas Georgiou wrote:
> Sorry for the late response
> I wrote a testcase exhibiting this using just Qt libraries.  The
> testcase is attached.  The testcase is supposed to draw the "center"
> element of panel-background.svg (included) into the boundingrect of a
> qgi.  It also draws a red rectangle to show where it is.
> In Qt 4.3.0, it looks like this (after making window a little larger):
> http://img519.imageshack.us/img519/4176/qt430ti1.png .  It fills the
> entire boundingrect.
> In Qt 4.3.3 (and with Qt 4.3.1 as I tested earlier below in the
> screenshots and bugreport screenshots), it looks like this:
> http://img106.imageshack.us/img106/6973/qt433aj1.png .  It gets
> clipped incorrectly and does not fill the entire boundingrect.
> This seems to be a regression in QSvgRenderer.
Hi,
trying your example it seems to work well on an old nighltly of qt4.4, this 
makes me hope well :)
the strange thing with qt 4.3 is that the rectangle is filled if there is a 
border set, no matter how thin it is.
and more interesting if you put for instance in panel-background.svg a border 
to the center element in a contrasting color like green and semitransparent 
(see attachment) of size 1px you see that the black rectangle is of the very 
same size of when there is no border.
if you put a very thin border, like 0.001px the black rectangle actually 
enlarges!
so i think it looks like if there is no border the old qtsvg assumed there is 
a transparent 1px(or whatever measurement unit is set in the svg) border 
around the element

Cheers,
Marco Martin

> Thomas Georgiou
>
> On Jan 7, 2008 9:47 AM,  <qt-bugs at trolltech.com> wrote:
> > Hi Thomas ,
> >
> > I tried loading the SVG file "panel-backround.svg" with several Qt
> > versions 4.2.x /4.3.x and latest 4.4.0 snapshot and the result was the
> > same as other SVG viewers ( Firefox, Opera ) displayed. The issue was
> > not reproducible with that SVG file. Could you please send us such file
> > that reproduces the problem?
> >
> > Kind regards,
> > Petref
> >
> > On Saturday, 05. Jan 2008 04:31 TAGeorgiou at gmail.com wrote:
> > > Short description:
> > > SVG Rendering Regresion in > Qt 4.3.0
> > >
> > > What I did:
> > > After updating to Qt 4.3.0, I tried to run plasma code, but the svgs
> > > looked all ugly.
> > >
> > > What I expected to see:
> > > I expected to see
> > > http://img502.imageshack.us/img502/9018/plasmapanel1nv5.png (which is
> > > run with Qt 4.3.0) (I colored the element of the svg that is painted
> > > red, normally black).  Notice how it completely fills the right part
> > > of the panel.
> > >
> > > What I got instead:
> > > This is with Qt 4.3.3
> > > http://img148.imageshack.us/img148/3594/plasmapanel2oa6.png Notice how
> > > the red (the painted part of an svg) is not filled all the way as it
> > > was with 4.3.0.
> > >
> > > More info:
> > > This affects svg theming of plasma and is the issue in this bug report
> > > here: http://bugs.kde.org/show_bug.cgi?id=149425 where the screenshot
> > > is of a black rectangle in an svg rendered to a target qrect.
> > >
> > > To quote Aaron Seigo:
> > > this is lame, lame, lame and then extra sugar lame on top. but
> > > QSvgRenderer has some *serious* issues when it resizes svg's; rounding
> > > errors get magnified to the point that they become these monstrously
> > > huge innacurracies =( i can't do anything better for 4.0, but plan on
> > > working with TT on these issues for 4.1
> > >
> > > The svg is here
> > > http://websvn.kde.org/*checkout*/trunk/KDE/kdebase/workspace/plasma/des
> > >ktoptheme/widgets/panel-background.svg .  The element that is trying to
> > > be painted is "center".
> >
> > --
> > Petref Saraci
> > Support Engineer
> > Trolltech ASA, Oslo - http://www.trolltech.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: panel-background.svg
Type: image/svg+xml
Size: 16449 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080209/ac690cb0/attachment.svg 


More information about the Panel-devel mailing list