Commit 601167c5 authored by Dmitry Kazakov's avatar Dmitry Kazakov
Browse files

Fix Lightness Strength option for the Colorsmudge engine

The option should be applied at the level when we are painting on the
hightmap channel, not when we merge the final projection.
parent 0769eb40
...@@ -123,6 +123,7 @@ KisColorSmudgeStrategyLightness::paintDab(const QRect &srcRect, const QRect &dst ...@@ -123,6 +123,7 @@ KisColorSmudgeStrategyLightness::paintDab(const QRect &srcRect, const QRect &dst
colorRateValue, colorRateValue,
smudgeRadiusValue); smudgeRadiusValue);
m_heightmapPainter.setOpacity(qRound(lightnessStrengthValue * 255.0));
m_heightmapPainter.bltFixed(dstRect.topLeft(), m_origDab, m_origDab->bounds()); m_heightmapPainter.bltFixed(dstRect.topLeft(), m_origDab, m_origDab->bounds());
m_heightmapPainter.renderMirrorMaskSafe(dstRect, m_origDab, m_shouldPreserveOriginalDab); m_heightmapPainter.renderMirrorMaskSafe(dstRect, m_origDab, m_shouldPreserveOriginalDab);
...@@ -145,7 +146,7 @@ KisColorSmudgeStrategyLightness::paintDab(const QRect &srcRect, const QRect &dst ...@@ -145,7 +146,7 @@ KisColorSmudgeStrategyLightness::paintDab(const QRect &srcRect, const QRect &dst
modulateLightnessByGrayBrush(tempColorDevice->data(), modulateLightnessByGrayBrush(tempColorDevice->data(),
reinterpret_cast<const QRgb*>(tempHeightmapDevice->data()), reinterpret_cast<const QRgb*>(tempHeightmapDevice->data()),
0, 0,
lightnessStrengthValue, 1.0,
numPixels); numPixels);
m_projectionDevice->writeBytes(tempColorDevice->data(), tempColorDevice->bounds()); m_projectionDevice->writeBytes(tempColorDevice->data(), tempColorDevice->bounds());
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment