diff options
author | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2019-06-14 10:34:15 +0200 |
---|---|---|
committer | Eirik Aavitsland <eirik.aavitsland@qt.io> | 2019-06-14 11:02:35 +0200 |
commit | 1640973a826eccbefb8743bba6c5662a7b4e9fe9 (patch) | |
tree | ef864bd468b532cc022389df42d9f19a37ef203c /tests | |
parent | dd5b829468b4818f00a3c3a7df7f104dfa869bd1 (diff) |
Fix raster paint error in path joins of tightly bending bezier curves
The code for generating round line joins is optimized with a shortcut
for the inner, normally invisible joins. For certain joins of a
tightly turning bezier, this optimization would lead to visible
painting error. Fix by avoiding the optimization if the next control
point is so close as to allow such tight turns.
As a driveby, make the angle > 90 test cheaper, since absolute
precision is not required in the optimization choice.
Fixes: QTBUG-75008
Change-Id: I293e0776003310dc36fa7f43fbcd9c25f1f8fa5d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/other/lancelot/scripts/degeneratebeziers.qps | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/auto/other/lancelot/scripts/degeneratebeziers.qps b/tests/auto/other/lancelot/scripts/degeneratebeziers.qps index 6c069fd82f..948968b0cd 100644 --- a/tests/auto/other/lancelot/scripts/degeneratebeziers.qps +++ b/tests/auto/other/lancelot/scripts/degeneratebeziers.qps @@ -34,3 +34,14 @@ setPen blue 40 solidline roundcap drawPath revbez setPen red 0 drawPath revbez + +resetMatrix +path_lineTo tightJoin 60 10 +path_cubicTo tightJoin 50 0 100 0 100 50 + +translate 50 500 + +setPen green 40 solidline roundcap roundjoin +drawPath tightJoin +setPen red 0 +drawPath tightJoin |