fix precise paint device wrapper readRects in wrap around mode
ClosedPublic

Authored by dranke on Mar 25 2018, 3:42 PM.

Details

Summary

KisPrecisePaintDeviceWrapper::readRects clamped the input rects to the device extents without regard to the wrap around mode. So if a rect is passed that is outside the image bounds, it is clamped to be zero sized and nothing is read instead of reading from the wrapped position.

This causes all color smudge brushes to be broken when used outside the image bounds in wrap around mode.

This change adds a case for wrap around mode which correctly wraps the rect before clamping.

BUG: 392312

Diff Detail

Repository
R37 Krita
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
dranke requested review of this revision.Mar 25 2018, 3:42 PM
dranke created this revision.
dranke edited the summary of this revision. (Show Details)Mar 25 2018, 3:48 PM
dranke added a reviewer: Krita.
alvinhochun added subscribers: dkazakov, alvinhochun.

@dkazakov should check this.

rempt added a subscriber: rempt.Mar 28 2018, 9:20 AM

Looks like Dmitry is still in release mode, so I've pinged him about the patch.

dkazakov accepted this revision.Mar 28 2018, 2:24 PM

Hi, @dranke!

The patch looks and works perfectly, thank you!

Do you have a KDE developer account or we should push the patch for you? If you want me to push the patch under your name, please write me your email+full name to an email and I will use it for the commit:

Send to:
dimula73 at gmail dot com

This revision is now accepted and ready to land.Mar 28 2018, 2:24 PM
This revision was automatically updated to reflect the committed changes.