Revision 647954
Go back to digest for 1st April 2007Features in Games
Introducing a new class, KGameSvgDcoument, which permits an SVG file's style and transform properties to be modified in DOM. Either the whole document, or a specific node and its children may then be loaded and rendered via KSvgRenderer.
This is useful to permit one gamepiece to be drawn, yet allow that piece to have its color set/reset at runtime, perhaps based on a value from KConfig.
The class permits full control over the SVG style attribute, as well as over the transform attribute. It includes convenience functions for scaling, translating, shearing, and rotating an element.
Also, this is my first commit to KDE SVN, and my first working C++ class. :-)
Many thanks to those who patiently helped me along in #kde4-devel, #kdegames, and in the mailing lists.
File Changes
- /trunk/KDE/kdegames/libkdegames
- /kgamesvgdocument.cpp
- /kgamesvgdocument.h
- /trunk/KDE/kdegames/libkdegames/CMakeLists.txt