|
|||||||||
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.QPainter.CompositionMode
public static final class QPainter.CompositionMode
Defines the Porter-Duff rules for digital image compositing. Composition modes are used to specify how the pixels in one image, the source, are merged with the pixel in another image, the destination.
SourceOver
(often referred to as just alpha blending) where the source pixel is blended on top of the destination pixel in such a way that the alpha component of the source defines the translucency of the pixel. When the paint device is a QImage
, the image format must be set to Format_ARGB32Premultiplied
or Format_ARGB32
for the composition modes to have any effect. For performance the premultiplied version is the preferred format.
When a composition mode is set it applies to all painting operator, pens, brushes, gradients and pixmap/image drawing.
compositionMode()
, setCompositionMode()
, Composition Modes
, and Image Composition Example.
Field Summary | |
---|---|
static QPainter.CompositionMode |
CompositionMode_Clear
The pixels in the destination are cleared (set to fully transparent) independent of the source. |
static QPainter.CompositionMode |
CompositionMode_ColorBurn
The destination color is darkened to reflect the source color. |
static QPainter.CompositionMode |
CompositionMode_ColorDodge
The destination color is brightened to reflect the source color. |
static QPainter.CompositionMode |
CompositionMode_Darken
The darker of the source and destination colors is selected. |
static QPainter.CompositionMode |
CompositionMode_Destination
|
static QPainter.CompositionMode |
CompositionMode_DestinationAtop
The destination pixel is blended on top of the source, with the alpha of the destination pixel is reduced by the alpha of the destination pixel. |
static QPainter.CompositionMode |
CompositionMode_DestinationIn
The output is the destination, where the alpha is reduced by that of the source. |
static QPainter.CompositionMode |
CompositionMode_DestinationOut
The output is the destination, where the alpha is reduced by the inverse of the source. |
static QPainter.CompositionMode |
CompositionMode_DestinationOver
The alpha of the destination is used to blend it on top of the source pixels. |
static QPainter.CompositionMode |
CompositionMode_Difference
Subtracts the darker of the colors from the lighter. |
static QPainter.CompositionMode |
CompositionMode_Exclusion
Similar to CompositionMode_Difference , but with a lower contrast. |
static QPainter.CompositionMode |
CompositionMode_HardLight
Multiplies or screens the colors depending on the source color. |
static QPainter.CompositionMode |
CompositionMode_Lighten
The lighter of the source and destination colors is selected. |
static QPainter.CompositionMode |
CompositionMode_Multiply
The output is the source color multiplied by the destination. |
static QPainter.CompositionMode |
CompositionMode_Overlay
Multiplies or screens the colors depending on the destination color. |
static QPainter.CompositionMode |
CompositionMode_Plus
Both the alpha and color of the source and destination pixels are added together. |
static QPainter.CompositionMode |
CompositionMode_Screen
The source and destination colors are inverted and then multiplied. |
static QPainter.CompositionMode |
CompositionMode_SoftLight
Darkens or lightens the colors depending on the source color. |
static QPainter.CompositionMode |
CompositionMode_Source
|
static QPainter.CompositionMode |
CompositionMode_SourceAtop
The source pixel is blended on top of the destination, with the alpha of the source pixel reduced by the alpha of the destination pixel. |
static QPainter.CompositionMode |
CompositionMode_SourceIn
The output is the source, where the alpha is reduced by that of the destination. |
static QPainter.CompositionMode |
CompositionMode_SourceOut
The output is the source, where the alpha is reduced by the inverse of destination. |
static QPainter.CompositionMode |
CompositionMode_SourceOver
This is the default mode. |
static QPainter.CompositionMode |
CompositionMode_Xor
The source, whose alpha is reduced with the inverse of the destination alpha, is merged with the destination, whose alpha is reduced by the inverse of the source alpha. |
Method Summary | |
---|---|
static QPainter.CompositionMode |
resolve(int value)
|
int |
value()
This function should return an integer value for the enum values of the enumeration that implements this interface. |
static QPainter.CompositionMode |
valueOf(java.lang.String name)
|
static QPainter.CompositionMode[] |
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 QPainter.CompositionMode CompositionMode_SourceOver
public static final QPainter.CompositionMode CompositionMode_DestinationOver
CompositionMode_SourceOver
.
public static final QPainter.CompositionMode CompositionMode_Clear
public static final QPainter.CompositionMode CompositionMode_Source
public static final QPainter.CompositionMode CompositionMode_Destination
public static final QPainter.CompositionMode CompositionMode_SourceIn
public static final QPainter.CompositionMode CompositionMode_DestinationIn
CompositionMode_SourceIn
.
public static final QPainter.CompositionMode CompositionMode_SourceOut
public static final QPainter.CompositionMode CompositionMode_DestinationOut
CompositionMode_SourceOut
.
public static final QPainter.CompositionMode CompositionMode_SourceAtop
public static final QPainter.CompositionMode CompositionMode_DestinationAtop
CompositionMode_SourceAtop
.
public static final QPainter.CompositionMode CompositionMode_Xor
CompositionMode_Xor
is not the same as the bitwise Xor.
public static final QPainter.CompositionMode CompositionMode_Plus
public static final QPainter.CompositionMode CompositionMode_Multiply
public static final QPainter.CompositionMode CompositionMode_Screen
public static final QPainter.CompositionMode CompositionMode_Overlay
public static final QPainter.CompositionMode CompositionMode_Darken
public static final QPainter.CompositionMode CompositionMode_Lighten
public static final QPainter.CompositionMode CompositionMode_ColorDodge
public static final QPainter.CompositionMode CompositionMode_ColorBurn
public static final QPainter.CompositionMode CompositionMode_HardLight
public static final QPainter.CompositionMode CompositionMode_SoftLight
CompositionMode_HardLight
.
public static final QPainter.CompositionMode CompositionMode_Difference
public static final QPainter.CompositionMode CompositionMode_Exclusion
CompositionMode_Difference
, but with a lower contrast. Painting with white inverts the destination color, whereas painting with black leaves the destination color unchanged.
Method Detail |
---|
public static QPainter.CompositionMode[] values()
public static QPainter.CompositionMode valueOf(java.lang.String name)
public int value()
value
in interface QtEnumerator
public static QPainter.CompositionMode resolve(int value)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |