/lvgl-2.7.6/src/lv_draw/ |
D | lv_draw_blend.c | 94 #define MAP_NORMAL_MASK_PX(x) \ argument 96 …if(*mask_tmp_x == LV_OPA_COVER) disp_buf_first[x] = map_buf_first[x]; … 97 …else disp_buf_first[x] = lv_color_mix(map_buf_first[x], disp_buf_first[x], *mask_tmp_x); … 101 #define MAP_NORMAL_MASK_PX_SCR_TRANSP(x) \ argument 103 …if(*mask_tmp_x == LV_OPA_COVER) disp_buf_first[x] = map_buf_first[x]; … 104 …isp->driver.screen_transp) lv_color_mix_with_alpha(disp_buf_first[x], disp_buf_first[x].ch.alpha, … 105 …map_buf_first[x], *mask_tmp_x, &disp_buf_first[x], &disp_buf_first[x].ch.alpha); \ 106 …else disp_buf_first[x] = lv_color_mix(map_buf_first[x], disp_buf_first[x], *mask_tmp_x); … 264 int32_t x; in fill_set_px() local 269 for(x = draw_area->x1; x <= draw_area->x2; x++) { in fill_set_px() [all …]
|
D | lv_img_buf.c | 52 lv_color_t lv_img_buf_get_px_color(lv_img_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_color_t color) in lv_img_buf_get_px_color() argument 60 uint32_t px = dsc->header.w * y * px_size + x * px_size; in lv_img_buf_get_px_color() 68 uint8_t bit = x & 0x7; in lv_img_buf_get_px_color() 69 x = x >> 3; in lv_img_buf_get_px_color() 74 uint32_t px = ((dsc->header.w + 7) >> 3) * y + x; in lv_img_buf_get_px_color() 79 uint8_t bit = (x & 0x3) * 2; in lv_img_buf_get_px_color() 80 x = x >> 2; in lv_img_buf_get_px_color() 85 uint32_t px = ((dsc->header.w + 3) >> 2) * y + x; in lv_img_buf_get_px_color() 90 uint8_t bit = (x & 0x1) * 4; in lv_img_buf_get_px_color() 91 x = x >> 1; in lv_img_buf_get_px_color() [all …]
|
D | lv_draw_line.c | 70 if(point1->x == point2->x && point1->y == point2->y) return; in lv_draw_line() 73 clip_line.x1 = LV_MATH_MIN(point1->x, point2->x) - dsc->width / 2; in lv_draw_line() 74 clip_line.x2 = LV_MATH_MAX(point1->x, point2->x) + dsc->width / 2; in lv_draw_line() 83 else if(point1->x == point2->x) draw_line_ver(point1, point2, &clip_line, dsc); in lv_draw_line() 99 cir_area.x1 = point1->x - r; in lv_draw_line() 101 cir_area.x2 = point1->x + r - r_corr; in lv_draw_line() 107 cir_area.x1 = point2->x - r; in lv_draw_line() 109 cir_area.x2 = point2->x + r - r_corr; in lv_draw_line() 142 draw_area.x1 = LV_MATH_MIN(point1->x, point2->x); in draw_line_hor() 143 draw_area.x2 = LV_MATH_MAX(point1->x, point2->x) - 1; in draw_line_hor() [all …]
|
D | lv_draw_triangle.c | 65 poly_coords.x1 = LV_MATH_MIN(poly_coords.x1, points[i].x); in lv_draw_polygon() 67 poly_coords.x2 = LV_MATH_MAX(poly_coords.x2, points[i].x); in lv_draw_polygon() 106 …if(points[i_next_left].x > points[i_next_right].x && points[i_next_left].y < points[i_next_right].… in lv_draw_polygon() 126 points[i_next_left].x != points[i_prev_left].x) { in lv_draw_polygon() 127 lv_draw_mask_line_points_init(mp_next, points[i_prev_left].x, points[i_prev_left].y, in lv_draw_polygon() 128 points[i_next_left].x, points[i_next_left].y, in lv_draw_polygon() 141 points[i_next_right].x != points[i_prev_right].x) { in lv_draw_polygon() 143 … lv_draw_mask_line_points_init(mp_next, points[i_prev_right].x, points[i_prev_right].y, in lv_draw_polygon() 144 points[i_next_right].x, points[i_next_right].y, in lv_draw_polygon()
|
D | lv_img_decoder.c | 40 static lv_res_t lv_img_decoder_built_in_line_true_color(lv_img_decoder_dsc_t * dsc, lv_coord_t x, l… 42 static lv_res_t lv_img_decoder_built_in_line_alpha(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coo… 44 static lv_res_t lv_img_decoder_built_in_line_indexed(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_c… 168 lv_res_t lv_img_decoder_read_line(lv_img_decoder_dsc_t * dsc, lv_coord_t x, lv_coord_t y, lv_coord_… in lv_img_decoder_read_line() argument 171 …if(dsc->decoder->read_line_cb) res = dsc->decoder->read_line_cb(dsc->decoder, dsc, x, y, len, buf); in lv_img_decoder_read_line() 482 …mg_decoder_built_in_read_line(lv_img_decoder_t * decoder, lv_img_decoder_dsc_t * dsc, lv_coord_t x, in lv_img_decoder_built_in_read_line() argument 494 res = lv_img_decoder_built_in_line_true_color(dsc, x, y, len, buf); in lv_img_decoder_built_in_read_line() 500 res = lv_img_decoder_built_in_line_alpha(dsc, x, y, len, buf); in lv_img_decoder_built_in_read_line() 504 res = lv_img_decoder_built_in_line_indexed(dsc, x, y, len, buf); in lv_img_decoder_built_in_read_line() 545 static lv_res_t lv_img_decoder_built_in_line_true_color(lv_img_decoder_dsc_t * dsc, lv_coord_t x, l… in lv_img_decoder_built_in_line_true_color() argument [all …]
|
D | lv_draw_rect.c | 757 int32_t x; in draw_shadow() local 758 for(x = 0; x < corner_size / 2; x++) { in draw_shadow() 759 lv_opa_t tmp = sh_buf_tmp[x]; in draw_shadow() 760 sh_buf_tmp[x] = sh_buf_tmp[corner_size - x - 1]; in draw_shadow() 761 sh_buf_tmp[corner_size - x - 1] = tmp; in draw_shadow() 1054 uint32_t x; in shadow_draw_corner_buf() local 1056 for(x = 0; x < size * size; x++) { in shadow_draw_corner_buf() 1057 res_buf[x] = sh_buf[x]; in shadow_draw_corner_buf() 1071 int32_t x; in shadow_draw_corner_buf() local 1073 for(x = 0; x < size * size; x++) { in shadow_draw_corner_buf() [all …]
|
D | lv_draw_label.c | 141 w = p.x; in lv_draw_label() 150 pos.x = coords->x1; in lv_draw_label() 200 pos.x += (lv_area_get_width(coords) - line_width) / 2; in lv_draw_label() 206 pos.x += lv_area_get_width(coords) - line_width; in lv_draw_label() 239 int32_t pos_x_start = pos.x; in lv_draw_label() 242 pos.x += x_ofs; in lv_draw_label() 318 sel_coords.x1 = pos.x; in lv_draw_label() 320 sel_coords.x2 = pos.x + letter_w + dsc->letter_space - 1; in lv_draw_label() 329 pos.x += letter_w + dsc->letter_space; in lv_draw_label() 336 p1.x = pos_x_start; in lv_draw_label() [all …]
|
D | lv_draw_img.c | 292 int32_t x = mask_com.x1 - coords->x1; in lv_img_draw_core() local 301 read_res = lv_img_decoder_read_line(&cdsc->dec_dsc, x, y, width, buf); in lv_img_draw_core() 406 int32_t x; in lv_draw_map() local 410 for(x = 0; x < draw_area_w; x++, map_px += px_size_byte, px_i++) { in lv_draw_map() 470 trans_dsc.cfg.pivot_x = draw_dsc->pivot.x; in lv_draw_map() 494 int32_t x; in lv_draw_map() local 506 for(x = 0; x < draw_area_w; x++, map_px += px_size_byte, px_i++) { in lv_draw_map() 514 ret = _lv_img_buf_transform(&trans_dsc, rot_x + x, rot_y + y); in lv_draw_map()
|
/lvgl-2.7.6/src/lv_widgets/ |
D | lv_tileview.c | 90 ext->act_id.x = 0; in lv_tileview_create() 127 ext->act_id.x = copy_ext->act_id.x; in lv_tileview_create() 187 if(valid_pos[i].x == ext->act_id.x && valid_pos[i].y == ext->act_id.y) { in lv_tileview_set_valid_positions() 194 lv_tileview_set_tile_act(tileview, valid_pos[0].x, valid_pos[0].y, LV_ANIM_OFF); in lv_tileview_set_valid_positions() 205 void lv_tileview_set_tile_act(lv_obj_t * tileview, lv_coord_t x, lv_coord_t y, lv_anim_enable_t ani… in lv_tileview_set_tile_act() argument 218 if(ext->valid_pos[tile_id].x == x && ext->valid_pos[tile_id].y == y) { in lv_tileview_set_tile_act() 226 ext->act_id.x = x; in lv_tileview_set_tile_act() 229 lv_coord_t x_coord = -x * lv_obj_get_width(tileview); in lv_tileview_set_tile_act() 280 void lv_tileview_get_tile_act(lv_obj_t * tileview, lv_coord_t * x, lv_coord_t * y) in lv_tileview_get_tile_act() argument 284 *x = ext->act_id.x; in lv_tileview_get_tile_act() [all …]
|
D | lv_canvas.c | 34 …id set_px_true_color_alpha(lv_disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, 38 …px_cb_alpha1(lv_disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, 41 …px_cb_alpha2(lv_disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, 44 …px_cb_alpha4(lv_disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, 48 …px_cb_alpha8(lv_disp_drv_t * disp_drv, uint8_t * buf, lv_coord_t buf_w, lv_coord_t x, lv_coord_t y, 51 static void set_px_alpha_generic(lv_img_dsc_t * d, lv_coord_t x, lv_coord_t y, lv_color_t color, lv… 161 void lv_canvas_set_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t c) in lv_canvas_set_px() argument 167 lv_img_buf_set_px_color(&ext->dsc, x, y, c); in lv_canvas_set_px() 202 lv_color_t lv_canvas_get_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y) in lv_canvas_get_px() argument 209 return lv_img_buf_get_px_color(&ext->dsc, x, y, color); in lv_canvas_get_px() [all …]
|
D | lv_label.c | 49 static void lv_label_set_offset_x(lv_obj_t * label, lv_coord_t x); 107 ext->offset.x = 0; in lv_label_create() 367 ext->offset.x = 0; in lv_label_set_long_mode() 581 pos->x = 0; in lv_label_get_letter_pos() 584 pos->x = lv_obj_get_width(label); in lv_label_get_letter_pos() 587 pos->x = lv_obj_get_width(label) / 2; in lv_label_get_letter_pos() 661 lv_coord_t x = _lv_txt_get_width(bidi_txt, visual_byte_pos, font, letter_space, flag); in lv_label_get_letter_pos() local 662 if(char_id != line_start) x += letter_space; in lv_label_get_letter_pos() 667 x += lv_area_get_width(&txt_coords) / 2 - line_w / 2; in lv_label_get_letter_pos() 674 x += lv_area_get_width(&txt_coords) - line_w; in lv_label_get_letter_pos() [all …]
|
D | lv_gauge.c | 90 ext->needle_img_pivot.x = 0; in lv_gauge_create() 224 p_mid.x = x_ofs; in lv_gauge_set_value() 230 p_end.x = (_lv_trigo_sin(needle_angle + 90) * r) / LV_TRIGO_SIN_MAX + x_ofs; in lv_gauge_set_value() 233 a.x1 = LV_MATH_MIN(p_mid.x, p_end.x) - needle_w; in lv_gauge_set_value() 235 a.x2 = LV_MATH_MAX(p_mid.x, p_end.x) + needle_w; in lv_gauge_set_value() 241 p_end.x = (_lv_trigo_sin(needle_angle + 90) * r) / LV_TRIGO_SIN_MAX + x_ofs; in lv_gauge_set_value() 243 a.x1 = LV_MATH_MIN(p_mid.x, p_end.x) - needle_w; in lv_gauge_set_value() 245 a.x2 = LV_MATH_MAX(p_mid.x, p_end.x) + needle_w; in lv_gauge_set_value() 288 ext->needle_img_pivot.x = pivot_x; in lv_gauge_set_needle_img() 382 return ext->needle_img_pivot.x; in lv_gauge_get_needle_img_pivot_x() [all …]
|
D | lv_canvas.h | 81 void lv_canvas_set_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t c); 106 lv_color_t lv_canvas_get_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y); 129 void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t x, lv_coord_t y, lv_coo… 186 void lv_canvas_draw_rect(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t w, lv_coord_t h, 199 void lv_canvas_draw_text(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t max_w, 211 void lv_canvas_draw_img(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, const void * src, 244 void lv_canvas_draw_arc(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t r, int32_t start_…
|
D | lv_chart.c | 874 p1.x = 0 + x_ofs; in draw_series_bg() 875 p2.x = w - 1 + x_ofs; in draw_series_bg() 898 p1.x = (int32_t)((int32_t)(w - line_dsc.width) * div_i) / (ext->vdiv_cnt + 1); in draw_series_bg() 899 p1.x += x_ofs; in draw_series_bg() 900 p2.x = p1.x; in draw_series_bg() 971 p1.x = 0 + x_ofs; in draw_series_line() 972 p2.x = 0 + x_ofs; in draw_series_line() 981 p1.x = p2.x; in draw_series_line() 984 p2.x = ((w * i) / (ext->point_cnt - 1)) + x_ofs; in draw_series_line() 1000 …lv_draw_mask_line_points_init(&mask_line_p, p1.x, p1.y, p2.x, p2.y, LV_DRAW_MASK_LINE_SIDE_BOTTOM); in draw_series_line() [all …]
|
D | lv_arc.c | 652 lv_draw_arc(center.x, center.y, arc_r, ext->bg_angle_start + ext->rotation_angle, in lv_arc_design() 669 lv_draw_arc(center.x, center.y, indic_r, ext->arc_angle_start + ext->rotation_angle, in lv_arc_design() 737 p.x -= center.x; in lv_arc_signal() 745 if(p.x * p.x + p.y * p.y > r * r) { in lv_arc_signal() 761 angle = 360 - _lv_atan2(p.x, p.y) + 90; /*Some transformation is required*/ in lv_arc_signal() 894 lv_coord_t x = arc->coords.x1 + rout + left; in inv_arc_area() local 922 … inv_area.x2 = x + ((_lv_trigo_sin(start_angle + 90) * rout) >> LV_TRIGO_SHIFT) + extra_area; in inv_arc_area() 925 … inv_area.x1 = x + ((_lv_trigo_sin(end_angle + 90) * rin) >> LV_TRIGO_SHIFT) - extra_area; in inv_arc_area() 931 … inv_area.x2 = x + ((_lv_trigo_sin(start_angle + 90) * rin) >> LV_TRIGO_SHIFT) + extra_area; in inv_arc_area() 934 … inv_area.x1 = x + ((_lv_trigo_sin(end_angle + 90) * rout) >> LV_TRIGO_SHIFT) - extra_area; in inv_arc_area() [all …]
|
D | lv_img.c | 88 ext->offset.x = 0; in lv_img_create() 90 ext->pivot.x = 0; in lv_img_create() 117 ext->offset.x = copy_ext->offset.x; in lv_img_create() 119 ext->pivot.x = copy_ext->pivot.x; in lv_img_create() 216 header.w = size.x; in lv_img_set_src() 224 ext->pivot.x = header.w / 2; in lv_img_set_src() 258 void lv_img_set_offset_x(lv_obj_t * img, lv_coord_t x) in lv_img_set_offset_x() argument 264 x = x % ext->w; in lv_img_set_offset_x() 266 ext->offset.x = x; in lv_img_set_offset_x() 298 if(ext->pivot.x == pivot_x && ext->pivot.y == pivot_y) return; in lv_img_set_pivot() [all …]
|
D | lv_cpicker.c | 510 p[0].x = cx + (r * _lv_trigo_sin(i) >> LV_TRIGO_SHIFT); in draw_disc_grad() 512 p[1].x = cx + ((r - cir_w_extra) * _lv_trigo_sin(i) >> LV_TRIGO_SHIFT); in draw_disc_grad() 653 knob_area.x1 = cpicker->coords.x1 + ext->knob.pos.x - r - left; in get_knob_area() 655 knob_area.x2 = cpicker->coords.x1 + ext->knob.pos.x + r + top; in get_knob_area() 781 p.x = cpicker->coords.x1 + lv_obj_get_width(cpicker) / 2; in lv_cpicker_signal() 788 if((LV_MATH_ABS(p.x - ext->last_press_point.x) > indev->driver.drag_limit / 2) || in lv_cpicker_signal() 791 ext->last_press_point.x = p.x; in lv_cpicker_signal() 795 p.x -= cpicker->coords.x1; in lv_cpicker_signal() 812 angle = (p.x * 360) / w; in lv_cpicker_signal() 821 p.x -= r_in; in lv_cpicker_signal() [all …]
|
/lvgl-2.7.6/src/lv_misc/ |
D | lv_area.c | 82 void _lv_area_set_pos(lv_area_t * area_p, lv_coord_t x, lv_coord_t y) in _lv_area_set_pos() argument 86 area_p->x1 = x; in _lv_area_set_pos() 154 if((p_p->x >= a_p->x1 && p_p->x <= a_p->x2) && ((p_p->y >= a_p->y1 && p_p->y <= a_p->y2))) { in _lv_area_is_point_on() 247 p.x = ain_p->x1; in _lv_area_is_in() 251 p.x = ain_p->x2; in _lv_area_is_in() 255 p.x = ain_p->x1; in _lv_area_is_in() 259 p.x = ain_p->x2; in _lv_area_is_in() 278 res->x = lv_area_get_width(base) / 2 - lv_area_get_width(to_align) / 2; in _lv_area_align() 283 res->x = 0; in _lv_area_align() 287 res->x = lv_area_get_width(base) / 2 - lv_area_get_width(to_align) / 2; in _lv_area_align() [all …]
|
D | lv_math.c | 114 LV_ATTRIBUTE_FAST_MEM void _lv_sqrt(uint32_t x, lv_sqrt_res_t * q, uint32_t mask) in _lv_sqrt() argument 116 x = x << 8; /*To get 4 bit precision. (sqrt(256) = 16 = 4 bit)*/ in _lv_sqrt() 123 if((uint32_t)trial * trial <= x) root = trial; in _lv_sqrt() 137 uint16_t _lv_atan2(int x, int y) in _lv_atan2() argument 160 if(x < 0) { in _lv_atan2() 162 x = (0 - x); // is now + in _lv_atan2() 164 ux = x; // copy to unsigned var before multiply in _lv_atan2() 243 int16_t _lv_map(int32_t x, int32_t min_in, int32_t max_in, int32_t min_out, int32_t max_out) in _lv_map() argument 245 if(x <= min_in) return min_out; in _lv_map() 246 if(x >= max_in) return max_out; in _lv_map() [all …]
|
D | lv_math.h | 30 #define LV_MATH_ABS(x) ((x) > 0 ? (x) : (-(x))) argument 32 #define LV_MATH_UDIV255(x) ((uint32_t)((uint32_t) (x) * 0x8081) >> 0x17) argument 86 uint16_t _lv_atan2(int x, int y); 101 LV_ATTRIBUTE_FAST_MEM void _lv_sqrt(uint32_t x, lv_sqrt_res_t * q, uint32_t mask); 122 int16_t _lv_map(int32_t x, int32_t min_in, int32_t max_in, int32_t min, int32_t max);
|
/lvgl-2.7.6/src/lv_core/ |
D | lv_indev.c | 215 …lv_obj_set_pos(indev->cursor, indev->proc.types.pointer.act_point.x, indev->proc.types.pointer.act… in lv_indev_set_cursor() 254 point->x = 0; in lv_indev_get_point() 259 point->x = -1; in lv_indev_get_point() 263 point->x = indev->proc.types.pointer.act_point.x; in lv_indev_get_point() 313 point->x = 0; in lv_indev_get_vect() 319 point->x = 0; in lv_indev_get_vect() 323 point->x = indev->proc.types.pointer.vect.x; in lv_indev_get_vect() 341 indev->proc.types.pointer.drag_throw_vect.x = 0; in lv_indev_finish_drag() 406 …(i->proc.types.pointer.last_point.x != data->point.x || i->proc.types.pointer.last_point.y != data… in indev_pointer_proc() 407 lv_obj_set_pos(i->cursor, data->point.x, data->point.y); in indev_pointer_proc() [all …]
|
/lvgl-2.7.6/examples/porting/ |
D | lv_port_disp_template.c | 145 int32_t x; 148 for(x = area->x1; x <= area->x2; x++) { 181 int32_t x, y; 185 for(x = fill_area->x1; x <= fill_area->x2; x++) { 186 dest_buf[x] = color;
|
D | lv_port_indev_template.c | 29 static void touchpad_get_xy(lv_coord_t * x, lv_coord_t * y); 34 static void mouse_get_xy(lv_coord_t * x, lv_coord_t * y); 204 data->point.x = last_x; 220 static void touchpad_get_xy(lv_coord_t * x, lv_coord_t * y) 224 (*x) = 0; 243 mouse_get_xy(&data->point.x, &data->point.y); 265 static void mouse_get_xy(lv_coord_t * x, lv_coord_t * y) 269 (*x) = 0; 289 mouse_get_xy(&data->point.x, &data->point.y);
|
/lvgl-2.7.6/src/lv_font/ |
D | lv_font_fmt_txt.c | 373 lv_coord_t x; in decompress() local 375 for(x = 0; x < w; x++) { in decompress() 376 bits_write(out, wrp, line_buf1[x], bpp); in decompress() 384 for(x = 0; x < w; x++) { in decompress() 385 line_buf1[x] = line_buf2[x] ^ line_buf1[x]; in decompress() 386 bits_write(out, wrp, line_buf1[x], bpp); in decompress() 393 for(x = 0; x < w; x++) { in decompress() 394 bits_write(out, wrp, line_buf1[x], bpp); in decompress()
|
/lvgl-2.7.6/tests/ |
D | lv_test_assert.c | 210 int x, y, i_buf = 0; in lv_test_assert_img_eq() local 213 for (x=0; x<p.width; x++) { in lv_test_assert_img_eq() 214 ptr_ref = &(row[x*3]); in lv_test_assert_img_eq() 236 …IL: %s. (Expected: %s, diff. at (%d;%d), %08x instead of %08x)", s, fn_ref, x, y, act_px, ref_px); in lv_test_assert_img_eq()
|