fix(draw_sw_line): fix horizontal line incorrect dash length (#9501)

This commit is contained in:
Nils L.
2026-01-06 15:11:16 +01:00
committed by GitHub
parent 2e267c7d78
commit eb86444ec9
3 changed files with 7 additions and 5 deletions
+7 -5
View File
@@ -151,17 +151,19 @@ static void LV_ATTRIBUTE_FAST_MEM draw_line_hor(lv_draw_task_t * t, const lv_dra
int32_t dash_cnt = dash_start;
int32_t i;
for(i = 0; i < blend_area_w; i++, dash_cnt++) {
if(dash_cnt <= dsc->dash_width) {
for(i = 0; i < blend_area_w;) {
if(dash_cnt < dsc->dash_width) {
int16_t diff = dsc->dash_width - dash_cnt;
i += diff;
dash_cnt += diff;
}
else if(dash_cnt > dsc->dash_gap + dsc->dash_width) {
dash_cnt = 0;
}
else {
mask_buf[i] = 0x00;
i++;
dash_cnt++;
}
if(dash_cnt >= dsc->dash_gap + dsc->dash_width) {
dash_cnt = 0;
}
blend_dsc.mask_res = LV_DRAW_SW_MASK_RES_CHANGED;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 306 B