You are reading a single comment by @Raik and its replies. Click here to read the full conversation.
  • 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);
    

    1 Attachment

    • fillpoly_bug.jpg
About

Avatar for Raik @Raik started