I noticed that polygon and also ngon didn't actually draw the last line (the one from the last point to the first point - so it drew things like this) without duplicating the first point of the polygon. The documentation of polygon states, that shouldn't be necessary though.
So I went into the code and changed the rendering of Polygons to duplicate the first point before rendering, which it didn't seem to be doing, thus causing this bug.
Afterwards I tested the same shapes and it drew them correctly again.
I noticed that
polygon
and alsongon
didn't actually draw the last line (the one from the last point to the first point - so it drew things like this) without duplicating the first point of the polygon. The documentation ofpolygon
states, that shouldn't be necessary though.So I went into the code and changed the rendering of Polygons to duplicate the first point before rendering, which it didn't seem to be doing, thus causing this bug.
Afterwards I tested the same shapes and it drew them correctly again.