summaryrefslogtreecommitdiffstats
path: root/examples/widgets/doc/src/transformations.qdoc
diff options
context:
space:
mode:
authorFriedemann Kleint <[email protected]>2024-12-17 11:12:13 +0100
committerFriedemann Kleint <[email protected]>2024-12-17 19:59:01 +0100
commit1dc15c11db88f96a916258acea80a86bfa7c87cd (patch)
treeb9f260b60f259414612c463688f554f330c91f83 /examples/widgets/doc/src/transformations.qdoc
parent5731fe051e48e7a256ef31ae93cfb89ce8d871cc (diff)
Use QPainterStateGuard in examples
Complements 9ecf47a8a8d11227ecf192246d7df7c2c4dc9105. Pick-to: 6.9 Change-Id: I65456f8fd34bf9d316b72c4286e1b15789309f7c Reviewed-by: Christian Ehrlicher <[email protected]>
Diffstat (limited to 'examples/widgets/doc/src/transformations.qdoc')
-rw-r--r--examples/widgets/doc/src/transformations.qdoc12
1 files changed, 5 insertions, 7 deletions
diff --git a/examples/widgets/doc/src/transformations.qdoc b/examples/widgets/doc/src/transformations.qdoc
index d90708340c1..f8a29407c83 100644
--- a/examples/widgets/doc/src/transformations.qdoc
+++ b/examples/widgets/doc/src/transformations.qdoc
@@ -161,13 +161,11 @@
\snippet painting/transformations/renderarea.cpp 6
- Before we start to render the shape, we call the QPainter::save()
- function.
-
- QPainter::save() saves the current painter state (i.e. pushes the
- state onto a stack) including the current coordinate system. The
- rationale for saving the painter state is that the following call
- to the \c transformPainter() function will transform the
+ Before we start to render the shape, we instantiate
+ a QPainterStateGuard to save the current painter state (i.e. push the
+ state onto a stack) including the current coordinate system while
+ in scope. The rationale for saving the painter state is that the
+ following call to the \c transformPainter() function will transform the
coordinate system depending on the currently chosen transformation
operations, and we need a way to get back to the original state to
draw the outline.