Makie.jl
Makie.jl copied to clipboard
Order of decomposes coordinates is not counter/clockwise
The Point2f
s that decompose(Point2f, Rect(0, 0, 1, 1))
returns are not sorted in a clockwise order (nor counter clockwise). This is not ideal because plotting a decomposed rectangle doesn't work:
poly(decompose(Point2f, Rect(0, 0, 1, 1)))
nor does plotting polygons with a hole:
using GeometryBasics
p = Polygon(decompose(Point2f, Rect(0, 0, 1, 1)), [decompose(Point2f, Circle(Point2f(0.5), 0.25))])
poly(p)
Only specifying the coordinates manually:
p = Polygon(Point2f[(0,0), (1,0), (1,1), (0,1)], [decompose(Point2f, Circle(Point2f(0.5), 0.25))])
worked: