26 return QPainter::CompositionMode_SourceOver;
28 return QPainter::CompositionMode_Lighten;
30 return QPainter::CompositionMode_Screen;
32 return QPainter::CompositionMode_ColorDodge;
34 return QPainter::CompositionMode_Plus;
36 return QPainter::CompositionMode_Darken;
38 return QPainter::CompositionMode_Multiply;
40 return QPainter::CompositionMode_ColorBurn;
42 return QPainter::CompositionMode_Overlay;
44 return QPainter::CompositionMode_SoftLight;
46 return QPainter::CompositionMode_HardLight;
48 return QPainter::CompositionMode_Difference;
50 return QPainter::CompositionMode_Exclusion;
52 return QPainter::CompositionMode_Source;
54 return QPainter::CompositionMode_DestinationOver;
56 return QPainter::CompositionMode_Clear;
58 return QPainter::CompositionMode_Destination;
60 return QPainter::CompositionMode_SourceIn;
62 return QPainter::CompositionMode_DestinationIn;
64 return QPainter::CompositionMode_SourceOut;
66 return QPainter::CompositionMode_DestinationOut;
68 return QPainter::CompositionMode_SourceAtop;
70 return QPainter::CompositionMode_DestinationAtop;
72 return QPainter::CompositionMode_Xor;
74 QgsDebugMsg( QString(
"Blend mode %1 mapped to SourceOver" ).arg( blendMode ) );
75 return QPainter::CompositionMode_SourceOver;
85 case QPainter::CompositionMode_SourceOver:
87 case QPainter::CompositionMode_Lighten:
89 case QPainter::CompositionMode_Screen:
91 case QPainter::CompositionMode_ColorDodge:
93 case QPainter::CompositionMode_Plus:
95 case QPainter::CompositionMode_Darken:
97 case QPainter::CompositionMode_Multiply:
99 case QPainter::CompositionMode_ColorBurn:
101 case QPainter::CompositionMode_Overlay:
103 case QPainter::CompositionMode_SoftLight:
105 case QPainter::CompositionMode_HardLight:
107 case QPainter::CompositionMode_Difference:
109 case QPainter::CompositionMode_Exclusion:
111 case QPainter::CompositionMode_Source:
113 case QPainter::CompositionMode_DestinationOver:
115 case QPainter::CompositionMode_Clear:
117 case QPainter::CompositionMode_Destination:
119 case QPainter::CompositionMode_SourceIn:
121 case QPainter::CompositionMode_DestinationIn:
123 case QPainter::CompositionMode_SourceOut:
125 case QPainter::CompositionMode_DestinationOut:
127 case QPainter::CompositionMode_SourceAtop:
129 case QPainter::CompositionMode_DestinationAtop:
131 case QPainter::CompositionMode_Xor:
134 QgsDebugMsg( QString(
"Composition mode %1 mapped to Normal" ).arg( blendMode ) );
static QgsPainting::BlendMode getBlendModeEnum(QPainter::CompositionMode blendMode)
Returns a BlendMode corresponding to a QPainter::CompositionMode.
static QPainter::CompositionMode getCompositionMode(QgsPainting::BlendMode blendMode)
Returns a QPainter::CompositionMode corresponding to a BlendMode.
BlendMode
Blending modes enum defining the available composition modes that can be used when rendering a layer...