On Sat, Sep 22, 2012 at 9:41 PM, Giuseppe D'Angelo <dange...@gmail.com> wrote: > On 22 September 2012 20:00, Mark <mark...@gmail.com> wrote: >> >> I want to play with a high performance line drawing algorithm [1] so i >> guess it's not very optimal to do the following: >> - draw in a QImage >> - put that image in the qwidget >> - further drawing in the QImage >> - put it on the QWidget again >> - ... and so on ... > > Why doing this? Just paint everything you need to paint on the QImage, > then simply blit it in the paintEvent(). > >> In this case i'm guessing that the QImage mapping to a QWidget would >> be the most costly one hence i'd like to prevent that altogether and >> "just" manipulate the QWidget pixel data directly. >> So how do i do that? > > With a custom QPaintEngine/QPaintDevice combination, and a custom > graphics system that uses it. > > Cheers, > -- > Giuseppe D'Angelo
Oke, i will go the QImage route for now :) It does seem like the easiest way. _______________________________________________ Interest mailing list Interest@qt-project.org http://lists.qt-project.org/mailman/listinfo/interest