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++

Added two TODO comments to be checked during the later refactorings

Dmitry Kazakov6950d31f3d42
diff --git a/libs/global/kis_algebra_2d.cpp b/libs/global/kis_algebra_2d.cpp
index b76fc1612e..c4c93b01cd 100644
--- a/libs/global/kis_algebra_2d.cpp
+++ b/libs/global/kis_algebra_2d.cpp
@@ -1306,6 +1306,9 @@ void cropLineToConvexPolygon(QLineF &line, const QPolygonF polygon, bool extendF
int lineSideForPoint(const QLineF &line, const QPointF &point)
{
+ // TODO: do we really neede these explicit checks? Do they help with
+ // precision?
+
if (fuzzyPointCompare(point, line.p1())) {
return 0;
}
@@ -1668,6 +1671,8 @@ QList<QPainterPath> getPathsFromRectangleCutThrough(const QRectF &rect, const QL
QPointF findNearestPointOnLine(const QPointF &point, const QLineF &line, bool unbounded)
{
+ // TODO: can we reuse (or deduplicate with) KisBezierUtils.cpp:nearestPoint()?
+
if (line.length() == 0) {
return point;
}