diff --git a/demos/music/lv_demo_music_main.c b/demos/music/lv_demo_music_main.c
index 12f16b8e9..9b0f23223 100644
--- a/demos/music/lv_demo_music_main.c
+++ b/demos/music/lv_demo_music_main.c
@@ -278,7 +278,7 @@ lv_obj_t * _lv_demo_music_main_create(lv_obj_t * parent)
lv_anim_set_var(&a, album_img_obj);
lv_anim_set_time(&a, 1000);
lv_anim_set_delay(&a, INTRO_TIME + 1000);
- lv_anim_set_values(&a, 1, LV_IMG_ZOOM_NONE);
+ lv_anim_set_values(&a, 1, LV_ZOOM_NONE);
lv_anim_set_exec_cb(&a, _img_set_zoom_anim_cb);
lv_anim_set_ready_cb(&a, NULL);
lv_anim_start(&a);
@@ -302,7 +302,7 @@ lv_obj_t * _lv_demo_music_main_create(lv_obj_t * parent)
lv_anim_set_var(&a, logo);
lv_anim_set_time(&a, 400);
lv_anim_set_delay(&a, INTRO_TIME + 800);
- lv_anim_set_values(&a, LV_IMG_ZOOM_NONE, 10);
+ lv_anim_set_values(&a, LV_ZOOM_NONE, 10);
lv_anim_set_ready_cb(&a, lv_obj_del_anim_ready_cb);
lv_anim_start(&a);
@@ -370,7 +370,7 @@ void _lv_demo_music_pause(void)
spectrum_i = 0;
lv_anim_del(spectrum_obj, spectrum_anim_cb);
lv_obj_invalidate(spectrum_obj);
- lv_img_set_zoom(album_img_obj, LV_IMG_ZOOM_NONE);
+ lv_img_set_zoom(album_img_obj, LV_ZOOM_NONE);
lv_timer_pause(sec_counter_timer);
lv_obj_clear_state(play_obj, LV_STATE_CHECKED);
}
@@ -721,7 +721,7 @@ static void track_load(uint32_t id)
lv_anim_set_path_cb(&a, lv_anim_path_linear);
lv_anim_set_var(&a, album_img_obj);
lv_anim_set_time(&a, 500);
- lv_anim_set_values(&a, LV_IMG_ZOOM_NONE, LV_IMG_ZOOM_NONE / 2);
+ lv_anim_set_values(&a, LV_ZOOM_NONE, LV_ZOOM_NONE / 2);
lv_anim_set_exec_cb(&a, _img_set_zoom_anim_cb);
lv_anim_set_ready_cb(&a, NULL);
lv_anim_start(&a);
@@ -732,7 +732,7 @@ static void track_load(uint32_t id)
lv_anim_set_var(&a, album_img_obj);
lv_anim_set_time(&a, 500);
lv_anim_set_delay(&a, 100);
- lv_anim_set_values(&a, LV_IMG_ZOOM_NONE / 4, LV_IMG_ZOOM_NONE);
+ lv_anim_set_values(&a, LV_ZOOM_NONE / 4, LV_ZOOM_NONE);
lv_anim_set_exec_cb(&a, _img_set_zoom_anim_cb);
lv_anim_set_ready_cb(&a, NULL);
lv_anim_start(&a);
@@ -915,7 +915,7 @@ static void spectrum_anim_cb(void * a, int32_t v)
}
if(spectrum[spectrum_i][0] < 4) bar_rot += dir;
- lv_img_set_zoom(album_img_obj, LV_IMG_ZOOM_NONE + spectrum[spectrum_i][0]);
+ lv_img_set_zoom(album_img_obj, LV_ZOOM_NONE + spectrum[spectrum_i][0]);
}
static void start_anim_cb(void * a, int32_t v)
diff --git a/docs/overview/style-props.md b/docs/overview/style-props.md
index b12a72474..2161bd60c 100644
--- a/docs/overview/style-props.md
+++ b/docs/overview/style-props.md
@@ -121,7 +121,7 @@ Move the object with this value in Y direction. Applied after layouts, aligns an
### transform_zoom
-Zoom an objects. The value 256 (or `LV_IMG_ZOOM_NONE`) means normal size, 128 half size, 512 double size, and so on
+Zoom an objects. The value 256 (or `LV_ZOOM_NONE`) means normal size, 128 half size, 512 double size, and so on
- Default 0
- Inherited No
@@ -217,7 +217,7 @@ Sets the padding between the columns. Used by the layouts.
Properties to describe spacing around an object. Very similar to the margin properties in HTML.
### margin_top
-Sets the margin on the top. It makes the object area bigger in this direction.
+Sets the margin on the top. The object will keep this space from its siblings in layouts.
- Default 0
- Inherited No
@@ -226,7 +226,7 @@ Sets the margin on the top. It makes the object area bigger in this direction.
### margin_bottom
-Sets the margin on the bottom. It makes the object area bigger in this direction.
+Sets the margin on the bottom. The object will keep this space from its siblings in layouts.
- Default 0
- Inherited No
@@ -235,7 +235,7 @@ Sets the margin on the bottom. It makes the object area bigger in this direction
### margin_left
-Sets the margin on the left. It makes the object area bigger in this direction.
+Sets the margin on the left. The object will keep this space from its siblings in layouts.
- Default 0
- Inherited No
@@ -244,7 +244,7 @@ Sets the margin on the left. It makes the object area bigger in this direction.
### margin_right
-Sets the margin on the right. It makes the object area bigger in this direction.
+Sets the margin on the right. The object will keep this space from its siblings in layouts.
- Default 0
- Inherited No
@@ -424,7 +424,7 @@ Sets whether the border should be drawn before or after the children are drawn.
Properties to describe the outline. It's like a border but drawn outside of the rectangles.
### outline_width
-Set the width of the outline in pixels.
+Set the width of the outline in pixels.
- Default 0
- Inherited No
@@ -472,7 +472,7 @@ Set the width of the shadow in pixels. The value should be >= 0.
### shadow_ofs_x
-Set an offset on the shadow in pixels in X direction.
+Set an offset on the shadow in pixels in X direction.
- Default 0
- Inherited No
@@ -481,7 +481,7 @@ Set an offset on the shadow in pixels in X direction.
### shadow_ofs_y
-Set an offset on the shadow in pixels in Y direction.
+Set an offset on the shadow in pixels in Y direction.
- Default 0
- Inherited No
@@ -577,7 +577,7 @@ Set the gap between dashes in pixel. Note that dash works only on horizontal and
### line_rounded
-Make the end points of the lines rounded. `true`: rounded, `false`: perpendicular line ending
+Make the end points of the lines rounded. `true`: rounded, `false`: perpendicular line ending
- Default 0
- Inherited No
@@ -616,7 +616,7 @@ Set the width (thickness) of the arcs in pixel.
### arc_rounded
-Make the end points of the arcs rounded. `true`: rounded, `false`: perpendicular line ending
+Make the end points of the arcs rounded. `true`: rounded, `false`: perpendicular line ending
- Default 0
- Inherited No
@@ -673,7 +673,7 @@ Set the opacity of the text. Value 0, `LV_OPA_0` or `LV_OPA_TRANSP` means fully
### text_font
-Set the font of the text (a pointer `lv_font_t *`).
+Set the font of the text (a pointer `lv_font_t *`).
- Default `LV_FONT_DEFAULT`
- Inherited Yes
diff --git a/docs/widgets/img.md b/docs/widgets/img.md
index aae6ce2fd..03a506b90 100644
--- a/docs/widgets/img.md
+++ b/docs/widgets/img.md
@@ -71,7 +71,7 @@ Using the offset parameter a [Texture atlas](https://en.wikipedia.org/wiki/Textu
## Transformations
-Using the `lv_img_set_zoom(img, factor)` the images will be zoomed. Set `factor` to `256` or `LV_IMG_ZOOM_NONE` to disable zooming.
+Using the `lv_img_set_zoom(img, factor)` the images will be zoomed. Set `factor` to `256` or `LV_ZOOM_NONE` to disable zooming.
A larger value enlarges the images (e.g. `512` double size), a smaller value shrinks it (e.g. `128` half size).
Fractional scale works as well. E.g. `281` for 10% enlargement.
diff --git a/examples/widgets/canvas/lv_example_canvas_1.c b/examples/widgets/canvas/lv_example_canvas_1.c
index 96c35bb97..3745d146a 100644
--- a/examples/widgets/canvas/lv_example_canvas_1.c
+++ b/examples/widgets/canvas/lv_example_canvas_1.c
@@ -47,7 +47,7 @@ void lv_example_canvas_1(void)
img.header.h = CANVAS_HEIGHT;
lv_canvas_fill_bg(canvas, lv_palette_lighten(LV_PALETTE_GREY, 3), LV_OPA_COVER);
- lv_canvas_transform(canvas, &img, 120, LV_IMG_ZOOM_NONE, 0, 0, CANVAS_WIDTH / 2, CANVAS_HEIGHT / 2, true);
+ lv_canvas_transform(canvas, &img, 120, LV_ZOOM_NONE, 0, 0, CANVAS_WIDTH / 2, CANVAS_HEIGHT / 2, true);
}
#endif
diff --git a/examples/widgets/canvas/lv_example_canvas_1.py b/examples/widgets/canvas/lv_example_canvas_1.py
index d07cee4bb..ff8b11669 100644
--- a/examples/widgets/canvas/lv_example_canvas_1.py
+++ b/examples/widgets/canvas/lv_example_canvas_1.py
@@ -1,6 +1,6 @@
_CANVAS_WIDTH = 200
_CANVAS_HEIGHT = 150
-LV_IMG_ZOOM_NONE = 256
+LV_ZOOM_NONE = 256
rect_dsc = lv.draw_rect_dsc_t()
rect_dsc.init()
@@ -40,4 +40,4 @@ img.header.w = _CANVAS_WIDTH
img.header.h = _CANVAS_HEIGHT
canvas.fill_bg(lv.palette_lighten(lv.PALETTE.GREY, 3), lv.OPA.COVER)
-canvas.transform(img, 30, LV_IMG_ZOOM_NONE, 0, 0, _CANVAS_WIDTH // 2, _CANVAS_HEIGHT // 2, True)
+canvas.transform(img, 30, LV_ZOOM_NONE, 0, 0, _CANVAS_WIDTH // 2, _CANVAS_HEIGHT // 2, True)
diff --git a/examples/widgets/chart/lv_example_chart_5.c b/examples/widgets/chart/lv_example_chart_5.c
index aee4204a0..b7beed318 100644
--- a/examples/widgets/chart/lv_example_chart_5.c
+++ b/examples/widgets/chart/lv_example_chart_5.c
@@ -84,13 +84,13 @@ void lv_example_chart_5(void)
lv_obj_t * slider;
slider = lv_slider_create(lv_scr_act());
- lv_slider_set_range(slider, LV_IMG_ZOOM_NONE, LV_IMG_ZOOM_NONE * 10);
+ lv_slider_set_range(slider, LV_ZOOM_NONE, LV_ZOOM_NONE * 10);
lv_obj_add_event_cb(slider, slider_x_event_cb, LV_EVENT_VALUE_CHANGED, NULL);
lv_obj_set_size(slider, 200, 10);
lv_obj_align_to(slider, chart, LV_ALIGN_OUT_BOTTOM_MID, 0, 20);
slider = lv_slider_create(lv_scr_act());
- lv_slider_set_range(slider, LV_IMG_ZOOM_NONE, LV_IMG_ZOOM_NONE * 10);
+ lv_slider_set_range(slider, LV_ZOOM_NONE, LV_ZOOM_NONE * 10);
lv_obj_add_event_cb(slider, slider_y_event_cb, LV_EVENT_VALUE_CHANGED, NULL);
lv_obj_set_size(slider, 10, 150);
lv_obj_align_to(slider, chart, LV_ALIGN_OUT_RIGHT_MID, 20, 0);
diff --git a/examples/widgets/chart/lv_example_chart_5.py b/examples/widgets/chart/lv_example_chart_5.py
index a175818c9..6f8fe00a5 100644
--- a/examples/widgets/chart/lv_example_chart_5.py
+++ b/examples/widgets/chart/lv_example_chart_5.py
@@ -76,13 +76,13 @@ chart.set_point_count(pcnt)
chart.set_ext_y_array(ser, ecg_sample)
slider = lv.slider(lv.scr_act())
-slider.set_range(lv.IMG_ZOOM_NONE, lv.IMG_ZOOM_NONE * 10)
+slider.set_range(lv.ZOOM_NONE, lv.ZOOM_NONE * 10)
slider.add_event_cb(slider_x_event_cb, lv.EVENT.VALUE_CHANGED, None)
slider.set_size(200,10)
slider.align_to(chart, lv.ALIGN.OUT_BOTTOM_MID, 0, 20)
slider = lv.slider(lv.scr_act())
-slider.set_range(lv.IMG_ZOOM_NONE, lv.IMG_ZOOM_NONE * 10)
+slider.set_range(lv.ZOOM_NONE, lv.ZOOM_NONE * 10)
slider.add_event_cb(slider_y_event_cb, lv.EVENT.VALUE_CHANGED, None)
slider.set_size(10, 150)
slider.align_to(chart, lv.ALIGN.OUT_RIGHT_MID, 20, 0)
diff --git a/scripts/style_api_gen.py b/scripts/style_api_gen.py
index 47744ac47..2fbf8dcb8 100755
--- a/scripts/style_api_gen.py
+++ b/scripts/style_api_gen.py
@@ -60,7 +60,7 @@ props = [
{'name': 'TRANSFORM_ZOOM',
'style_type': 'num', 'var_type': 'lv_coord_t', 'default':0, 'inherited': 0, 'layout': 1, 'ext_draw': 1,
- 'dsc': "Zoom an objects. The value 256 (or `LV_IMG_ZOOM_NONE`) means normal size, 128 half size, 512 double size, and so on" },
+ 'dsc': "Zoom an objects. The value 256 (or `LV_ZOOM_NONE`) means normal size, 128 half size, 512 double size, and so on" },
{'name': 'TRANSFORM_ANGLE',
'style_type': 'num', 'var_type': 'lv_coord_t', 'default':0, 'inherited': 0, 'layout': 1, 'ext_draw': 1,
diff --git a/src/core/lv_indev.c b/src/core/lv_indev.c
index 9bd681e3e..3ec17f89f 100644
--- a/src/core/lv_indev.c
+++ b/src/core/lv_indev.c
@@ -1003,7 +1003,7 @@ static void indev_proc_release(_lv_indev_proc_t * proc)
parent = lv_obj_get_parent(parent);
}
- if(angle != 0 || zoom != LV_IMG_ZOOM_NONE) {
+ if(angle != 0 || zoom != LV_ZOOM_NONE) {
angle = -angle;
zoom = (256 * 256) / zoom;
lv_point_transform(&proc->types.pointer.scroll_throw_vect, angle, zoom, &pivot);
diff --git a/src/core/lv_indev_scroll.c b/src/core/lv_indev_scroll.c
index 13407f77a..57c300a70 100644
--- a/src/core/lv_indev_scroll.c
+++ b/src/core/lv_indev_scroll.c
@@ -71,7 +71,7 @@ void _lv_indev_scroll_handler(_lv_indev_proc_t * proc)
parent = lv_obj_get_parent(parent);
}
- if(angle != 0 || zoom != LV_IMG_ZOOM_NONE) {
+ if(angle != 0 || zoom != LV_ZOOM_NONE) {
angle = -angle;
zoom = (256 * 256) / zoom;
lv_point_t pivot = { 0, 0 };
@@ -299,7 +299,7 @@ static lv_obj_t * find_scroll_obj(_lv_indev_proc_t * proc)
}
lv_point_t obj_scroll_sum = proc->types.pointer.scroll_sum;
- if(angle != 0 || zoom != LV_IMG_ZOOM_NONE) {
+ if(angle != 0 || zoom != LV_ZOOM_NONE) {
angle = -angle;
zoom = (256 * 256) / zoom;
lv_point_transform(&obj_scroll_sum, angle, zoom, &pivot);
diff --git a/src/core/lv_obj_draw.c b/src/core/lv_obj_draw.c
index 298c3df60..8985dd34a 100644
--- a/src/core/lv_obj_draw.c
+++ b/src/core/lv_obj_draw.c
@@ -240,7 +240,7 @@ void lv_obj_init_draw_img_dsc(lv_obj_t * obj, uint32_t part, lv_draw_img_dsc_t *
}
draw_dsc->angle = 0;
- draw_dsc->zoom = LV_IMG_ZOOM_NONE;
+ draw_dsc->zoom = LV_ZOOM_NONE;
draw_dsc->pivot.x = lv_area_get_width(&obj->coords) / 2;
draw_dsc->pivot.y = lv_area_get_height(&obj->coords) / 2;
diff --git a/src/core/lv_obj_pos.c b/src/core/lv_obj_pos.c
index f0ba804c4..0b48f6194 100644
--- a/src/core/lv_obj_pos.c
+++ b/src/core/lv_obj_pos.c
@@ -1143,7 +1143,7 @@ static void transform_point(const lv_obj_t * obj, lv_point_t * p, bool inv)
int16_t angle = lv_obj_get_style_transform_angle(obj, 0);
int16_t zoom = lv_obj_get_style_transform_zoom(obj, 0);
- if(angle == 0 && zoom == LV_IMG_ZOOM_NONE) return;
+ if(angle == 0 && zoom == LV_ZOOM_NONE) return;
lv_point_t pivot = {
.x = lv_obj_get_style_transform_pivot_x(obj, 0),
diff --git a/src/draw/arm2d/lv_gpu_arm2d.c b/src/draw/arm2d/lv_gpu_arm2d.c
index 5830893db..8be0253f7 100644
--- a/src/draw/arm2d/lv_gpu_arm2d.c
+++ b/src/draw/arm2d/lv_gpu_arm2d.c
@@ -898,7 +898,7 @@ static void lv_draw_arm2d_img_decoded(struct _lv_draw_ctx_t * draw_ctx,
const uint8_t * src_buf_org = src_buf;
bool mask_any = lv_draw_mask_is_any(&draw_area);
- bool transform = draw_dsc->angle != 0 || draw_dsc->zoom != LV_IMG_ZOOM_NONE ? true : false;
+ bool transform = draw_dsc->angle != 0 || draw_dsc->zoom != LV_ZOOM_NONE ? true : false;
lv_area_t blend_area;
lv_draw_sw_blend_dsc_t blend_dsc;
@@ -986,7 +986,7 @@ static void lv_draw_arm2d_img_decoded(struct _lv_draw_ctx_t * draw_ctx,
blend_area.y2 = blend_area.y1 + buf_h - 1;
lv_draw_mask_res_t mask_res_def = (cf != LV_IMG_CF_TRUE_COLOR || draw_dsc->angle ||
- draw_dsc->zoom != LV_IMG_ZOOM_NONE) ?
+ draw_dsc->zoom != LV_ZOOM_NONE) ?
LV_DRAW_MASK_RES_CHANGED : LV_DRAW_MASK_RES_FULL_COVER;
blend_dsc.mask_res = mask_res_def;
diff --git a/src/draw/lv_draw_img.c b/src/draw/lv_draw_img.c
index b6e3bdb08..e3d2795d5 100644
--- a/src/draw/lv_draw_img.c
+++ b/src/draw/lv_draw_img.c
@@ -48,7 +48,7 @@ void lv_draw_img_dsc_init(lv_draw_img_dsc_t * dsc)
lv_memzero(dsc, sizeof(lv_draw_img_dsc_t));
dsc->recolor = lv_color_black();
dsc->opa = LV_OPA_COVER;
- dsc->zoom = LV_IMG_ZOOM_NONE;
+ dsc->zoom = LV_ZOOM_NONE;
dsc->antialias = LV_COLOR_DEPTH > 8 ? 1 : 0;
}
@@ -246,7 +246,7 @@ LV_ATTRIBUTE_FAST_MEM static lv_res_t decode_and_draw(lv_draw_ctx_t * draw_ctx,
else if(cdsc->dec_dsc.img_data) {
lv_area_t map_area_rot;
lv_area_copy(&map_area_rot, coords);
- if(draw_dsc->angle || draw_dsc->zoom != LV_IMG_ZOOM_NONE) {
+ if(draw_dsc->angle || draw_dsc->zoom != LV_ZOOM_NONE) {
int32_t w = lv_area_get_width(coords);
int32_t h = lv_area_get_height(coords);
diff --git a/src/draw/lv_img_buf.c b/src/draw/lv_img_buf.c
index b597de414..bd6d27ffd 100644
--- a/src/draw/lv_img_buf.c
+++ b/src/draw/lv_img_buf.c
@@ -424,7 +424,7 @@ void _lv_img_buf_get_transformed_area(lv_area_t * res, lv_coord_t w, lv_coord_t
const lv_point_t * pivot)
{
#if LV_USE_DRAW_MASKS
- if(angle == 0 && zoom == LV_IMG_ZOOM_NONE) {
+ if(angle == 0 && zoom == LV_ZOOM_NONE) {
res->x1 = 0;
res->y1 = 0;
res->x2 = w - 1;
diff --git a/src/draw/nxp/pxp/lv_draw_pxp.c b/src/draw/nxp/pxp/lv_draw_pxp.c
index 239651dce..ded7d8ec7 100644
--- a/src/draw/nxp/pxp/lv_draw_pxp.c
+++ b/src/draw/nxp/pxp/lv_draw_pxp.c
@@ -190,7 +190,7 @@ static void lv_draw_pxp_img_decoded(lv_draw_ctx_t * draw_ctx, const lv_draw_img_
lv_coord_t src_height = lv_area_get_height(coords);
bool has_mask = lv_draw_mask_is_any(&blend_area);
- bool has_scale = (dsc->zoom != LV_IMG_ZOOM_NONE);
+ bool has_scale = (dsc->zoom != LV_ZOOM_NONE);
bool has_rotation = (dsc->angle != 0);
bool unsup_rotation = false;
diff --git a/src/draw/nxp/vglite/lv_draw_vglite_blend.c b/src/draw/nxp/vglite/lv_draw_vglite_blend.c
index e1408b760..66c95377a 100644
--- a/src/draw/nxp/vglite/lv_draw_vglite_blend.c
+++ b/src/draw/nxp/vglite/lv_draw_vglite_blend.c
@@ -543,7 +543,7 @@ static inline void lv_vglite_set_transformation_matrix(const lv_area_t * dest_ar
{
lv_vglite_set_translation_matrix(dest_area);
- bool has_scale = (dsc->zoom != LV_IMG_ZOOM_NONE);
+ bool has_scale = (dsc->zoom != LV_ZOOM_NONE);
bool has_rotation = (dsc->angle != 0);
if(has_scale || has_rotation) {
@@ -551,7 +551,7 @@ static inline void lv_vglite_set_transformation_matrix(const lv_area_t * dest_ar
if(has_rotation)
vg_lite_rotate(dsc->angle / 10.0f, &vgmatrix); /* angle is 1/10 degree */
if(has_scale) {
- vg_lite_float_t scale = 1.0f * dsc->zoom / LV_IMG_ZOOM_NONE;
+ vg_lite_float_t scale = 1.0f * dsc->zoom / LV_ZOOM_NONE;
vg_lite_scale(scale, scale, &vgmatrix);
}
vg_lite_translate(0.0f - dsc->pivot.x, 0.0f - dsc->pivot.y, &vgmatrix);
diff --git a/src/draw/sdl/lv_draw_sdl_utils.c b/src/draw/sdl/lv_draw_sdl_utils.c
index 4bed35caa..39d4dbed7 100644
--- a/src/draw/sdl/lv_draw_sdl_utils.c
+++ b/src/draw/sdl/lv_draw_sdl_utils.c
@@ -94,7 +94,7 @@ void lv_color_to_sdl_color(const lv_color_t * in, SDL_Color * out)
void lv_area_zoom_to_sdl_rect(const lv_area_t * in, SDL_Rect * out, uint16_t zoom, const lv_point_t * pivot)
{
- if(zoom == LV_IMG_ZOOM_NONE) {
+ if(zoom == LV_ZOOM_NONE) {
lv_area_to_sdl_rect(in, out);
return;
}
diff --git a/src/draw/sw/lv_draw_sw_img.c b/src/draw/sw/lv_draw_sw_img.c
index 4b21b3dfc..2344df132 100644
--- a/src/draw/sw/lv_draw_sw_img.c
+++ b/src/draw/sw/lv_draw_sw_img.c
@@ -52,7 +52,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_img_decoded(struct _lv_draw_ctx_t * draw_c
lv_area_copy(&draw_area, draw_ctx->clip_area);
bool mask_any = lv_draw_mask_is_any(&draw_area);
- bool transform = draw_dsc->angle != 0 || draw_dsc->zoom != LV_IMG_ZOOM_NONE ? true : false;
+ bool transform = draw_dsc->angle != 0 || draw_dsc->zoom != LV_ZOOM_NONE ? true : false;
lv_area_t blend_area;
lv_draw_sw_blend_dsc_t blend_dsc;
@@ -138,7 +138,7 @@ LV_ATTRIBUTE_FAST_MEM void lv_draw_sw_img_decoded(struct _lv_draw_ctx_t * draw_c
blend_area.y2 = blend_area.y1 + buf_h - 1;
lv_draw_mask_res_t mask_res_def = (cf != LV_IMG_CF_TRUE_COLOR || draw_dsc->angle ||
- draw_dsc->zoom != LV_IMG_ZOOM_NONE) ?
+ draw_dsc->zoom != LV_ZOOM_NONE) ?
LV_DRAW_MASK_RES_CHANGED : LV_DRAW_MASK_RES_FULL_COVER;
blend_dsc.mask_res = mask_res_def;
diff --git a/src/draw/sw/lv_draw_sw_letter.c b/src/draw/sw/lv_draw_sw_letter.c
index 130f3f328..802a80a86 100644
--- a/src/draw/sw/lv_draw_sw_letter.c
+++ b/src/draw/sw/lv_draw_sw_letter.c
@@ -198,7 +198,7 @@ LV_ATTRIBUTE_FAST_MEM static void draw_letter_normal(lv_draw_ctx_t * draw_ctx, c
lv_draw_img_dsc_t img_dsc;
lv_draw_img_dsc_init(&img_dsc);
img_dsc.angle = 0;
- img_dsc.zoom = LV_IMG_ZOOM_NONE;
+ img_dsc.zoom = LV_ZOOM_NONE;
img_dsc.opa = dsc->opa;
img_dsc.blend_mode = dsc->blend_mode;
lv_draw_img(draw_ctx, &img_dsc, &fill_area, map_p);
diff --git a/src/draw/sw/lv_draw_sw_transform.c b/src/draw/sw/lv_draw_sw_transform.c
index 85419cd8d..08c74fbea 100644
--- a/src/draw/sw/lv_draw_sw_transform.c
+++ b/src/draw/sw/lv_draw_sw_transform.c
@@ -558,7 +558,7 @@ static void a8_aa(const uint8_t * src, lv_coord_t src_w, lv_coord_t src_h, lv_co
static void transform_point_upscaled(point_transform_dsc_t * t, int32_t xin, int32_t yin, int32_t * xout,
int32_t * yout)
{
- if(t->angle == 0 && t->zoom == LV_IMG_ZOOM_NONE) {
+ if(t->angle == 0 && t->zoom == LV_ZOOM_NONE) {
*xout = xin * 256;
*yout = yin * 256;
return;
@@ -571,7 +571,7 @@ static void transform_point_upscaled(point_transform_dsc_t * t, int32_t xin, int
*xout = ((int32_t)(xin * t->zoom)) + (t->pivot_x_256);
*yout = ((int32_t)(yin * t->zoom)) + (t->pivot_y_256);
}
- else if(t->zoom == LV_IMG_ZOOM_NONE) {
+ else if(t->zoom == LV_ZOOM_NONE) {
*xout = ((t->cosma * xin - t->sinma * yin) >> 2) + (t->pivot_x_256);
*yout = ((t->sinma * xin + t->cosma * yin) >> 2) + (t->pivot_y_256);
}
diff --git a/src/lv_api_map.h b/src/lv_api_map.h
index e11f77df2..fafcf1b89 100644
--- a/src/lv_api_map.h
+++ b/src/lv_api_map.h
@@ -23,6 +23,7 @@ extern "C" {
#define LV_INDEV_STATE_REL LV_INDEV_STATE_RELEASED
#define LV_INDEV_STATE_PR LV_INDEV_STATE_PRESSED
#define LV_OBJ_FLAG_SNAPABLE LV_OBJ_FLAG_SNAPPABLE /*Fixed typo*/
+#define LV_IMG_ZOOM_NONE LV_ZOOM_NONE
/**********************
* TYPEDEFS
diff --git a/src/misc/lv_style.c b/src/misc/lv_style.c
index 39bd58189..35155d78c 100644
--- a/src/misc/lv_style.c
+++ b/src/misc/lv_style.c
@@ -320,7 +320,7 @@ lv_style_value_t lv_style_prop_get_default(lv_style_prop_t prop)
lv_style_value_t value = {0};
switch(prop) {
case LV_STYLE_TRANSFORM_ZOOM:
- value.num = LV_IMG_ZOOM_NONE;
+ value.num = LV_ZOOM_NONE;
break;
case LV_STYLE_BG_COLOR:
value.color = lv_color_white();
diff --git a/src/misc/lv_style.h b/src/misc/lv_style.h
index 8e25011f7..da913be2d 100644
--- a/src/misc/lv_style.h
+++ b/src/misc/lv_style.h
@@ -46,8 +46,8 @@ extern "C" {
/**
* Other constants
*/
-#define LV_IMG_ZOOM_NONE 256 /*Value for not zooming the image*/
-LV_EXPORT_CONST_INT(LV_IMG_ZOOM_NONE);
+#define LV_ZOOM_NONE 256 /*Value for not zooming the image*/
+LV_EXPORT_CONST_INT(LV_ZOOM_NONE);
// *INDENT-OFF*
#if LV_USE_ASSERT_STYLE
diff --git a/src/widgets/chart/lv_chart.c b/src/widgets/chart/lv_chart.c
index 48dedce01..f2ff83495 100644
--- a/src/widgets/chart/lv_chart.c
+++ b/src/widgets/chart/lv_chart.c
@@ -666,8 +666,8 @@ static void lv_chart_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
chart->pressed_point_id = LV_CHART_POINT_NONE;
chart->type = LV_CHART_TYPE_LINE;
chart->update_mode = LV_CHART_UPDATE_MODE_SHIFT;
- chart->zoom_x = LV_IMG_ZOOM_NONE;
- chart->zoom_y = LV_IMG_ZOOM_NONE;
+ chart->zoom_x = LV_ZOOM_NONE;
+ chart->zoom_y = LV_ZOOM_NONE;
LV_TRACE_OBJ_CREATE("finished");
}
diff --git a/src/widgets/img/lv_img.c b/src/widgets/img/lv_img.c
index 33acd3234..0eb839910 100644
--- a/src/widgets/img/lv_img.c
+++ b/src/widgets/img/lv_img.c
@@ -155,7 +155,7 @@ void lv_img_set_src(lv_obj_t * obj, const void * src)
lv_obj_refresh_self_size(obj);
/*Provide enough room for the rotated corners*/
- if(img->angle || img->zoom != LV_IMG_ZOOM_NONE) lv_obj_refresh_ext_draw_size(obj);
+ if(img->angle || img->zoom != LV_ZOOM_NONE) lv_obj_refresh_ext_draw_size(obj);
lv_obj_invalidate(obj);
}
@@ -399,7 +399,7 @@ static void lv_img_constructor(const lv_obj_class_t * class_p, lv_obj_t * obj)
img->w = lv_obj_get_width(obj);
img->h = lv_obj_get_height(obj);
img->angle = 0;
- img->zoom = LV_IMG_ZOOM_NONE;
+ img->zoom = LV_ZOOM_NONE;
img->antialias = LV_COLOR_DEPTH > 8 ? 1 : 0;
img->offset.x = 0;
img->offset.y = 0;
@@ -469,7 +469,7 @@ static void lv_img_event(const lv_obj_class_t * class_p, lv_event_t * e)
lv_coord_t * s = lv_event_get_param(e);
/*If the image has angle provide enough room for the rotated corners*/
- if(img->angle || img->zoom != LV_IMG_ZOOM_NONE) {
+ if(img->angle || img->zoom != LV_ZOOM_NONE) {
lv_area_t a;
lv_coord_t w = lv_obj_get_width(obj);
lv_coord_t h = lv_obj_get_height(obj);
@@ -486,7 +486,7 @@ static void lv_img_event(const lv_obj_class_t * class_p, lv_event_t * e)
/*If the object is exactly image sized (not cropped, not mosaic) and transformed
*perform hit test on its transformed area*/
if(img->w == lv_obj_get_width(obj) && img->h == lv_obj_get_height(obj) &&
- (img->zoom != LV_IMG_ZOOM_NONE || img->angle != 0 || img->pivot.x != img->w / 2 || img->pivot.y != img->h / 2)) {
+ (img->zoom != LV_ZOOM_NONE || img->angle != 0 || img->pivot.x != img->w / 2 || img->pivot.y != img->h / 2)) {
lv_coord_t w = lv_obj_get_width(obj);
lv_coord_t h = lv_obj_get_height(obj);
@@ -551,7 +551,7 @@ static void draw_img(lv_event_t * e)
}
const lv_area_t * clip_area = lv_event_get_param(e);
- if(img->zoom == LV_IMG_ZOOM_NONE) {
+ if(img->zoom == LV_ZOOM_NONE) {
if(_lv_area_is_in(clip_area, &obj->coords, 0) == false) {
info->res = LV_COVER_RES_NOT_COVER;
return;
diff --git a/src/widgets/meter/lv_meter.c b/src/widgets/meter/lv_meter.c
index 81cd8700b..faccec63f 100644
--- a/src/widgets/meter/lv_meter.c
+++ b/src/widgets/meter/lv_meter.c
@@ -671,7 +671,7 @@ static void inv_line(lv_obj_t * obj, lv_meter_indicator_t * indic, int32_t value
scale_center.x -= indic->type_data.needle_img.pivot.x;
scale_center.y -= indic->type_data.needle_img.pivot.y;
lv_area_t a;
- _lv_img_buf_get_transformed_area(&a, info.w, info.h, angle, LV_IMG_ZOOM_NONE, &indic->type_data.needle_img.pivot);
+ _lv_img_buf_get_transformed_area(&a, info.w, info.h, angle, LV_ZOOM_NONE, &indic->type_data.needle_img.pivot);
a.x1 += scale_center.x - 2;
a.y1 += scale_center.y - 2;
a.x2 += scale_center.x + 2;