On 24 Oct 2020, at 16:29, Paul Hahn wrote:
>
> Yep, you are right -- the doco mentions fl_begin/end_polygon works for CONVEX polygons, and fl_begin/end_complex_polygon works for CONCAVE polygons (also). I apologize for not paying attention to this initially.
Well, so long as it is working now, that’s all good.
> BTW winding order is addressed in a note for fl_begin/end_complex_polygon, but for fl_begin/end_polygon (convex case), I see no mention of a constraint for CCW vs. CW traversal.
I don’t know the specific implementation in fltk, but for a figure that is “known" to be convex you can reliably infer “inside” and “outside” of the polygon without that, so that may be the way it works. And why you need to use “complex_polygon” for the concave figures, of course.
As to why the “+” polygon works in the orthogonal cases, I imagine that’s just an edge case... probably...!