Skip to content

armgit / krita

Public Imported from GitHub
0

Krita is a free and open source cross-platform application that offers an end-to-end solution for creating digital art files from scratch built on the KDE and Qt frameworks.

C++

Use isInsideShape in mergeShapesWithGutter

Agata Cacko3639302a1dd5
diff --git a/libs/global/kis_algebra_2d.cpp b/libs/global/kis_algebra_2d.cpp
index 2e043cb9f4..7a51984586 100644
--- a/libs/global/kis_algebra_2d.cpp
+++ b/libs/global/kis_algebra_2d.cpp
@@ -1952,10 +1952,9 @@ VectorPath mergeShapesWithGutter(const VectorPath& shape1, const VectorPath& sha
VectorPath result1Vec(result1);
VectorPath result2Vec(result2);
- QPolygonF result2Poly = result2Vec.asPainterPath().toFillPolygon();
// TODO: assumes winding fill
- if (result2Poly.containsPoint(shape1.segmentAt(minIndex)[1].endPoint, Qt::WindingFill)) {
+ if (isInsideShape(result2Vec, shape1.segmentAt(minIndex)[1].endPoint)) {
// could check all
return result2Vec;
}