[Kde-games-devel] Unify pixmap caching across card games

Andreas Pakulat apaku at gmx.de
Thu Jan 10 21:12:03 CET 2008


On 10.01.08 17:58:41, Luciano Montanaro wrote:
> Il Wednesday 09 January 2008 20:51:29 Andreas Pakulat ha scritto:
> > > > And what about the raster decks?
> > >
> > > SVG has an <img> tag too. Non svg decks could be trivially converted to
> > > svg decks by shipping the images together with a .svg wrapper containing
> > > something like
> > > <svg>
> > > <img id="4_hearts" href="4_hearts.png" />
> > > </svg>
> > >
> > > I did not look up the SVG specs, so the syntax may be a little
> > > different...
> >
> > That would simplify a _lot_ of code. Especially it would remove the need
> > for a mapping between combinations of card and suite to the actual png
> > names. So +1 from my side if you can find somebody/some people to do it.
> > Unfortunately I have close to 0 ide about SVG or how to edit it :)
> 
> Then it's quite easy. I tried putting together an svg wrapper the other night.
> It is missing the backs, but it works. Just put it in the default deck 
> directory, and test it with inkview or gwenview (or the Qt svgviewer)

I'll have a try later on and I'll also post the latest version of the
code then, hopefully with some improvements to the structure of the
maps..

> The same file would basically work for all the Pixmap themes, the only needed 
> change is to adapt to the card size.

Does that mean the Pixmap from QSvgRenderer would need to be resized to
the requested size even if I tell the renderer the size of the pixmap?

> I can put togeether a perl script to generate the files in 20 minutes,
> if needed. 

That would be cool.

Andreas

-- 
Are you a turtle?


More information about the kde-games-devel mailing list