[Kde-games-devel] [Patch] Fix QPainter usage

Ian Wadham ianw2 at optusnet.com.au
Thu Dec 27 20:50:37 CET 2007


On Fri, 28 Dec 2007 06:07 am, Mauricio Piacentini wrote:
> Ian Wadham wrote:
> > I am sure there were some reasons we did NOT render to QPixmaps
> > directly, to do with handling alpha (extensively used in our SVG
> > graphics) and to do with speed and fidelity of rendering (hence
> > use of QImage::Format_ARGB32_Premultiplied).
> >
> > Do you recall the details of that design decision, Mauricio?
>
> Not really, but I think it has to do with the alpha channel and
> compositing indeed. Well, Luciano can try to do something for 4.1 and
> let us know :)
>
I seem to remember hours/days I spent trying to QSvgRender direct
to QPixmaps, thinking as Luciano does to "cut out the middle man",
but I did not keep notes or commit anything.  IIRC it is easy to load
an image that already has alpha into a QPixmap, from a QImage or
from a file (.png, .jpg, .xpm, etc), but it is hard to set up an empty
pixmap of a certain size that has an alpha channel.  QPixmap is
generally poorer in methods and formats than QImage, it seems.

Well, good luck, Luciano ... Ian W.


More information about the kde-games-devel mailing list