fix(vg_lite): fix linear gradient matrix error (#7110)

Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
VIFEX
2024-10-23 00:15:16 +08:00
committed by GitHub
parent bdfb80ef3e
commit c70262696e
11 changed files with 7 additions and 5 deletions

View File

@@ -270,12 +270,14 @@ static void task_draw_cb(void * ctx, const lv_vector_path_t * path, const lv_vec
} }
break; break;
case LV_VECTOR_DRAW_STYLE_GRADIENT: { case LV_VECTOR_DRAW_STYLE_GRADIENT: {
vg_lite_matrix_t grad_matrix; vg_lite_matrix_t grad_matrix = matrix;
vg_lite_identity(&grad_matrix);
#if !LV_USE_VG_LITE_THORVG #if LV_USE_VG_LITE_THORVG
/* Workaround inconsistent matrix behavior between device and ThorVG */ /* Workaround inconsistent radial gradient matrix behavior between device and ThorVG */
lv_vg_lite_matrix_multiply(&grad_matrix, &matrix); if(dsc->fill_dsc.gradient.style == LV_VECTOR_GRADIENT_STYLE_RADIAL) {
/* Restore matrix to identity */
vg_lite_identity(&grad_matrix);
}
#endif #endif
vg_lite_matrix_t fill_matrix; vg_lite_matrix_t fill_matrix;
lv_vg_lite_matrix(&fill_matrix, &dsc->fill_dsc.matrix); lv_vg_lite_matrix(&fill_matrix, &dsc->fill_dsc.matrix);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.3 KiB

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB