[Kde-games-devel] Theming support

Mark A. Taff marktaff at comcast.net
Sat Mar 17 02:12:05 CET 2007


On Friday 16 March 2007 16:08:45 Ian Wadham wrote:
> It seems that a SVG file can contain non-graphical information, witness
> Mark Taff's notes in his SVG files, but I guess there is no KDE or Qt
> library method to extract anything other than named elements from a
> SVG file.  Is there any chance of some advances in this area?

An svg file can be hacked to contain any info you want, esp. by using 
namespaces.  That said, I don't think that would be a very elegant solution.  
I also think it would raise the bar too high for artists if they have to also 
be svg xml-editing gurus. ;-)

For each of my led styles, I will have one svg file, with one master digit 
element in it.  I will also have one .desktop file that contains required 
metadata, bitmasks, etc.

I have subclassed QDomDocument, so now elementByID now actually returns a 
node. This should probably become KGameSvgDocument of some such. I also have 
functions for transforming the fill color and opacity style attributes (can 
be generalized to all style attributes).  I *almost* have a similar function 
to apply matrices.

In the end, we can do just about everything we need to:
	recolor,
	skew,
	scale,
	rotate,
	reposition,
	???

This is all done by manipulating the DOM in memeory, with pixmaps cached (not 
yet implemented) for speed.

Regards,

Mark


More information about the kde-games-devel mailing list