The following SVG path does not render and logs a warning instead:

M11.65,6.47A1.69,1.69 0 0,1 13.34,4.78


WARNING: Failed to configure svg path "M11.65,6.47A1.69,1.69 0 0,1 13.34,4.78": 
0 <= tfrom <= tto <= 1 required


This is because of a very minor floating point error in arcTo.
The resulting `dot` is `1.0000000000000002`, `Math.acos(..)` will as a result 
return `NaN`.

The fix is to clamp the value so it can never be higher than 1.0.

Using a size of 64:
| Before | After |
|-|-|
| <img width="302" height="330" alt="image" 
src="https://github.com/user-attachments/assets/5df4d711-b177-40ed-844f-5b4faddcc145";
 /> | <img width="302" height="330" alt="image" 
src="https://github.com/user-attachments/assets/278b80e8-e5e2-48ea-81d8-cf9cdbbc8277";
 /> |
| + Warning on Console | - |

---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

-------------

Commit messages:
 - 8393053: Valid SVG arc path may not render and logs a warning

Changes: https://git.openjdk.org/jfx/pull/2326/files
  Webrev: https://webrevs.openjdk.org/?repo=jfx&pr=2326&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8393053
  Stats: 12 lines in 2 files changed: 9 ins; 0 del; 3 mod
  Patch: https://git.openjdk.org/jfx/pull/2326.diff
  Fetch: git fetch https://git.openjdk.org/jfx.git pull/2326/head:pull/2326

PR: https://git.openjdk.org/jfx/pull/2326

Reply via email to