[Qt-interest] fastest way to draw everchanging pixels

Sean Harmer sean.harmer at maps-technology.com
Mon Mar 23 19:20:12 CET 2009


On Monday 23 March 2009 16:24:47 Brad Howes wrote:
> On Mar 23, 2009, at 11:26 AM, Oliver.Knoll at comit.ch wrote:
> > Still, I would like to give you another approach which is still
> > pixel-based and similar to your approach. But instead of callling a
> > method for (potentially) each pixel, you do your own address
> > arithmetic and calculate the pixel values. The basic idea is that
> > you first draw into a QImage which gives you direct pixel access,
> > using some easy pointer arithmetic, and then let the QPainter draw
> > this QImage (which will automatically be converted to a QPixmap for
> > fast drawing).
>
> That was my first thought as well. I too would be interested in
> learning about any timing results people may have WRT the two
> approaches.
Me too. And after learning a bit more about the problem, generating an image 
in the worker thread and then blitting it may well be the way to go.

Sean



More information about the Qt-interest-old mailing list