diff --git a/python/PyQt6/core/auto_additions/qgis.py b/python/PyQt6/core/auto_additions/qgis.py index ce54603fc041..f48a4ff35eb5 100644 --- a/python/PyQt6/core/auto_additions/qgis.py +++ b/python/PyQt6/core/auto_additions/qgis.py @@ -8554,6 +8554,18 @@ QgsPainting.BlendMode.BlendXor = Qgis.BlendMode.Xor QgsPainting.BlendXor.is_monkey_patched = True QgsPainting.BlendXor.__doc__ = "XOR" +QgsPainting.Nonseparable_Hue = Qgis.BlendMode.Nonseparable_Hue +QgsPainting.Nonseparable_Hue.is_monkey_patched = True +QgsPainting.Nonseparable_Hue.__doc__ = "Nonseparable Hue" +QgsPainting.Nonseparable_Saturation = Qgis.BlendMode.Nonseparable_Saturation +QgsPainting.Nonseparable_Saturation.is_monkey_patched = True +QgsPainting.Nonseparable_Saturation.__doc__ = "Nonseparable Saturation" +QgsPainting.Nonseparable_Color = Qgis.BlendMode.Nonseparable_Color +QgsPainting.Nonseparable_Color.is_monkey_patched = True +QgsPainting.Nonseparable_Color.__doc__ = "Nonseparable Color" +QgsPainting.Nonseparable_Luminosity = Qgis.BlendMode.Nonseparable_Luminosity +QgsPainting.Nonseparable_Luminosity.is_monkey_patched = True +QgsPainting.Nonseparable_Luminosity.__doc__ = "Nonseparable Luminosity" Qgis.BlendMode.__doc__ = """Blending modes defining the available composition modes that can be used when painting. @@ -8659,6 +8671,10 @@ Available as ``QgsPainting.BlendXor`` in older QGIS releases. +* ``Nonseparable_Hue``: Nonseparable Hue +* ``Nonseparable_Saturation``: Nonseparable Saturation +* ``Nonseparable_Color``: Nonseparable Color +* ``Nonseparable_Luminosity``: Nonseparable Luminosity """ # -- diff --git a/python/PyQt6/core/auto_generated/qgis.sip.in b/python/PyQt6/core/auto_generated/qgis.sip.in index 5871b998f5e3..1e0fd5ed9c36 100644 --- a/python/PyQt6/core/auto_generated/qgis.sip.in +++ b/python/PyQt6/core/auto_generated/qgis.sip.in @@ -2635,6 +2635,10 @@ The development version SourceAtop, DestinationAtop, Xor, + Nonseparable_Hue, + Nonseparable_Saturation, + Nonseparable_Color, + Nonseparable_Luminosity }; enum class SystemOfMeasurement /BaseType=IntEnum/ diff --git a/python/core/auto_additions/qgis.py b/python/core/auto_additions/qgis.py index 4c06ddf6f95b..c7ebec8374d5 100644 --- a/python/core/auto_additions/qgis.py +++ b/python/core/auto_additions/qgis.py @@ -8476,6 +8476,18 @@ QgsPainting.BlendMode.BlendXor = Qgis.BlendMode.Xor QgsPainting.BlendXor.is_monkey_patched = True QgsPainting.BlendXor.__doc__ = "XOR" +QgsPainting.Nonseparable_Hue = Qgis.BlendMode.Nonseparable_Hue +QgsPainting.Nonseparable_Hue.is_monkey_patched = True +QgsPainting.Nonseparable_Hue.__doc__ = "Nonseparable Hue" +QgsPainting.Nonseparable_Saturation = Qgis.BlendMode.Nonseparable_Saturation +QgsPainting.Nonseparable_Saturation.is_monkey_patched = True +QgsPainting.Nonseparable_Saturation.__doc__ = "Nonseparable Saturation" +QgsPainting.Nonseparable_Color = Qgis.BlendMode.Nonseparable_Color +QgsPainting.Nonseparable_Color.is_monkey_patched = True +QgsPainting.Nonseparable_Color.__doc__ = "Nonseparable Color" +QgsPainting.Nonseparable_Luminosity = Qgis.BlendMode.Nonseparable_Luminosity +QgsPainting.Nonseparable_Luminosity.is_monkey_patched = True +QgsPainting.Nonseparable_Luminosity.__doc__ = "Nonseparable Luminosity" Qgis.BlendMode.__doc__ = """Blending modes defining the available composition modes that can be used when painting. @@ -8581,6 +8593,10 @@ Available as ``QgsPainting.BlendXor`` in older QGIS releases. +* ``Nonseparable_Hue``: Nonseparable Hue +* ``Nonseparable_Saturation``: Nonseparable Saturation +* ``Nonseparable_Color``: Nonseparable Color +* ``Nonseparable_Luminosity``: Nonseparable Luminosity """ # -- diff --git a/python/core/auto_generated/qgis.sip.in b/python/core/auto_generated/qgis.sip.in index 7a33dc80aa1b..2f4f28b360d6 100644 --- a/python/core/auto_generated/qgis.sip.in +++ b/python/core/auto_generated/qgis.sip.in @@ -2635,6 +2635,10 @@ The development version SourceAtop, DestinationAtop, Xor, + Nonseparable_Hue, + Nonseparable_Saturation, + Nonseparable_Color, + Nonseparable_Luminosity }; enum class SystemOfMeasurement diff --git a/src/core/painting/qgspainting.cpp b/src/core/painting/qgspainting.cpp index 6ed80c5f99c0..e937ea23b896 100644 --- a/src/core/painting/qgspainting.cpp +++ b/src/core/painting/qgspainting.cpp @@ -74,6 +74,14 @@ QPainter::CompositionMode QgsPainting::getCompositionMode( Qgis::BlendMode blend return QPainter::CompositionMode_DestinationAtop; case Qgis::BlendMode::Xor: return QPainter::CompositionMode_Xor; + case Qgis::BlendMode::Nonseparable_Hue: + return QPainter::CompositionMode_Nonseparable_Hue; + case Qgis::BlendMode::Nonseparable_Saturation: + return QPainter::CompositionMode_Nonseparable_Saturation; + case Qgis::BlendMode::Nonseparable_Color: + return QPainter::CompositionMode_Nonseparable_Color; + case Qgis::BlendMode::Nonseparable_Luminosity: + return QPainter::CompositionMode_Nonseparable_Luminosity; default: QgsDebugError( QStringLiteral( "Blend mode %1 mapped to SourceOver" ).arg( qgsEnumValueToKey( blendMode ) ) ); return QPainter::CompositionMode_SourceOver; @@ -134,6 +142,14 @@ Qgis::BlendMode QgsPainting::getBlendModeEnum( QPainter::CompositionMode blendMo return Qgis::BlendMode::DestinationAtop; case QPainter::CompositionMode_Xor: return Qgis::BlendMode::Xor; + case QPainter::CompositionMode_Nonseparable_Hue: + return Qgis::BlendMode::Nonseparable_Hue; + case QPainter::CompositionMode_Nonseparable_Saturation: + return Qgis::BlendMode::Nonseparable_Saturation; + case QPainter::CompositionMode_Nonseparable_Color: + return Qgis::BlendMode::Nonseparable_Color; + case QPainter::CompositionMode_Nonseparable_Luminosity: + return Qgis::BlendMode::Nonseparable_Luminosity; default: QgsDebugError( QStringLiteral( "Composition mode %1 mapped to Normal" ).arg( blendMode ) ); return Qgis::BlendMode::Normal; @@ -161,6 +177,10 @@ bool QgsPainting::isClippingMode( Qgis::BlendMode mode ) case Qgis::BlendMode::DestinationOver: case Qgis::BlendMode::Clear: case Qgis::BlendMode::Destination: + case Qgis::BlendMode::Nonseparable_Hue: + case Qgis::BlendMode::Nonseparable_Saturation: + case Qgis::BlendMode::Nonseparable_Color: + case Qgis::BlendMode::Nonseparable_Luminosity; return false; case Qgis::BlendMode::SourceIn: diff --git a/src/core/qgis.h b/src/core/qgis.h index 31d6fba5792a..1ca5f7399b0a 100644 --- a/src/core/qgis.h +++ b/src/core/qgis.h @@ -4679,6 +4679,10 @@ class CORE_EXPORT Qgis SourceAtop SIP_MONKEYPATCH_COMPAT_NAME( BlendSourceAtop ), //!< Source atop DestinationAtop SIP_MONKEYPATCH_COMPAT_NAME( BlendDestinationAtop ), //!< Destination atop Xor SIP_MONKEYPATCH_COMPAT_NAME( BlendXor ), //!< XOR + Nonseparable_Hue, //!< Nonseparable Hue + Nonseparable_Saturation, //!< Nonseparable Saturation + Nonseparable_Color, //!< Nonseparable Color + Nonseparable_Luminosity //!< Nonseparable Luminosity }; Q_ENUM( BlendMode ) diff --git a/src/core/qgsproperty.cpp b/src/core/qgsproperty.cpp index da85a5c30150..365e16a53e32 100644 --- a/src/core/qgsproperty.cpp +++ b/src/core/qgsproperty.cpp @@ -105,7 +105,8 @@ QgsPropertyDefinition::QgsPropertyDefinition( const QString &name, const QString mTypes = DataTypeString; mHelpText = trString() + QStringLiteral( "[Normal|Lighten|Screen|Dodge|
" "Addition|Darken|Multiply|Burn|Overlay|
" - "SoftLight|HardLight|Difference|Subtract]" ); + "SoftLight|HardLight|Difference|Subtract
]" + "Nonseparable_Hue|Nonseparable_Saturation|Nonseparable_Color|Nonseparable_Luminosity]" ); break; case Point: diff --git a/src/core/symbology/qgssymbollayerutils.cpp b/src/core/symbology/qgssymbollayerutils.cpp index c2b5ed72e94c..918767f72920 100644 --- a/src/core/symbology/qgssymbollayerutils.cpp +++ b/src/core/symbology/qgssymbollayerutils.cpp @@ -881,6 +881,10 @@ QPainter::CompositionMode QgsSymbolLayerUtils::decodeBlendMode( const QString &s if ( s.compare( QLatin1String( "HardLight" ), Qt::CaseInsensitive ) == 0 ) return QPainter::CompositionMode_HardLight; if ( s.compare( QLatin1String( "Difference" ), Qt::CaseInsensitive ) == 0 ) return QPainter::CompositionMode_Difference; if ( s.compare( QLatin1String( "Subtract" ), Qt::CaseInsensitive ) == 0 ) return QPainter::CompositionMode_Exclusion; + if ( s.compare( QLatin1String( "Nonseparable_Hue" ), Qt::CaseInsensitive ) == 0 ) return QPainter::CompositionMode_Nonseparable_Hue; + if ( s.compare( QLatin1String( "Nonseparable_Saturation" ), Qt::CaseInsensitive ) == 0 ) return QPainter::CompositionMode_Nonseparable_Saturation; + if ( s.compare( QLatin1String( "Nonseparable_Color" ), Qt::CaseInsensitive ) == 0 ) return QPainter::CompositionMode_Nonseparable_Color; + if ( s.compare( QLatin1String( "Nonseparable_Luminosity" ), Qt::CaseInsensitive ) == 0 ) return QPainter::CompositionMode_Nonseparable_Luminosity; return QPainter::CompositionMode_SourceOver; // "Normal" } diff --git a/src/gui/qgsblendmodecombobox.cpp b/src/gui/qgsblendmodecombobox.cpp index 81d91f019ff5..e8ca5c05b0c7 100644 --- a/src/gui/qgsblendmodecombobox.cpp +++ b/src/gui/qgsblendmodecombobox.cpp @@ -57,6 +57,11 @@ void QgsBlendModeComboBox::updateModes() insertSeparator( count() ); addItem( tr( "Difference" ), static_cast( Qgis::BlendMode::Difference ) ); addItem( tr( "Subtract" ), static_cast( Qgis::BlendMode::Subtract ) ); + insertSeparator( count() ); + addItem( tr( "Nonseparable Hue" ), static_cast( Qgis::BlendMode::Nonseparable_Hue ) ); + addItem( tr( "Nonseparable Saturation" ), static_cast( Qgis::BlendMode::Nonseparable_Saturation ) ); + addItem( tr( "Nonseparable Color" ), static_cast( Qgis::BlendMode::Nonseparable_Color ) ); + addItem( tr( "Nonseparable Luminosity" ), static_cast( Qgis::BlendMode::Nonseparable_Luminosity ) ); if ( mShowClipModes ) {