|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Enum
com.trolltech.qt.gui.QGraphicsView.OptimizationFlag
public static final class QGraphicsView.OptimizationFlag
This enum describes flags that you can enable to improve rendering performance in QGraphicsView
. By default, none of these flags are set. Note that setting a flag usually imposes a side effect, and this effect can vary between paint devices and platforms.
Field Summary | |
---|---|
static QGraphicsView.OptimizationFlag |
DontAdjustForAntialiasing
Disables QGraphicsView 's antialiasing auto-adjustment of exposed areas. |
static QGraphicsView.OptimizationFlag |
DontClipPainter
QGraphicsView sometimes clips the painter when rendering the scene contents. |
static QGraphicsView.OptimizationFlag |
DontSavePainterState
When rendering, QGraphicsView protects the painter state (see QPainter::save() ) when rendering the background or foreground, and when rendering each item. |
Method Summary | |
---|---|
static QGraphicsView.OptimizationFlags |
createQFlags(QGraphicsView.OptimizationFlag[] values)
|
static QGraphicsView.OptimizationFlag |
resolve(int value)
|
int |
value()
This function should return an integer value for the enum values of the enumeration that implements this interface. |
static QGraphicsView.OptimizationFlag |
valueOf(java.lang.String name)
|
static QGraphicsView.OptimizationFlag[] |
values()
|
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final QGraphicsView.OptimizationFlag DontClipPainter
QGraphicsView
sometimes clips the painter when rendering the scene contents. This can generally improve performance (e.g., rendering only small parts of a large pixmap), and protects against rendering mistakes (e.g., drawing outside bounding rectangles, or outside the exposed area). In some situations, however, the painter clip can slow down rendering; especially when all painting is restricted to inside exposed areas. By enabling this flag, QGraphicsView
will completely disable its implicit clipping. Note that rendering artifacts from using a semi-transparent foreground or background brush can occur if clipping is disabled.
public static final QGraphicsView.OptimizationFlag DontSavePainterState
QGraphicsView
protects the painter state (see QPainter::save()
) when rendering the background or foreground, and when rendering each item. This allows you to leave the painter in an altered state (i.e., you can call QPainter::setPen()
or QPainter::setBrush()
without restoring the state after painting). However, if the items consistently do restore the state, you should enable this flag to prevent QGraphicsView
from doing the same.
public static final QGraphicsView.OptimizationFlag DontAdjustForAntialiasing
QGraphicsView
's antialiasing auto-adjustment of exposed areas. Items that render antialiased lines on the boundaries of their QGraphicsItem::boundingRect()
can end up rendering parts of the line outside. To prevent rendering artifacts, QGraphicsView
expands all exposed regions by 2 pixels in all directions. If you enable this flag, QGraphicsView
will no longer perform these adjustments, minimizing the areas that require redrawing, which improves performance. A common side effect is that items that do draw with antialiasing can leave painting traces behind on the scene as they are moved.
Method Detail |
---|
public static QGraphicsView.OptimizationFlag[] values()
public static QGraphicsView.OptimizationFlag valueOf(java.lang.String name)
public int value()
value
in interface QtEnumerator
public static QGraphicsView.OptimizationFlags createQFlags(QGraphicsView.OptimizationFlag[] values)
public static QGraphicsView.OptimizationFlag resolve(int value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |