improve nanovg_plus

This commit is contained in:
lixianjing 2021-12-01 17:07:13 +08:00
parent db214fa4bf
commit a6e4bc86fa
2 changed files with 3 additions and 3 deletions

View File

@ -1094,7 +1094,7 @@ nvgp_error_t nvgp_get_curr_clip_rect(nvgp_context_t* ctx, float* x, float* y, fl
ex = state->scissor.extent[0];
ey = state->scissor.extent[1];
nvgp_transform_inverse(&invxorm, &state->matrix);
nvgp_transform_multiply(&pxform, &invxorm);
nvgp_transform_multiply_to_t(&pxform, &invxorm);
tex = ex * nvgp_abs(pxform.mat.scale_x) + ey * nvgp_abs(pxform.mat.skew_x);
tey = ex * nvgp_abs(pxform.mat.skew_y) + ey * nvgp_abs(pxform.mat.scale_y);
@ -1129,7 +1129,7 @@ nvgp_error_t nvgp_intersect_scissor(nvgp_context_t* ctx, float* x, float* y, flo
ex = state->scissor.extent[0];
ey = state->scissor.extent[1];
nvgp_transform_inverse(&invxorm, &state->matrix);
nvgp_transform_multiply(&pxform, &invxorm);
nvgp_transform_multiply_to_t(&pxform, &invxorm);
tex = ex * nvgp_abs(pxform.mat.scale_x) + ey * nvgp_abs(pxform.mat.skew_x);
tey = ex * nvgp_abs(pxform.mat.skew_y) + ey * nvgp_abs(pxform.mat.scale_y);

View File

@ -2,7 +2,7 @@
2021/12/01
* edit增加事件EVT\_IM\_ACTION感谢兆坤提供补丁
* 修复 awtk 的 nanovg_plus 的获取当前裁剪区不正常的问题 (感谢智明提供补丁)
2021/11/29
* 完善event\_from\_name感谢兆坤提供补丁