Diffusion Krita 8208fa254321

Fix artifacts when rendering complex selection outlines

Authored by dkazakov on May 8 2020, 1:15 PM.

Description

Fix artifacts when rendering complex selection outlines

It happens because of a bug in opengl-based stroking algorithm in Qt.
And it happens only when one tries to draw a path with multiple
subpaths. The easiest workaround for this bug without patching Qt is
to manually split a multi-subpath path into QPainterPath objects with
only one subpath in each.

It might happen that the resulting subpath generated by the QDashStroker
will have no lines at all. It happens when further LineToElement items
compare as equal to the starting MoveToElement when compared in 'float'
space. In such case QTriangulatingStroker::process() skips LineTo elements
and the vertexBuffer ends up with unconnected vertices, which generate
unwanted triangles.

BUG:419240,413220

Details

Committed
dkazakovMay 8 2020, 5:19 PM
Parents
R37:cc72dc512e77: Onion Skin Alignment After Image Crop Fix
Branches
Unknown
Tags
Unknown