Lines Matching refs:ext

72     lv_img_ext_t * ext = lv_obj_allocate_ext_attr(img, sizeof(lv_img_ext_t));  in lv_img_create()  local
73 LV_ASSERT_MEM(ext); in lv_img_create()
74 if(ext == NULL) { in lv_img_create()
79 ext->src = NULL; in lv_img_create()
80 ext->src_type = LV_IMG_SRC_UNKNOWN; in lv_img_create()
81 ext->cf = LV_IMG_CF_UNKNOWN; in lv_img_create()
82 ext->w = lv_obj_get_width(img); in lv_img_create()
83 ext->h = lv_obj_get_height(img); in lv_img_create()
84 ext->angle = 0; in lv_img_create()
85 ext->zoom = LV_IMG_ZOOM_NONE; in lv_img_create()
86 ext->antialias = LV_ANTIALIAS ? 1 : 0; in lv_img_create()
87 ext->auto_size = 1; in lv_img_create()
88 ext->offset.x = 0; in lv_img_create()
89 ext->offset.y = 0; in lv_img_create()
90 ext->pivot.x = 0; in lv_img_create()
91 ext->pivot.y = 0; in lv_img_create()
105 ext->auto_size = 1; in lv_img_create()
108 ext->auto_size = 0; in lv_img_create()
113 ext->auto_size = copy_ext->auto_size; in lv_img_create()
114 ext->zoom = copy_ext->zoom; in lv_img_create()
115 ext->angle = copy_ext->angle; in lv_img_create()
116 ext->antialias = copy_ext->antialias; in lv_img_create()
117 ext->offset.x = copy_ext->offset.x; in lv_img_create()
118 ext->offset.y = copy_ext->offset.y; in lv_img_create()
119 ext->pivot.x = copy_ext->pivot.x; in lv_img_create()
120 ext->pivot.y = copy_ext->pivot.y; in lv_img_create()
146 lv_img_ext_t * ext = lv_obj_get_ext_attr(img); in lv_img_set_src() local
167 if(ext->src_type == LV_IMG_SRC_SYMBOL || ext->src_type == LV_IMG_SRC_FILE) { in lv_img_set_src()
168 lv_mem_free(ext->src); in lv_img_set_src()
170 ext->src = NULL; in lv_img_set_src()
171 ext->src_type = LV_IMG_SRC_UNKNOWN; in lv_img_set_src()
183 if(ext->src_type == LV_IMG_SRC_FILE || ext->src_type == LV_IMG_SRC_SYMBOL) { in lv_img_set_src()
184 lv_mem_free(ext->src); in lv_img_set_src()
186 ext->src = src_img; in lv_img_set_src()
190 if(ext->src != src_img) { in lv_img_set_src()
195 if(ext->src_type == LV_IMG_SRC_FILE || ext->src_type == LV_IMG_SRC_SYMBOL) { in lv_img_set_src()
196 old_src = ext->src; in lv_img_set_src()
202 ext->src = new_str; in lv_img_set_src()
220 ext->src_type = src_type; in lv_img_set_src()
221 ext->w = header.w; in lv_img_set_src()
222 ext->h = header.h; in lv_img_set_src()
223 ext->cf = header.cf; in lv_img_set_src()
224 ext->pivot.x = header.w / 2; in lv_img_set_src()
225 ext->pivot.y = header.h / 2; in lv_img_set_src()
228 lv_obj_set_size(img, ext->w, ext->h); in lv_img_set_src()
232 if(ext->angle || ext->zoom != LV_IMG_ZOOM_NONE) lv_obj_refresh_ext_draw_pad(img); in lv_img_set_src()
247 lv_img_ext_t * ext = lv_obj_get_ext_attr(img); in lv_img_set_auto_size() local
249 ext->auto_size = (en == false ? 0 : 1); in lv_img_set_auto_size()
262 lv_img_ext_t * ext = lv_obj_get_ext_attr(img); in lv_img_set_offset_x() local
264 x = x % ext->w; in lv_img_set_offset_x()
266 ext->offset.x = x; in lv_img_set_offset_x()
280 lv_img_ext_t * ext = lv_obj_get_ext_attr(img); in lv_img_set_offset_y() local
282 y = y % ext->h; in lv_img_set_offset_y()
284 ext->offset.y = y; in lv_img_set_offset_y()
297 lv_img_ext_t * ext = lv_obj_get_ext_attr(img); in lv_img_set_pivot() local
298 if(ext->pivot.x == pivot_x && ext->pivot.y == pivot_y) return; in lv_img_set_pivot()
301 transf_zoom = (transf_zoom * ext->zoom) >> 8; in lv_img_set_pivot()
304 transf_angle += ext->angle; in lv_img_set_pivot()
309 _lv_img_buf_get_transformed_area(&a, w, h, transf_angle, transf_zoom, &ext->pivot); in lv_img_set_pivot()
316 ext->pivot.x = pivot_x; in lv_img_set_pivot()
317 ext->pivot.y = pivot_y; in lv_img_set_pivot()
320 _lv_img_buf_get_transformed_area(&a, w, h, transf_angle, transf_zoom, &ext->pivot); in lv_img_set_pivot()
338 lv_img_ext_t * ext = lv_obj_get_ext_attr(img); in lv_img_set_angle() local
339 if(angle == ext->angle) return; in lv_img_set_angle()
342 transf_zoom = (transf_zoom * ext->zoom) >> 8; in lv_img_set_angle()
349 _lv_img_buf_get_transformed_area(&a, w, h, transf_angle + ext->angle, transf_zoom, &ext->pivot); in lv_img_set_angle()
356 ext->angle = angle; in lv_img_set_angle()
359 _lv_img_buf_get_transformed_area(&a, w, h, transf_angle + ext->angle, transf_zoom, &ext->pivot); in lv_img_set_angle()
379 lv_img_ext_t * ext = lv_obj_get_ext_attr(img); in lv_img_set_zoom() local
380 if(zoom == ext->zoom) return; in lv_img_set_zoom()
387 transf_angle += ext->angle; in lv_img_set_zoom()
392 …_lv_img_buf_get_transformed_area(&a, w, h, transf_angle, (transf_zoom * ext->zoom) >> 8, &ext->piv… in lv_img_set_zoom()
399 ext->zoom = zoom; in lv_img_set_zoom()
402 …_lv_img_buf_get_transformed_area(&a, w, h, transf_angle, (transf_zoom * ext->zoom) >> 8, &ext->piv… in lv_img_set_zoom()
417 lv_img_ext_t * ext = lv_obj_get_ext_attr(img); in lv_img_set_antialias() local
418 if(antialias == ext->antialias) return; in lv_img_set_antialias()
420 ext->antialias = antialias; in lv_img_set_antialias()
437 lv_img_ext_t * ext = lv_obj_get_ext_attr(img); in lv_img_get_src() local
439 return ext->src; in lv_img_get_src()
451 lv_img_ext_t * ext = lv_obj_get_ext_attr(img); in lv_img_get_file_name() local
453 if(ext->src_type == LV_IMG_SRC_FILE) in lv_img_get_file_name()
454 return ext->src; in lv_img_get_file_name()
468 lv_img_ext_t * ext = lv_obj_get_ext_attr(img); in lv_img_get_auto_size() local
470 return ext->auto_size == 0 ? false : true; in lv_img_get_auto_size()
482 lv_img_ext_t * ext = lv_obj_get_ext_attr(img); in lv_img_get_offset_x() local
484 return ext->offset.x; in lv_img_get_offset_x()
496 lv_img_ext_t * ext = lv_obj_get_ext_attr(img); in lv_img_get_offset_y() local
498 return ext->offset.y; in lv_img_get_offset_y()
510 lv_img_ext_t * ext = lv_obj_get_ext_attr(img); in lv_img_get_pivot() local
512 *pivot = ext->pivot; in lv_img_get_pivot()
524 lv_img_ext_t * ext = lv_obj_get_ext_attr(img); in lv_img_get_angle() local
526 return ext->angle; in lv_img_get_angle()
538 lv_img_ext_t * ext = lv_obj_get_ext_attr(img); in lv_img_get_zoom() local
540 return ext->zoom; in lv_img_get_zoom()
552 lv_img_ext_t * ext = lv_obj_get_ext_attr(img); in lv_img_get_antialias() local
554 return ext->antialias ? true : false; in lv_img_get_antialias()
573 lv_img_ext_t * ext = lv_obj_get_ext_attr(img); in lv_img_design() local
578 …if(ext->src_type == LV_IMG_SRC_UNKNOWN || ext->src_type == LV_IMG_SRC_SYMBOL) return LV_DESIGN_RES… in lv_img_design()
581 … if(ext->cf != LV_IMG_CF_TRUE_COLOR && ext->cf != LV_IMG_CF_RAW) return LV_DESIGN_RES_NOT_COVER; in lv_img_design()
587 angle_final += ext->angle; in lv_img_design()
592 zoom_final = (zoom_final * ext->zoom) >> 8; in lv_img_design()
599 …et_transformed_area(&a, lv_obj_get_width(img), lv_obj_get_height(img), 0, zoom_final, &ext->pivot); in lv_img_design()
616 if(ext->h == 0 || ext->w == 0) return true; in lv_img_design()
629 zoom_final = (zoom_final * ext->zoom) >> 8; in lv_img_design()
632 angle_final += ext->angle; in lv_img_design()
639 angle_final, zoom_final, &ext->pivot); in lv_img_design()
663 if(ext->src_type == LV_IMG_SRC_FILE || ext->src_type == LV_IMG_SRC_VARIABLE) { in lv_img_design()
676 img_dsc.pivot.x = ext->pivot.x; in lv_img_design()
677 img_dsc.pivot.y = ext->pivot.y; in lv_img_design()
678 img_dsc.antialias = ext->antialias; in lv_img_design()
680 lv_coord_t zoomed_src_w = (int32_t)((int32_t)ext->w * zoom_final) >> 8; in lv_img_design()
682 lv_coord_t zoomed_src_h = (int32_t)((int32_t)ext->h * zoom_final) >> 8; in lv_img_design()
687 zommed_coords.x1 += (int32_t)((int32_t)ext->offset.x * zoom_final) >> 8; in lv_img_design()
688 zommed_coords.y1 += (int32_t)((int32_t)ext->offset.y * zoom_final) >> 8; in lv_img_design()
692 if(zommed_coords.x1 > img->coords.x1) zommed_coords.x1 -= ext->w; in lv_img_design()
693 if(zommed_coords.y1 > img->coords.y1) zommed_coords.y1 -= ext->h; in lv_img_design()
697 &ext->pivot); in lv_img_design()
707 coords_tmp.y2 = zommed_coords.y1 + ext->h - 1; in lv_img_design()
711 coords_tmp.x2 = zommed_coords.x1 + ext->w - 1; in lv_img_design()
713 lv_draw_img(&coords_tmp, &clip_real, ext->src, &img_dsc); in lv_img_design()
717 else if(ext->src_type == LV_IMG_SRC_SYMBOL) { in lv_img_design()
724 lv_draw_label(&img->coords, clip_area, &label_dsc, ext->src, NULL); in lv_img_design()
748 zoom_final = (zoom_final * ext->zoom) >> 8; in lv_img_design()
751 angle_final += ext->angle; in lv_img_design()
755 angle_final, zoom_final, &ext->pivot); in lv_img_design()
796 lv_img_ext_t * ext = lv_obj_get_ext_attr(img); in lv_img_signal() local
798 if(ext->src_type == LV_IMG_SRC_FILE || ext->src_type == LV_IMG_SRC_SYMBOL) { in lv_img_signal()
799 lv_mem_free(ext->src); in lv_img_signal()
800 ext->src = NULL; in lv_img_signal()
801 ext->src_type = LV_IMG_SRC_UNKNOWN; in lv_img_signal()
806 if(ext->src_type == LV_IMG_SRC_SYMBOL) { in lv_img_signal()
807 lv_img_set_src(img, ext->src); in lv_img_signal()
813 transf_zoom = (transf_zoom * ext->zoom) >> 8; in lv_img_signal()
816 transf_angle += ext->angle; in lv_img_signal()
823 _lv_img_buf_get_transformed_area(&a, w, h, transf_angle, transf_zoom, &ext->pivot); in lv_img_signal()
847 zoom = (zoom * ext->zoom) >> 8; in lv_img_signal()
850 angle += ext->angle; in lv_img_signal()
854 if(ext->w == lv_obj_get_width(img) && ext->h == lv_obj_get_height(img) && in lv_img_signal()
855 …(zoom != LV_IMG_ZOOM_NONE || angle != 0 || ext->pivot.x != ext->w / 2 || ext->pivot.y != ext->h / … in lv_img_signal()
860 _lv_img_buf_get_transformed_area(&coords, w, h, angle, zoom, &ext->pivot); in lv_img_signal()