diff options
author | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-11-05 11:12:22 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-11-05 11:16:26 (GMT) |
commit | 4bf7f90a27377f439e86d6175e5e3cdebd131be0 (patch) | |
tree | d053749ab3f3028a5fc57272ea182a805829bde6 /src/corelib/animation/qabstractanimation.cpp | |
parent | b2c60696dd54656c1a0d588342cc3c7beee70876 (diff) | |
download | Qt-4bf7f90a27377f439e86d6175e5e3cdebd131be0.zip Qt-4bf7f90a27377f439e86d6175e5e3cdebd131be0.tar.gz Qt-4bf7f90a27377f439e86d6175e5e3cdebd131be0.tar.bz2 |
Always set a clip on the painter in QGraphicsView.
This allows items to check painter->clipRegion() to find out what the
imposed clip is, in order to cull elements that don't need to be
painted. This is an alternative approach to getting the same
information from QStyleOptionGraphicsItem::exposedRect. It's better
because it's a pull operation, but it's slightly worse because it
doesn't include the complete system clip, and because QRegion has
integer resolution only (whereas QGraphicsItem's coordinate uses
qreal.
A better approach may be to access QPainter's combined clip region;
this option is open for future versions of Qt.
Original patch by Warwick (which is why he's on reviewed-by), but the
patch was modified to operate in device instead of logical coordinates.
Reviewed-by: jasplin
Reviewed-by: Warwick Allison
Diffstat (limited to 'src/corelib/animation/qabstractanimation.cpp')
0 files changed, 0 insertions, 0 deletions