|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |
java.lang.Objectjava.lang.Enum<QGraphicsView.OptimizationFlag>
com.trolltech.qt.gui.QGraphicsView.OptimizationFlag
public static enum 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.
Enum Constant Summary | |
---|---|
DontAdjustForAntialiasing
Disables QGraphicsView's antialiasing auto-adjustment of exposed areas. |
|
DontClipPainter
QGraphicsView sometimes clips the painter when rendering the scene contents. |
|
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()
|
static QGraphicsView.OptimizationFlag |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. |
static QGraphicsView.OptimizationFlag[] |
values()
Returns an array containing the constants of this enum type, in the order they're declared. |
Methods inherited from class java.lang.Enum |
---|
clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Enum Constant 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
When rendering, 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
Disables 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 final QGraphicsView.OptimizationFlag[] values()
for(QGraphicsView.OptimizationFlag c : QGraphicsView.OptimizationFlag.values()) System.out.println(c);
public static QGraphicsView.OptimizationFlag valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.
java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namepublic 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 | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD |