Commit ab670ba3 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix BuildUp painting mode for masks and selection-based layers

When rendering dabs we should use correct pixel size :)

BUG:394438
parent 56b7bbc9
......@@ -67,7 +67,7 @@ void KisPainter::Private::applyDevice(const QRect &applyRect,
const int dabX = dstX - dabRect.x();
const int dabY = dstY - dabRect.y();
localParamInfo.srcRowStart = dab.device->constData() + dabX * pixelSize + dabY * dabRowStride;
localParamInfo.srcRowStart = dab.device->constData() + dabX * srcPixelSize + dabY * dabRowStride;
localParamInfo.srcRowStride = dabRowStride;
localParamInfo.setOpacityAndAverage(dab.opacity, dab.averageOpacity);
localParamInfo.flow = dab.flow;
......@@ -131,7 +131,7 @@ void KisPainter::Private::applyDeviceWithSelection(const QRect &applyRect,
const int dabX = dstX - dabRect.x();
const int dabY = dstY - dabRect.y();
localParamInfo.srcRowStart = dab.device->constData() + dabX * pixelSize + dabY * dabRowStride;
localParamInfo.srcRowStart = dab.device->constData() + dabX * srcPixelSize + dabY * dabRowStride;
localParamInfo.srcRowStride = dabRowStride;
localParamInfo.setOpacityAndAverage(dab.opacity, dab.averageOpacity);
localParamInfo.flow = dab.flow;
......
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