-
-
I've looked into this: http://alienryderflex.com/polygon_fill/
It looks promising and I got it to work in C#. But I'm not particular good in graphics algorithms nor C.
Also I'm not sure about the licensing thing.
Any thoughts on that? -
-
Hi all,
I am fiddling around with the emulator for BangleJs and found something weird.g.fillPoly does not fill a concave polygon correctly with the "opening on top", code below.
Is this a bug or did I overlook something obvious?
var poly_1_draw = [50,30,50,20,70,40,70,60,50,80,50,70,60,60,60,40]; var poly_1_fill = [150,30,150,20,170,40,170,60,150,80,150,70,160,60,160,40]; var poly_2_draw = [30,170,50,170,70,190,90,190,100,170,120,170,100,200,60,200]; var poly_2_fill = [140,170,160,170,180,190,200,190,210,170,230,170,210,200,170,200]; g.clear(); g.drawPoly(poly_1_draw,true); g.fillPoly(poly_1_fill,true); g.drawPoly(poly_2_draw,true); g.fillPoly(poly_2_fill,true);
Ahem, did that break the emulator? Seems to have some kind of y-offset now?
Edit: Nevermind, seems to work again.