Adrian on Painters and Qt4

Boudewijn Rempt boud at valdyas.org
Wed Aug 30 16:45:43 CEST 2006


For archival purposes:

=================

The way the paint system currently works is that you have either a 
KisQPaintDeviceCanvas (based on a QWidget) or a KisOpenGLCanvas (based 
on a QGLWidget) and you paint on these using a KisCanvasPainter. 
KisCanvasPainter has mostly the same API as QPainter, so you can work 
with it much as you would a QPainter on a normal widget. 
KisQPaintDeviceCanvasPainter implements KisCanvasPainter using a 
QPainter internally. In Qt 3, since you can't paint with a QPainter on a 
QGLWidget, KisOpenGLCanvasPainter implements the KisCanvasPainter 
functions using the direct OpenGL interface. However, since in Qt 4 
QPainter can paint on a QGLWidget, KisCanvasPainter should be able to 
simply inherit QPainter and there should be no need for 
KisOpenGLCanvasPainter or KisQPaintDeviceCanvasPainter. That's how I saw 
it going.

=================
-- 
Boudewijn Rempt 
http://www.valdyas.org/fading/index.cgi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20060830/497b7d2e/attachment.pgp 


More information about the kimageshop mailing list