In AreaOp.pruneEdges() we are finalizing and consuming subcurves prematurely 
based on link count and this causes artifacts. This PR updates the code to not 
finalize the subcurves based on link count. Code is updated to finalize and 
consume subcurves only when there is a not connected Y gap.

Regression tests draws a circle with individual line segments, without the fix 
we will see horizontal lines within the circle and with fix we don't see any 
artifacts. Code change is also verified with clientlibs CI run.

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

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

Commit messages:
 - Add test
 - Calculating Area using a complex polygon creates spurious horizontal line 
segments

Changes: https://git.openjdk.org/jdk/pull/31971/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=31971&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8386576
  Stats: 93 lines in 2 files changed: 79 ins; 12 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/31971.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/31971/head:pull/31971

PR: https://git.openjdk.org/jdk/pull/31971

Reply via email to