diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-09-04 14:33:40 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-09-04 14:33:40 +0200 |
commit | f255b1e8e297e7e1363921580007145cff574e0d (patch) | |
tree | 9a799be282e6c0d6544d9f8c872073f83e6c0475 /src/gui/painting/qpainterpath.cpp | |
parent | 7e8705f6632428a8d9a937ab5fe087999347b3dd (diff) | |
parent | bf8fcab8bb92ff534c5cec048d6dbebb3b73a348 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: I54741635460bb2d8f3fd0be535ee1968d6c442bb
Diffstat (limited to 'src/gui/painting/qpainterpath.cpp')
-rw-r--r-- | src/gui/painting/qpainterpath.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp index b1d1f30800..1fb37ece56 100644 --- a/src/gui/painting/qpainterpath.cpp +++ b/src/gui/painting/qpainterpath.cpp @@ -1855,10 +1855,9 @@ static void qt_painterpath_isect_curve(const QBezier &bezier, const QPointF &pt, } // split curve and try again... - QBezier first_half, second_half; - bezier.split(&first_half, &second_half); - qt_painterpath_isect_curve(first_half, pt, winding, depth + 1); - qt_painterpath_isect_curve(second_half, pt, winding, depth + 1); + const auto halves = bezier.split(); + qt_painterpath_isect_curve(halves.first, pt, winding, depth + 1); + qt_painterpath_isect_curve(halves.second, pt, winding, depth + 1); } } @@ -2013,10 +2012,9 @@ static bool qt_isect_curve_horizontal(const QBezier &bezier, qreal y, qreal x1, if (depth == 32 || (bounds.width() < lower_bound && bounds.height() < lower_bound)) return true; - QBezier first_half, second_half; - bezier.split(&first_half, &second_half); - if (qt_isect_curve_horizontal(first_half, y, x1, x2, depth + 1) - || qt_isect_curve_horizontal(second_half, y, x1, x2, depth + 1)) + const auto halves = bezier.split(); + if (qt_isect_curve_horizontal(halves.first, y, x1, x2, depth + 1) + || qt_isect_curve_horizontal(halves.second, y, x1, x2, depth + 1)) return true; } return false; @@ -2032,10 +2030,9 @@ static bool qt_isect_curve_vertical(const QBezier &bezier, qreal x, qreal y1, qr if (depth == 32 || (bounds.width() < lower_bound && bounds.height() < lower_bound)) return true; - QBezier first_half, second_half; - bezier.split(&first_half, &second_half); - if (qt_isect_curve_vertical(first_half, x, y1, y2, depth + 1) - || qt_isect_curve_vertical(second_half, x, y1, y2, depth + 1)) + const auto halves = bezier.split(); + if (qt_isect_curve_vertical(halves.first, x, y1, y2, depth + 1) + || qt_isect_curve_vertical(halves.second, x, y1, y2, depth + 1)) return true; } return false; |