[Kde-games-devel] SVG and MainWindow resize handling
Mauricio Piacentini
piacentini at kde.org
Sat Jan 19 23:09:47 CET 2008
Dmitry Suzdalev wrote:
> Strange that I didn't noticed it - I guess I need to improve my grepping
> skills :)
The lib uses only RAM caching (for resizing support), so it uses
QPixmapCache. This was implemented before KPixmapCache made it into
kdelibs, btw.
But as of any other strategy, I think it depends on specifics of the
usage. For KMahjongg resizes "feel" fast to me, maybe due to how the
tiles are composed (backgrounds are the same, faces are baked on top of
them.) I remember experimenting with pixmap resizing and the time to
resize the (temporary) pixmap was greater than the time that it takes to
render the SVG element again, so not worth it. Other games (like KPat)
might benefit from a different approach (cards more complex?), I am not
sure. I remember that opening/parsing the svg file can take more time
than the actual rendering, so in libkmahjongg the current tileset and
background are kept opened (KSvgRenderer object) and only the required
elements are rendered.
Regards,
Mauricio Piacentini
More information about the kde-games-devel
mailing list