Using canvas to draw polygon sometimes lose effectiveness

  lv_canvas_fill_bg(canvas,LV_COLOR_WHITE,0xff);
  lv_color_t color=LV_COLOR_MAKE(0xf4,0x28,0x0b);
  rect_dsc.radius = 0;
  rect_dsc.bg_opa = LV_OPA_COVER;
  rect_dsc.bg_grad_dir = LV_GRAD_DIR_NONE;
  rect_dsc.bg_color = color;
  rect_dsc.bg_grad_color = color;
  const lv_point_t point[]={{173,299},{143,330},{146,333},{177,303}};//take effect

// const lv_point_t point[]={{150,244},{107,249},{107,253},{150,250}}; //don’t take effect
lv_canvas_draw_polygon(canvas,point,4,&rect_dsc);

Hi,

I’ve tested it and it doesn’t work for me either.

After some investigation if found a problem and fixed it by modifying this line to

if(points[i_next_left].x > points[i_next_right].x) inv = true;

Could you confirm if it work well?