Open hx2A opened 1 year ago
I tested this on FX2D and it works there as well.
I reviewed the code I've been running over the past week and I see I did use shapes with multiple contours but I must have been using P2D each time, until today. Anyhow, I'm glad I found the shortcoming in my PR before someone else did.
Here's a real-world example with OpenStreetMap data employing the fix, adding a new drawing mode to the prettymaps library:
Thank you for all of your hard work over the years on Processing! I use it every day.
Fix for #791.
Regrettably, when I tested the fix for #643 I didn't test shapes with multiple contours. This fix will increment the
codeIndex
variable so that the vertex codes from thevertexCodes
array stay in line with the vertices in thevertices
array.I should have thought to test with multiple contours when I made the previous PR #776 .
Here's a much more complex example using real-life data from OpenStreetMap:
There's a ton of contours in this shape it is drawn correctly.