Qt SVG renderer

Matthew Woehlke mwoehlke at tibco.com
Mon Aug 4 23:22:52 BST 2008

James Richard Tyrer wrote:
> Matthew Woehlke wrote:
>> What exactly is the difference between the version you attached and 
>> the one in svn? All I can tell from a cursory inspection is that you 
>> ungrouped some objects. While this may reduce the file size (and
>> be considered cruft), it is NOT a collection of additional stray 
>> elements (i.e. entire unrelated icons) that I was calling "junk".
>> I disagree with you disagreeing.
> I would have thought that a file of less than half the size with the
> *exact* same result would be QED to the question of whether there was
> junk in the file without any explanation.

"junk" = things that cause incorrect rendering
"cruft" = things that make the file bigger without affecting the

I was talking about the former, not the latter. Please re-read my
previous statement. And you still haven't (in this bit of the thread,
anyway) explained *how* you got the difference in file size, which would
have been much more useful than making everyone guess. (I don't want to
get into a terminology fight; the point is you ignored me the first time
I tried to explain that we're talking about different things.)

...and this thread is getting off topic. If you want to discuss reducing
the size of our .svg[z]'s, please take it to kde-artists.

> I did not make a study to see how of these 6154 bytes much were
> unneeded definitions, how much was meta data, and how much was
> excessive grouping.  But, it should be clear to anyone that if the
> file can be cut in half without any effect on the image that there
> was junk in the file, which was my point.

Actually, it is not universally true (to the best of my
admittedly-without-looking-at-the-raw-XML knowledge) that removing
groups can save file size. I'm currently working on a mahjongg tileset
that uses cloned groups to reduce file size; ungrouping would make it
necessary to clone the individual objects instead, which would result in
more clones, and thus a larger file. Not to mention that the group ID's
are required to render the theme correctly, and that's besides that
gratuitous ungrouping makes the file harder to edit. That said, I agree
that the groups in the svg I picked are unneeded.

(I also happen to disagree with the decision to rely on ID's in game
themes rather than element position, which IMO is more flexible and less
arduous in many cases. But that's for another thread.)

> I also had to rearrange the definitions with a text editor, but this
> had no  significant effect on the file size (actually, it added a few
> bytes).

I'm curious why you should feel the need to rearrange the file...


More information about the kde-core-devel mailing list