lv_canvas: disable anti alaising when drawing with transparent color to chroma keyed canvas
This commit is contained in:
@@ -482,6 +482,15 @@ void lv_canvas_draw_rect(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord
|
||||
disp.driver.hor_res = dsc->header.w;
|
||||
disp.driver.ver_res = dsc->header.h;
|
||||
|
||||
/*Disable anti-aliasing if drawing with transparent color to chroma keyed canvas*/
|
||||
lv_color_t ctransp = LV_COLOR_TRANSP;
|
||||
if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED &&
|
||||
style->body.main_color.full == ctransp.full &&
|
||||
style->body.grad_color.full == ctransp.full)
|
||||
{
|
||||
disp.driver.antialiasing = 0;
|
||||
}
|
||||
|
||||
lv_disp_t * refr_ori = lv_refr_get_disp_refreshing();
|
||||
lv_refr_set_disp_refreshing(&disp);
|
||||
|
||||
@@ -633,6 +642,15 @@ void lv_canvas_draw_line(lv_obj_t * canvas, const lv_point_t * points, uint32_t
|
||||
disp.driver.hor_res = dsc->header.w;
|
||||
disp.driver.ver_res = dsc->header.h;
|
||||
|
||||
/*Disable anti-aliasing if drawing with transparent color to chroma keyed canvas*/
|
||||
lv_color_t ctransp = LV_COLOR_TRANSP;
|
||||
if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED &&
|
||||
style->body.main_color.full == ctransp.full &&
|
||||
style->body.grad_color.full == ctransp.full)
|
||||
{
|
||||
disp.driver.antialiasing = 0;
|
||||
}
|
||||
|
||||
lv_disp_t * refr_ori = lv_refr_get_disp_refreshing();
|
||||
lv_refr_set_disp_refreshing(&disp);
|
||||
|
||||
@@ -676,6 +694,15 @@ void lv_canvas_draw_polygon(lv_obj_t * canvas, const lv_point_t * points, uint32
|
||||
disp.driver.hor_res = dsc->header.w;
|
||||
disp.driver.ver_res = dsc->header.h;
|
||||
|
||||
/*Disable anti-aliasing if drawing with transparent color to chroma keyed canvas*/
|
||||
lv_color_t ctransp = LV_COLOR_TRANSP;
|
||||
if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED &&
|
||||
style->body.main_color.full == ctransp.full &&
|
||||
style->body.grad_color.full == ctransp.full)
|
||||
{
|
||||
disp.driver.antialiasing = 0;
|
||||
}
|
||||
|
||||
lv_disp_t * refr_ori = lv_refr_get_disp_refreshing();
|
||||
lv_refr_set_disp_refreshing(&disp);
|
||||
|
||||
@@ -720,6 +747,15 @@ void lv_canvas_draw_arc(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_
|
||||
disp.driver.hor_res = dsc->header.w;
|
||||
disp.driver.ver_res = dsc->header.h;
|
||||
|
||||
/*Disable anti-aliasing if drawing with transparent color to chroma keyed canvas*/
|
||||
lv_color_t ctransp = LV_COLOR_TRANSP;
|
||||
if(dsc->header.cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED &&
|
||||
style->body.main_color.full == ctransp.full &&
|
||||
style->body.grad_color.full == ctransp.full)
|
||||
{
|
||||
disp.driver.antialiasing = 0;
|
||||
}
|
||||
|
||||
lv_disp_t * refr_ori = lv_refr_get_disp_refreshing();
|
||||
lv_refr_set_disp_refreshing(&disp);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user