Commit 50acfd7d by Raph Levien

### A better fix to the winding rule handling of negative winding paths.

parent f6cae9e3
 Sun Jun 13 21:07:20 1999 Raph Levien * art_svp_wind.c (art_svp_rewind_uncrossed): Made the winding rule logic even more correct :). I somehow missed the fact that a clockwise path should be given a winding number of zero; last night's commit tried to make it -1 (which worked for the test cases I was using). Sun Jun 13 01:23:14 1999 Raph Levien * art_svp_wind.c (art_svp_rewind_uncrossed): Change to winding ... ...
 ... ... @@ -1365,32 +1365,24 @@ art_svp_rewind_uncrossed (ArtSVP *vp, ArtWindRule rule) /* Determine winding number for this segment */ if (i == 0) { if (vp->segs[seg_idx].dir) wind = 1; else wind = -1; } left_wind = 0; else if (vp->segs[active_segs[i - 1]].dir) left_wind = winding[active_segs[i - 1]]; else { if (vp->segs[active_segs[i - 1]].dir) left_wind = winding[active_segs[i - 1]]; else left_wind = winding[active_segs[i - 1]] - 1; left_wind = winding[active_segs[i - 1]] - 1; if (vp->segs[seg_idx].dir) wind = left_wind + 1; else wind = left_wind; } if (vp->segs[seg_idx].dir) wind = left_wind + 1; else wind = left_wind; winding[seg_idx] = wind; switch (rule) { case ART_WIND_RULE_NONZERO: keep = (wind == 1 || wind == -1); invert = (wind < 0); keep = (wind == 1 || wind == 0); invert = (wind == 0); break; case ART_WIND_RULE_INTERSECT: keep = (wind == 2); ... ... @@ -1398,7 +1390,7 @@ art_svp_rewind_uncrossed (ArtSVP *vp, ArtWindRule rule) break; case ART_WIND_RULE_ODDEVEN: keep = 1; invert = (wind & 1) ^ (wind > 0); invert = !(wind & 1); break; case ART_WIND_RULE_POSITIVE: keep = (wind == 1); ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!