summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorTrond Kjernåsen <trond@trolltech.com>2010-02-08 15:34:30 (GMT)
committerTrond Kjernåsen <trond@trolltech.com>2010-02-08 15:35:31 (GMT)
commit8ce0a7dfac6955ab3b5bf6cd0ee4abe63f753618 (patch)
tree57f5114c2a31968e4cbaa476813b2f49f1920603 /src/gui
parentc624935a958783d3314fe6c2f6845e6b51a97f95 (diff)
downloadQt-8ce0a7dfac6955ab3b5bf6cd0ee4abe63f753618.zip
Qt-8ce0a7dfac6955ab3b5bf6cd0ee4abe63f753618.tar.gz
Qt-8ce0a7dfac6955ab3b5bf6cd0ee4abe63f753618.tar.bz2
Updated the docs for QPainter::begin/endNativePainting()
Task-number: QTBUG-7661 Reviewed-by: Kim
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/painting/qpainter.cpp23
1 files changed, 18 insertions, 5 deletions
diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp
index bf12c6b..3bcaf8c 100644
--- a/src/gui/painting/qpainter.cpp
+++ b/src/gui/painting/qpainter.cpp
@@ -1986,12 +1986,25 @@ QPaintEngine *QPainter::paintEngine() const
endNativePainting().
Note that only the states the underlying paint engine changes will be reset
- to their respective default states. If, for example, the OpenGL polygon
- mode is changed by the user inside a beginNativePaint()/endNativePainting()
- block, it will not be reset to the default state by endNativePainting().
+ to their respective default states. The states we reset may change from
+ release to release. The following states are currently reset in the OpenGL
+ 2 engine:
- Here is an example that shows intermixing of painter commands
- and raw OpenGL commands:
+ \list
+ \i blending is disabled
+ \i the depth, stencil and scissor tests are disabled
+ \i the active texture unit is reset to 0
+ \i the depth mask, depth function and the clear depth are reset to their
+ default values
+ \i the stencil mask, stencil operation and stencil function are reset to
+ their default values
+ \i the current color is reset to solid white
+ \endlist
+
+ If, for example, the OpenGL polygon mode is changed by the user inside a
+ beginNativePaint()/endNativePainting() block, it will not be reset to the
+ default state by endNativePainting(). Here is an example that shows
+ intermixing of painter commands and raw OpenGL commands:
\snippet doc/src/snippets/code/src_gui_painting_qpainter.cpp 21