Makie.jl icon indicating copy to clipboard operation
Makie.jl copied to clipboard

Order of decomposes coordinates is not counter/clockwise

Open yakir12 opened this issue 1 year ago • 0 comments

The Point2fs 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)))

tmp 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)

tmp

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: tmp

yakir12 avatar Jul 25 '22 21:07 yakir12