diff --git a/src/draw/lv_img_buf.c b/src/draw/lv_img_buf.c index 82286d0c0..4c939dd83 100644 --- a/src/draw/lv_img_buf.c +++ b/src/draw/lv_img_buf.c @@ -434,9 +434,9 @@ void _lv_img_buf_get_transformed_area(lv_area_t * res, lv_coord_t w, lv_coord_t lv_point_t p[4] = { {0, 0}, - {w - 1, 0}, - {0, h - 1}, - {w - 1, h - 1}, + {w, 0}, + {0, h}, + {w, h}, }; lv_point_transform(&p[0], angle, zoom, pivot); lv_point_transform(&p[1], angle, zoom, pivot); diff --git a/src/draw/sw/lv_draw_sw_transform.c b/src/draw/sw/lv_draw_sw_transform.c index 08e4cc66a..075340369 100644 --- a/src/draw/sw/lv_draw_sw_transform.c +++ b/src/draw/sw/lv_draw_sw_transform.c @@ -122,8 +122,8 @@ void lv_draw_sw_transform(lv_draw_ctx_t * draw_ctx, const lv_area_t * dest_area, xs_step_256 = (256 * xs_diff) / (dest_w - 1); ys_step_256 = (256 * ys_diff) / (dest_w - 1); } - int32_t xs_ups = xs1_ups + 1 * xs_step_256 / 2 / 256; /*Init. + go the center of the pixel*/ - int32_t ys_ups = ys1_ups + 1 * ys_step_256 / 2 / 256; + int32_t xs_ups = xs1_ups; + int32_t ys_ups = ys1_ups; if(draw_dsc->antialias == 0) { switch(cf) { @@ -176,7 +176,7 @@ static void rgb_no_aa(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, l int32_t xs_int = xs_ups >> 8; int32_t ys_int = ys_ups >> 8; if(xs_int < 0 || xs_int >= src_w || ys_int < 0 || ys_int >= src_h) { - abuf[x] = 0; + abuf[x] = 0x00; } else {