Merge 78f2451b2a into dev
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
- Fix using 'LV_SCROLLBAR_UNHIDE' after 'LV_SCROLLBAR_ON'
|
||||
- Fix croping of last column/row if an image is zoomed
|
||||
- Fix zooming and rotateing mosaic images7
|
||||
- Fix deleting tabview with LEF/RIGHT tab position
|
||||
- Fix deleting tabview with LEFT/RIGHT tab position
|
||||
|
||||
## v7.3.1 (18.08.2020)
|
||||
|
||||
|
||||
@@ -455,7 +455,9 @@ void _lv_img_buf_transform_init(lv_img_transform_dsc_t * dsc)
|
||||
dsc->tmp.img_dsc.header.w = dsc->cfg.src_w;
|
||||
dsc->tmp.img_dsc.header.h = dsc->cfg.src_h;
|
||||
|
||||
dsc->tmp.zoom_inv = ((256 * 256) << _LV_ZOOM_INV_UPSCALE) / dsc->cfg.zoom;
|
||||
/* The inverse of the zoom will be sued during the transformation
|
||||
* + dsc->cfg.zoom / 2 for rounding*/
|
||||
dsc->tmp.zoom_inv = (((256 * 256) << _LV_ZOOM_INV_UPSCALE) + dsc->cfg.zoom / 2) / dsc->cfg.zoom;
|
||||
|
||||
dsc->res.opa = LV_OPA_COVER;
|
||||
dsc->res.color = dsc->cfg.color;
|
||||
|
||||
@@ -49,7 +49,7 @@ extern "C" {
|
||||
#define LV_IMG_ZOOM_NONE 256
|
||||
|
||||
#define _LV_TRANSFORM_TRIGO_SHIFT 10
|
||||
#define _LV_ZOOM_INV_UPSCALE 4
|
||||
#define _LV_ZOOM_INV_UPSCALE 5
|
||||
|
||||
/**********************
|
||||
* TYPEDEFS
|
||||
@@ -314,8 +314,8 @@ static inline bool _lv_img_buf_transform(lv_img_transform_dsc_t * dsc, lv_coord_
|
||||
ys = yt + dsc->tmp.pivot_y_256;
|
||||
}
|
||||
else {
|
||||
xt *= dsc->tmp.zoom_inv;
|
||||
yt *= dsc->tmp.zoom_inv;
|
||||
xt = (xt * dsc->tmp.zoom_inv) >> _LV_ZOOM_INV_UPSCALE;
|
||||
yt = (yt * dsc->tmp.zoom_inv) >> _LV_ZOOM_INV_UPSCALE;
|
||||
xs = ((dsc->tmp.cosma * xt - dsc->tmp.sinma * yt) >> (_LV_TRANSFORM_TRIGO_SHIFT)) + dsc->tmp.pivot_x_256;
|
||||
ys = ((dsc->tmp.sinma * xt + dsc->tmp.cosma * yt) >> (_LV_TRANSFORM_TRIGO_SHIFT)) + dsc->tmp.pivot_y_256;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user