Commit aa81b849 authored by Dmitry Kazakov's avatar Dmitry Kazakov

Fix brush rendering on low-precision levels (1 and 2)

When we draw a dab, which has a size different from the desired size,
we should center it around the "ideal" dab position.
parent 0dbc8822
......@@ -68,7 +68,14 @@ KisDabRenderingJob &KisDabRenderingJob::operator=(const KisDabRenderingJob &rhs)
QPoint KisDabRenderingJob::dstDabOffset() const
return generationInfo.dstDabRect.topLeft();
/// Recenter generated low-res dab around the center
/// of the idel theoretical dab rect
const QPoint p1 = generationInfo.dstDabRect.topLeft();
const QPoint s1 = QPoint(generationInfo.dstDabRect.width(),
const QPoint s2 = QPoint(postprocessedDevice->bounds().width(),
return p1 + (s1 - s2) / 2;
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