Fixed line splitting algorithm

This commit is contained in:
Martin Tůma 2023-10-10 08:16:20 +02:00
parent aaff1c0bdb
commit 038f4e7d64

View File

@ -145,6 +145,8 @@ static QList<QPolygonF> polyLines(const QPainterPath &path, const QRectF &rect)
if (lastIn) { if (lastIn) {
QPointF p; QPointF p;
if (line.isEmpty())
line.append(path.elementAt(i-1));
if (intersection(l, rect, &p)) if (intersection(l, rect, &p))
line.append(p); line.append(p);
lines.append(line); lines.append(line);