BigW Consortium Gitlab

Commit 1c347770 by Gabor Kiss-Vamosi

line width bugfox width anti-aliasing

parent dc3bc9f3
...@@ -574,6 +574,7 @@ void lv_draw_line(const lv_point_t * p1, const lv_point_t * p2, const lv_area_t ...@@ -574,6 +574,7 @@ void lv_draw_line(const lv_point_t * p1, const lv_point_t * p2, const lv_area_t
/*Make the correction on lie width*/ /*Make the correction on lie width*/
width = ((style->line.width - 1) * width_corr_array[wcor]) >> LINE_WIDTH_CORR_SHIFT; width = ((style->line.width - 1) * width_corr_array[wcor]) >> LINE_WIDTH_CORR_SHIFT;
width = width << LV_ANTIALIAS;
width_half = width >> 1; width_half = width >> 1;
width_1 = width & 0x1 ? 1 : 0; width_1 = width & 0x1 ? 1 : 0;
......
...@@ -371,7 +371,7 @@ static void gauge_init(void) ...@@ -371,7 +371,7 @@ static void gauge_init(void)
gauge_bg.body.padding.inner = LV_DPI / 8; /*Label - scale distance*/ gauge_bg.body.padding.inner = LV_DPI / 8; /*Label - scale distance*/
gauge_bg.body.border.color = LV_COLOR_HEX3(0x777); gauge_bg.body.border.color = LV_COLOR_HEX3(0x777);
gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75); gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75);
gauge_bg.line.width = 3; gauge_bg.line.width = 2;
gauge_bg.text.color = lv_color_hsv_to_rgb(_hue, 10, 90); gauge_bg.text.color = lv_color_hsv_to_rgb(_hue, 10, 90);
gauge_bg.text.font = _font; gauge_bg.text.font = _font;
......
...@@ -191,7 +191,7 @@ static void gauge_init(void) ...@@ -191,7 +191,7 @@ static void gauge_init(void)
static lv_style_t gauge; static lv_style_t gauge;
lv_style_copy(&gauge, &lmeter); lv_style_copy(&gauge, &lmeter);
gauge.line.color = lmeter.body.grad_color; gauge.line.color = lmeter.body.grad_color;
gauge.line.width = 3; gauge.line.width = 2;
gauge.body.main_color = LV_COLOR_HEX3(0x888); gauge.body.main_color = LV_COLOR_HEX3(0x888);
gauge.body.grad_color = lmeter.body.main_color; gauge.body.grad_color = lmeter.body.main_color;
gauge.text.color = LV_COLOR_HEX3(0x888); gauge.text.color = LV_COLOR_HEX3(0x888);
......
...@@ -256,7 +256,7 @@ static void lmeter_init(void) ...@@ -256,7 +256,7 @@ static void lmeter_init(void)
lmeter_bg.body.padding.inner = LV_DPI / 10; /*Text padding*/ lmeter_bg.body.padding.inner = LV_DPI / 10; /*Text padding*/
lmeter_bg.body.border.color = LV_COLOR_HEX3(0x333); lmeter_bg.body.border.color = LV_COLOR_HEX3(0x333);
lmeter_bg.line.color = LV_COLOR_HEX3(0x555); lmeter_bg.line.color = LV_COLOR_HEX3(0x555);
lmeter_bg.line.width = 2 << LV_ANTIALIAS; lmeter_bg.line.width = 2;
lmeter_bg.text.color = LV_COLOR_HEX3(0xddd); lmeter_bg.text.color = LV_COLOR_HEX3(0xddd);
theme.lmeter = &lmeter_bg; theme.lmeter = &lmeter_bg;
...@@ -271,7 +271,7 @@ static void gauge_init(void) ...@@ -271,7 +271,7 @@ static void gauge_init(void)
gauge_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70); gauge_bg.body.main_color = lv_color_hsv_to_rgb(_hue, 10, 70);
gauge_bg.body.grad_color = gauge_bg.body.main_color; gauge_bg.body.grad_color = gauge_bg.body.main_color;
gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75); gauge_bg.line.color = lv_color_hsv_to_rgb(_hue, 80, 75);
gauge_bg.line.width = 3; gauge_bg.line.width = 2;
gauge_bg.text.color = LV_COLOR_HEX3(0xddd); gauge_bg.text.color = LV_COLOR_HEX3(0xddd);
theme.gauge = &gauge_bg; theme.gauge = &gauge_bg;
......
...@@ -267,7 +267,7 @@ static void lmeter_init(void) ...@@ -267,7 +267,7 @@ static void lmeter_init(void)
lv_style_copy(&lmeter, &def); lv_style_copy(&lmeter, &def);
lmeter.line.color = LV_COLOR_HEX3(0xddd); lmeter.line.color = LV_COLOR_HEX3(0xddd);
lmeter.line.width = 3; lmeter.line.width = 2;
lmeter.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70); lmeter.body.main_color = lv_color_hsv_to_rgb(_hue, 80, 70);
lmeter.body.grad_color = lmeter.body.main_color; lmeter.body.grad_color = lmeter.body.main_color;
lmeter.body.padding.hor = LV_DPI / 8; lmeter.body.padding.hor = LV_DPI / 8;
...@@ -283,10 +283,10 @@ static void gauge_init(void) ...@@ -283,10 +283,10 @@ static void gauge_init(void)
lv_style_copy(&gauge, &def); lv_style_copy(&gauge, &def);
gauge.line.color = lv_color_hsv_to_rgb(_hue, 50, 70); gauge.line.color = lv_color_hsv_to_rgb(_hue, 50, 70);
gauge.line.width = 3; gauge.line.width = 2;
gauge.body.main_color = LV_COLOR_HEX3(0x999); gauge.body.main_color = LV_COLOR_HEX3(0x999);
gauge.body.grad_color = gauge.body.main_color; gauge.body.grad_color = gauge.body.main_color;
gauge.body.padding.hor = LV_DPI / 6; gauge.body.padding.hor = LV_DPI / 12;
gauge.body.border.color = LV_COLOR_HEX3(0x666); /*Needle middle color*/ gauge.body.border.color = LV_COLOR_HEX3(0x666); /*Needle middle color*/
theme.gauge = &gauge; theme.gauge = &gauge;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment