@@ -654,23 +654,6 @@ static QgsPalLayerSettings::SizeUnit _decodeUnits( const QString& str )
654
654
return QgsPalLayerSettings::MM; // "MM"
655
655
}
656
656
657
- static QPainter::CompositionMode _decodeBlendMode ( const QString& str )
658
- {
659
- if ( str.compare ( " Lighten" , Qt::CaseInsensitive ) == 0 ) return QPainter::CompositionMode_Lighten;
660
- if ( str.compare ( " Screen" , Qt::CaseInsensitive ) == 0 ) return QPainter::CompositionMode_Screen;
661
- if ( str.compare ( " Dodge" , Qt::CaseInsensitive ) == 0 ) return QPainter::CompositionMode_ColorDodge;
662
- if ( str.compare ( " Addition" , Qt::CaseInsensitive ) == 0 ) return QPainter::CompositionMode_Plus;
663
- if ( str.compare ( " Darken" , Qt::CaseInsensitive ) == 0 ) return QPainter::CompositionMode_Darken;
664
- if ( str.compare ( " Multiply" , Qt::CaseInsensitive ) == 0 ) return QPainter::CompositionMode_Multiply;
665
- if ( str.compare ( " Burn" , Qt::CaseInsensitive ) == 0 ) return QPainter::CompositionMode_ColorBurn;
666
- if ( str.compare ( " Overlay" , Qt::CaseInsensitive ) == 0 ) return QPainter::CompositionMode_Overlay;
667
- if ( str.compare ( " SoftLight" , Qt::CaseInsensitive ) == 0 ) return QPainter::CompositionMode_SoftLight;
668
- if ( str.compare ( " HardLight" , Qt::CaseInsensitive ) == 0 ) return QPainter::CompositionMode_HardLight;
669
- if ( str.compare ( " Difference" , Qt::CaseInsensitive ) == 0 ) return QPainter::CompositionMode_Difference;
670
- if ( str.compare ( " Subtract" , Qt::CaseInsensitive ) == 0 ) return QPainter::CompositionMode_Exclusion;
671
- return QPainter::CompositionMode_SourceOver; // "Normal"
672
- }
673
-
674
657
static Qt::PenJoinStyle _decodePenJoinStyle ( const QString& str )
675
658
{
676
659
if ( str.compare ( " Miter" , Qt::CaseInsensitive ) == 0 ) return Qt::MiterJoin;
@@ -2483,7 +2466,7 @@ bool QgsPalLayerSettings::dataDefinedValEval( const QString& valType,
2483
2466
2484
2467
if ( !blendstr.isEmpty () )
2485
2468
{
2486
- dataDefinedValues.insert ( p, QVariant (( int )_decodeBlendMode ( blendstr ) ) );
2469
+ dataDefinedValues.insert ( p, QVariant (( int )QgsSymbolLayerV2Utils::decodeBlendMode ( blendstr ) ) );
2487
2470
return true ;
2488
2471
}
2489
2472
}
0 commit comments