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

Andreas Pakulat apaku at gmx.de
Thu Jan 10 23:26:21 CET 2008


On 10.01.08 17:58:41, Luciano Montanaro wrote:
> Il Wednesday 09 January 2008 20:51:29 Andreas Pakulat ha scritto:
> 
> Just a quick note on the svg...
> 
> > > > 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)

Yeah, seems to work really well. One thing just came to my mind: Should
we then change the KCardDialog API to only work with svg files and
completely hide that these are raster images api-wise, just have a flag
in the .desktop file to indicate so and show it in the gui as well via
the existing "filtering" methods? Or should I just use the cardDir() and
add "cards-default.svg" to that?

Andreas

-- 
You own a dog, but you can only feed a cat.


More information about the kde-games-devel mailing list