[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: Painting on the QImage in QPainter Canvas
From:       Ariya Hidayat <ariya () kde ! org>
Date:       2009-08-15 7:17:06
Message-ID: ba035dd10908150017n44837125rff35e11ac8563915 () mail ! gmail ! com
[Download RAW message or body]

> This will repaint entire canvas, even in case we change only a tiny
> rect.

This can be remedied by using the updated rect only. Hint: the
argument to the paintEvent() is there for a reason, so check the
documentation on QPaintEvent.

> More that that, why do we need an additional temp object in a
> repaint chain?

I haven't seen Krita code, but the usual way to overcome this problem
is to have a persistent "scratch" QImage. Of course this QImage needs
to grow and shrink (but not aggressively) according to the said
updated rect.



-- 
Ariya Hidayat, Nokia
http://www.linkedin.com/in/ariyahidayat
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic