-
Bug
-
Resolution: Fixed
-
P4
-
8
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8240156 | openjdk8u252 | Laurent Bourgès | P4 | Resolved | Fixed | b05 |
JDK-8269495 | 8u311 | Dmitry Markov | P4 | Resolved | Fixed | b01 |
In both Pisces & Marlin, the Stroker may generate invalid round joins with huge coordinates that may cause rendering artefacts.
See http://mail.openjdk.java.net/pipermail/graphics-rasterizer-dev/2015-December/000421.html
The problem is in the Stroker.drawBezApproxForArc()
method (from Pisces):
cv = NaN because sqrt(0.5 - cosext2) = NaN if cosext2 > 0.5 !
It happens when floating-point rounding errors lead to cosext2 > 0.5 !
After discussion with Jim Graham, the proper fix is very simple:
// check cos(ext) <= 1 to avoid cv = NaN:
if (cosext2 > 0.5f) {
// just return to avoid generating a flat curve:
return;
}
This impacts all renderers derived from OpenJDK Pisces (since java 1.6 ?) ie Marlin but maybe also OpenPisces.
See http://mail.openjdk.java.net/pipermail/graphics-rasterizer-dev/2015-December/000421.html
The problem is in the Stroker.drawBezApproxForArc()
method (from Pisces):
cv = NaN because sqrt(0.5 - cosext2) = NaN if cosext2 > 0.5 !
It happens when floating-point rounding errors lead to cosext2 > 0.5 !
After discussion with Jim Graham, the proper fix is very simple:
// check cos(ext) <= 1 to avoid cv = NaN:
if (cosext2 > 0.5f) {
// just return to avoid generating a flat curve:
return;
}
This impacts all renderers derived from OpenJDK Pisces (since java 1.6 ?) ie Marlin but maybe also OpenPisces.
- backported by
-
JDK-8240156 Pisces / Marlin Strokers may generate invalid curves with huge coordinates and round joins
-
- Resolved
-
-
JDK-8269495 Pisces / Marlin Strokers may generate invalid curves with huge coordinates and round joins
-
- Resolved
-