[Kde-games-devel] Unify pixmap caching across card games
Thorsteinn Malmjursson
hammer.of.thor at hotmail.com
Fri Jan 11 14:20:25 CET 2008
Luciano: I do have the <svg> command available, but to be honest, I have never really looked at how to use it. I didn't even know it existed until about 3 months ago! Give me a little time and I will look into how to wrap the pixmap images.
Thor
> From: mikelima at gmail.com> To: kde-games-devel at kde.org> Date: Fri, 11 Jan 2008 09:58:37 +0100> Subject: Re: [Kde-games-devel] Unify pixmap caching across card games> > Il Thursday 10 January 2008 21:12:03 Andreas Pakulat ha scritto:> > 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?> >> > No, the sizes are needed to render correctly the base size, you can ask for > any size you like. The desktop file contains the card size, so you can use > that to have the "preferred" size, or scale it as you whish. That information > is redundant, actually, since you can also use > QSvgRenderer::boundsOnElement(name) > to obtain the design size of any card. > > > > I can put togeether a perl script to generate the files in 20 minutes,> > > if needed.> >> > That would be cool.> > Ok, I'll put it together this weekend, then.> > Luciano> > > > _______________________________________________> kde-games-devel mailing list> kde-games-devel at kde.org> https://mail.kde.org/mailman/listinfo/kde-games-devel
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/kde-games-devel/attachments/20080111/8ece9791/attachment.html
More information about the kde-games-devel
mailing list