Skia PathOp kDifference_SkPathOp incorrect result in some cases

Skip to first unread message

Jiulong Wang

Apr 20, 2021, 7:38:24 PMApr 20
to skia-discuss
Hi Skia,

Skia's SkPath library does awesome job in most of the cases.  However, occasionally we observed weird behaviors (like this post, also a previous post).  I haven't got time to take a deep look into the math behind it.  Hopefully it can be fixed...

I created a fiddle that re-pro the issue (data copied from a real customer so a bit lengthy):

In case fiddle gets lost, here's the code in gist:

In the output, the red path diffs the green path and the result is the blue path in the 2nd row.  Note the red path as two contours.  If I first do Simplify on red path, the result is then expected (3rd and 4th row in the output).  However, we observed before that Simplify would do other nasty things so we hesitated to enable it for all cases.

Screen Shot 2021-04-20 at 4.30.41 PM.png

Any help is much appreciated.

Reply all
Reply to author
0 new messages