summaryrefslogtreecommitdiffstats
path: root/src/widgets/styles/qstyleoption.cpp
diff options
context:
space:
mode:
authorDimitar Asenov <dimitar.asenov@gmail.com>2014-03-12 14:19:04 -0700
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-18 19:29:16 +0100
commit9891c5051f02b940f6dc94ac4ccf945e036feb13 (patch)
tree194e1a915407722796f88d952d79cec9dc2b9ebe /src/widgets/styles/qstyleoption.cpp
parent4d09a54b7559f32d4824613f90f4016e9446fbd7 (diff)
Add a new optimization property to QGraphicsScene
The minimumRenderSize is a qreal value that is used as a lower bound to determine what items are visible when a scene is rendered. If an item's view-transformed width or height are less than minimumRenderSize then this item is considered to insignificantly affect the final result and is not drawn. If the item clips its children to its shape they are automatically not drawn. This greatly reduces the drawing overhead for scenes with many items rendered in a zoomed out view. [ChangeLog][QtWidgets][QGraphicsScene] Added the minimumRenderSize property which can be used to speed up rendering by not painting items, smaller than a give size. Change-Id: Ie208234707dffb4d2fc620fc5d1514e0c144d9a8 Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Diffstat (limited to 'src/widgets/styles/qstyleoption.cpp')
-rw-r--r--src/widgets/styles/qstyleoption.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/widgets/styles/qstyleoption.cpp b/src/widgets/styles/qstyleoption.cpp
index 5913b2f261..f642a05d13 100644
--- a/src/widgets/styles/qstyleoption.cpp
+++ b/src/widgets/styles/qstyleoption.cpp
@@ -3702,6 +3702,8 @@ QStyleOptionGraphicsItem::QStyleOptionGraphicsItem(int version)
of the painter used to draw the item. By default, if no
transformations are applied, its value is 1. If zoomed out 1:2, the level
of detail will be 0.5, and if zoomed in 2:1, its value is 2.
+
+ \sa QGraphicsScene::minimumRenderSize()
*/
qreal QStyleOptionGraphicsItem::levelOfDetailFromTransform(const QTransform &worldTransform)
{