<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>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.<BR>
<BR>
Thor<BR><BR><BR><BR><BR>
<HR id=stopSpelling>
<BR>
> From: mikelima@gmail.com<BR>> To: kde-games-devel@kde.org<BR>> Date: Fri, 11 Jan 2008 09:58:37 +0100<BR>> Subject: Re: [Kde-games-devel] Unify pixmap caching across card games<BR>> <BR>> Il Thursday 10 January 2008 21:12:03 Andreas Pakulat ha scritto:<BR>> > On 10.01.08 17:58:41, Luciano Montanaro wrote:<BR>> > > Il Wednesday 09 January 2008 20:51:29 Andreas Pakulat ha scritto:<BR>> > > > > > And what about the raster decks?<BR>> > > > ><BR>> > > > > SVG has an <img> tag too. Non svg decks could be trivially converted<BR>> > > > > to svg decks by shipping the images together with a .svg wrapper<BR>> > > > > containing something like<BR>> > > > > <svg><BR>> > > > > <img id="4_hearts" href="4_hearts.png" /><BR>> > > > > </svg><BR>> > > > ><BR>> > > > > I did not look up the SVG specs, so the syntax may be a little<BR>> > > > > different...<BR>> > > ><BR>> > > > That would simplify a _lot_ of code. Especially it would remove the<BR>> > > > need for a mapping between combinations of card and suite to the actual<BR>> > > > png names. So +1 from my side if you can find somebody/some people to<BR>> > > > do it. Unfortunately I have close to 0 ide about SVG or how to edit it<BR>> > > > :)<BR>> > ><BR>> > > Then it's quite easy. I tried putting together an svg wrapper the other<BR>> > > night. It is missing the backs, but it works. Just put it in the default<BR>> > > deck directory, and test it with inkview or gwenview (or the Qt<BR>> > > svgviewer)<BR>> ><BR>> > I'll have a try later on and I'll also post the latest version of the<BR>> > code then, hopefully with some improvements to the structure of the<BR>> > maps..<BR>> ><BR>> > > The same file would basically work for all the Pixmap themes, the only<BR>> > > needed change is to adapt to the card size.<BR>> ><BR>> > Does that mean the Pixmap from QSvgRenderer would need to be resized to<BR>> > the requested size even if I tell the renderer the size of the pixmap?<BR>> ><BR>> <BR>> No, the sizes are needed to render correctly the base size, you can ask for <BR>> any size you like. The desktop file contains the card size, so you can use <BR>> that to have the "preferred" size, or scale it as you whish. That information <BR>> is redundant, actually, since you can also use <BR>> QSvgRenderer::boundsOnElement(name) <BR>> to obtain the design size of any card. <BR>> <BR>> > > I can put togeether a perl script to generate the files in 20 minutes,<BR>> > > if needed.<BR>> ><BR>> > That would be cool.<BR>> <BR>> Ok, I'll put it together this weekend, then.<BR>> <BR>> Luciano<BR>> <BR>> <BR>> <BR>> _______________________________________________<BR>> kde-games-devel mailing list<BR>> kde-games-devel@kde.org<BR>> https://mail.kde.org/mailman/listinfo/kde-games-devel<BR><BR><br /><hr />Express yourself instantly with MSN Messenger! <a href='http://clk.atdmt.com/AVE/go/onm00200471ave/direct/01/' target='_new'>MSN Messenger</a></body>
</html>