Skip to content

Commit

Permalink
img zoom fix when computing with the edge pixels
Browse files Browse the repository at this point in the history
  • Loading branch information
kisvegabor committed Dec 21, 2019
1 parent af14534 commit 65d79a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 131 deletions.
127 changes: 0 additions & 127 deletions a.txt

This file was deleted.

8 changes: 4 additions & 4 deletions src/lv_draw/lv_img_buf.c
Expand Up @@ -512,11 +512,11 @@ static inline bool transform_anti_alias(lv_img_transform_dsc_t * dsc)

if(xs_fract < 0x70) {
xn = - 1;
if(dsc->tmp.xs_int + xn < 0) return false;
if(dsc->tmp.xs_int + xn < 0) xn = 0;
xr = xs_fract + 0x80;
} else if(xs_fract > 0x90) {
xn = 1;
if(dsc->tmp.xs_int + xn >= dsc->cfg.src_w) return false;
if(dsc->tmp.xs_int + xn >= dsc->cfg.src_w) xn = 0;
xr = (0xFF - xs_fract) + 0x80;
} else {
xn = 0;
Expand All @@ -528,12 +528,12 @@ static inline bool transform_anti_alias(lv_img_transform_dsc_t * dsc)

if(ys_fract < 0x70) {
yn = - 1;
if(dsc->tmp.ys_int + yn < 0) return false;
if(dsc->tmp.ys_int + yn < 0) yn = 0;

yr = ys_fract + 0x80;
} else if(ys_fract > 0x90) {
yn = 1;
if(dsc->tmp.ys_int + yn >= dsc->cfg.src_h) return false;
if(dsc->tmp.ys_int + yn >= dsc->cfg.src_h) yn = 0;

yr = (0xFF - ys_fract) + 0x80;
} else {
Expand Down

0 comments on commit 65d79a7

Please sign in to comment.