[Qt-interest] Drawing to QImage

Malyushytsky, Alex alex at wai.com
Thu Apr 15 23:58:45 CEST 2010


According to my understanding main reason to draw on QImage is to perform drawing when you don't have device to draw on.
It does not require QApplication ( QWidgets , etc. ) and for example can be done from applications  which don't have GUI at all.
In the most other cases you would prefer to draw on pixmap and convert to QImage only when you need to save drawing to the file.

Performance in general should be better when you draw on QPixmap .

Regards,
      Alex



From: qt-interest-bounces at trolltech.com [mailto:qt-interest-bounces at trolltech.com] On Behalf Of Denis Akhmetzyanov
Sent: Thursday, April 15, 2010 1:31 AM
To: BRM
Cc: qt-interest
Subject: Re: [Qt-interest] Drawing to QImage

Hi,
C++ GUI Programming with Qt 4 (2nd Edition) - The official C++/Qt book
http://qt.nokia.com/developer/books/cpp-gui-programming-with-qt-4-2nd-edition

has some useful information about this question. Part  II, Chapter 8, 2D Graphics, topic "High-Quality Rendering with QImage".
In my experience, the main advantage of drawing on the QImage is that rendering result looking exactly the same on all platforms. But performance is worse than direct drawing on a QWidget.


2010/4/14 BRM <bm_witness at yahoo.com<mailto:bm_witness at yahoo.com>>
I'm looking for some good information on drawing to QImage instead of directly in a QWidget.
Doing a quick google search didn't up much useful information; and while I've taken my first stab at it - my results were not useful either.
I know I'm probably doing something wrong; and would like to be able to read over some stuff on it; but the Qt documentation merely mentions it in passing.

TIA,

Ben

_______________________________________________
Qt-interest mailing list
Qt-interest at trolltech.com<mailto:Qt-interest at trolltech.com>
http://lists.trolltech.com/mailman/listinfo/qt-interest



--
Best regards,
Denis Akhmetzyanov


---------------------------------------------------------------------------------------------------
Weidlinger Associates, Inc. made the following annotations.

"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."

"Please consider our environment before printing this email."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100415/893a86a7/attachment.html 


More information about the Qt-interest-old mailing list