/lvgl-3.4.0/src/draw/sw/ |
D | lv_draw_sw_blend.c | 74 #define MAP_NORMAL_MASK_PX(x) \ argument 76 if(*mask_tmp_x == LV_OPA_COVER) dest_buf[x] = src_buf[x]; \ 77 else dest_buf[x] = lv_color_mix(src_buf[x], dest_buf[x], *mask_tmp_x); \ 81 #define MAP_NORMAL_MASK_PX_SCR_TRANSP(x) \ argument 83 if(*mask_tmp_x == LV_OPA_COVER) dest_buf[x] = src_buf[x]; \ 84 …else if(disp->driver->screen_transp) lv_color_mix_with_alpha(dest_buf[x], dest_buf[x].ch.alpha, … 85 … src_buf[x], *mask_tmp_x, &dest_buf[x], &dest_buf[x].ch.alpha); \ 86 else dest_buf[x] = lv_color_mix(src_buf[x], dest_buf[x], *mask_tmp_x); \ 189 int32_t x; in fill_set_px() local 194 for(x = blend_area->x1; x <= blend_area->x2; x++) { in fill_set_px() [all …]
|
D | lv_draw_sw_line.c | 58 if(point1->x == point2->x && point1->y == point2->y) return; in lv_draw_sw_line() 61 clip_line.x1 = LV_MIN(point1->x, point2->x) - dsc->width / 2; in lv_draw_sw_line() 62 clip_line.x2 = LV_MAX(point1->x, point2->x) + dsc->width / 2; in lv_draw_sw_line() 73 else if(point1->x == point2->x) draw_line_ver(draw_ctx, dsc, point1, point2); in lv_draw_sw_line() 88 cir_area.x1 = point1->x - r; in lv_draw_sw_line() 90 cir_area.x2 = point1->x + r - r_corr; in lv_draw_sw_line() 96 cir_area.x1 = point2->x - r; in lv_draw_sw_line() 98 cir_area.x2 = point2->x + r - r_corr; in lv_draw_sw_line() 120 blend_area.x1 = LV_MIN(point1->x, point2->x); in draw_line_hor() 121 blend_area.x2 = LV_MAX(point1->x, point2->x) - 1; in draw_line_hor() [all …]
|
D | lv_draw_sw_dither.c | 20 LV_ATTRIBUTE_FAST_MEM void lv_dither_none(lv_grad_t * grad, lv_coord_t x, lv_coord_t y, lv_coord_t … in lv_dither_none() argument 22 LV_UNUSED(x); in lv_dither_none() 43 LV_ATTRIBUTE_FAST_MEM void lv_dither_ordered_hor(lv_grad_t * grad, lv_coord_t x, lv_coord_t y, lv_c… in lv_dither_ordered_hor() argument 45 LV_UNUSED(x); in lv_dither_ordered_hor() 66 LV_ATTRIBUTE_FAST_MEM void lv_dither_ordered_ver(lv_grad_t * grad, lv_coord_t x, lv_coord_t y, lv_c… in lv_dither_ordered_ver() argument 81 int8_t factor = dither_ordered_threshold_matrix[(y & 7) * 8 + ((j + x) & 7)] - 32; in lv_dither_ordered_ver() 122 for(lv_coord_t x = 1; x < grad->size - 1; x++) { in lv_dither_err_diff_hor() local 123 lv_color32_t t = grad->hmap[x]; in lv_dither_err_diff_hor() 127 next_l = grad->error_acc[x + 1]; in lv_dither_err_diff_hor() 135 grad->error_acc[x - 1].r += coef[1] >> 4; in lv_dither_err_diff_hor() [all …]
|
D | lv_draw_sw_polygon.c | 61 if(points[i].x != points[i + 1].x || points[i].y != points[i + 1].y) { in lv_draw_sw_polygon() 67 if(points[0].x != points[point_cnt - 1].x || points[0].y != points[point_cnt - 1].y) { in lv_draw_sw_polygon() 81 poly_coords.x1 = LV_MIN(poly_coords.x1, p[i].x); in lv_draw_sw_polygon() 83 poly_coords.x2 = LV_MAX(poly_coords.x2, p[i].x); in lv_draw_sw_polygon() 133 lv_coord_t dxl = p[i_next_left].x - p[y_min_i].x; in lv_draw_sw_polygon() 134 lv_coord_t dxr = p[i_next_right].x - p[y_min_i].x; in lv_draw_sw_polygon() 159 p[i_next_left].x != p[i_prev_left].x) { in lv_draw_sw_polygon() 160 lv_draw_mask_line_points_init(mp_next, p[i_prev_left].x, p[i_prev_left].y, in lv_draw_sw_polygon() 161 p[i_next_left].x, p[i_next_left].y, in lv_draw_sw_polygon() 174 p[i_next_right].x != p[i_prev_right].x) { in lv_draw_sw_polygon() [all …]
|
D | lv_draw_sw_arc.c | 85 area_out.x1 = center->x - radius; in lv_draw_sw_arc() 87 …area_out.x2 = center->x + radius - 1; /*-1 because the center already belongs to the left/bottom … in lv_draw_sw_arc() 127 lv_draw_mask_angle_init(&mask_angle_param, center->x, center->y, start_angle, end_angle); in lv_draw_sw_arc() 177 round_area.x1 += center->x; in lv_draw_sw_arc() 178 round_area.x2 += center->x; in lv_draw_sw_arc() 193 round_area.x1 += center->x; in lv_draw_sw_arc() 194 round_area.x2 += center->x; in lv_draw_sw_arc() 232 …quarter_area.x2 = q->center->x + ((lv_trigo_sin(q->start_angle + 90) * (q->radius)) >> LV_TRIGO_SH… in draw_quarter_0() 235 …quarter_area.x1 = q->center->x + ((lv_trigo_sin(q->end_angle + 90) * (q->radius - q->width)) >> LV… in draw_quarter_0() 246 quarter_area.x1 = q->center->x; in draw_quarter_0() [all …]
|
/lvgl-3.4.0/src/misc/ |
D | lv_area.h | 38 lv_coord_t x; member 158 void _lv_area_set_pos(lv_area_t * area_p, lv_coord_t x, lv_coord_t y); 250 #define _LV_COORD_TYPE(x) ((x) & _LV_COORD_TYPE_MASK) /*Extract type specifiers*/ argument 251 #define _LV_COORD_PLAIN(x) ((x) & ~_LV_COORD_TYPE_MASK) /*Remove type specifiers*/ argument 257 #define LV_COORD_IS_PX(x) (_LV_COORD_TYPE(x) == _LV_COORD_TYPE_PX || \ argument 258 _LV_COORD_TYPE(x) == _LV_COORD_TYPE_PX_NEG ? true : false) 259 #define LV_COORD_IS_SPEC(x) (_LV_COORD_TYPE(x) == _LV_COORD_TYPE_SPEC ? true : false) argument 261 #define LV_COORD_SET_SPEC(x) ((x) | _LV_COORD_TYPE_SPEC) argument 264 #define LV_PCT(x) (x < 0 ? LV_COORD_SET_SPEC(1000 - (x)) : LV_COORD_SET_SPEC(x)) argument 265 #define LV_COORD_IS_PCT(x) ((LV_COORD_IS_SPEC(x) && _LV_COORD_PLAIN(x) <= 2000) ? true : false) argument [all …]
|
D | lv_math.c | 109 LV_ATTRIBUTE_FAST_MEM void lv_sqrt(uint32_t x, lv_sqrt_res_t * q, uint32_t mask) in lv_sqrt() argument 111 x = x << 8; /*To get 4 bit precision. (sqrt(256) = 16 = 4 bit)*/ in lv_sqrt() 118 if(trial * trial <= x) root = trial; in lv_sqrt() 132 uint16_t lv_atan2(int x, int y) in lv_atan2() argument 153 if(x < 0) { in lv_atan2() 155 x = (0 - x); // is now + in lv_atan2() 157 ux = x; // copy to unsigned var before multiply in lv_atan2() 236 int32_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 238 if(x >= max_in) return max_out; in lv_map() 239 if(x <= min_in) return min_out; in lv_map() [all …]
|
D | lv_types.h | 72 #define LV_UNUSED(x) ((void)x) argument 74 #define _LV_CONCAT(x, y) x ## y argument 75 #define LV_CONCAT(x, y) _LV_CONCAT(x, y) argument 77 #define _LV_CONCAT3(x, y, z) x ## y ## z argument 78 #define LV_CONCAT3(x, y, z) _LV_CONCAT3(x, y, z) argument
|
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() 171 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() 265 p.x = ain_p->x1; in _lv_area_is_in() 269 p.x = ain_p->x2; in _lv_area_is_in() 273 p.x = ain_p->x1; in _lv_area_is_in() 277 p.x = ain_p->x2; in _lv_area_is_in() 303 p.x = aout_p->x1; in _lv_area_is_out() 307 p.x = aout_p->x2; in _lv_area_is_out() 311 p.x = aout_p->x1; in _lv_area_is_out() [all …]
|
D | lv_math.h | 73 uint16_t lv_atan2(int x, int y); 87 LV_ATTRIBUTE_FAST_MEM void lv_sqrt(uint32_t x, lv_sqrt_res_t * q, uint32_t mask); 108 int32_t lv_map(int32_t x, int32_t min_in, int32_t max_in, int32_t min_out, int32_t max_out); 131 #define LV_ABS(x) ((x) > 0 ? (x) : (-(x))) argument 132 #define LV_UDIV255(x) (((x) * 0x8081U) >> 0x17) argument
|
/lvgl-3.4.0/zephyr/ |
D | lvgl.c | 209 .point.x = col, in lvgl_pointer_kscan_callback() 227 .point.x = 0, in lvgl_pointer_kscan_read() 244 lv_coord_t x; in lvgl_pointer_kscan_read() local 246 x = prev.point.x; in lvgl_pointer_kscan_read() 247 prev.point.x = prev.point.y; in lvgl_pointer_kscan_read() 248 prev.point.y = x; in lvgl_pointer_kscan_read() 254 prev.point.x = cap->x_resolution - prev.point.x; in lvgl_pointer_kscan_read() 256 prev.point.x = cap->y_resolution - prev.point.x; in lvgl_pointer_kscan_read() 271 lv_coord_t x; in lvgl_pointer_kscan_read() local 273 x = prev.point.x; in lvgl_pointer_kscan_read() [all …]
|
/lvgl-3.4.0/src/draw/ |
D | lv_img_buf.c | 51 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 59 uint32_t px = dsc->header.w * y * px_size + x * px_size; in lv_img_buf_get_px_color() 67 uint8_t bit = x & 0x7; in lv_img_buf_get_px_color() 68 x = x >> 3; in lv_img_buf_get_px_color() 73 uint32_t px = ((dsc->header.w + 7) >> 3) * y + x; in lv_img_buf_get_px_color() 78 uint8_t bit = (x & 0x3) * 2; in lv_img_buf_get_px_color() 79 x = x >> 2; in lv_img_buf_get_px_color() 84 uint32_t px = ((dsc->header.w + 3) >> 2) * y + x; in lv_img_buf_get_px_color() 89 uint8_t bit = (x & 0x1) * 4; in lv_img_buf_get_px_color() 90 x = x >> 1; in lv_img_buf_get_px_color() [all …]
|
D | lv_draw_arc.c | 57 void lv_draw_arc_get_area(lv_coord_t x, lv_coord_t y, uint16_t radius, uint16_t start_angle, uint1… in lv_draw_arc_get_area() argument 64 area->x1 = x - rout; in lv_draw_arc_get_area() 66 area->x2 = x + rout; in lv_draw_arc_get_area() 86 area->x2 = x + ((lv_trigo_sin(start_angle + 90) * rout) >> LV_TRIGO_SHIFT) + extra_area; in lv_draw_arc_get_area() 89 area->x1 = x + ((lv_trigo_sin(end_angle + 90) * rin) >> LV_TRIGO_SHIFT) - extra_area; in lv_draw_arc_get_area() 93 area->x2 = x + ((lv_trigo_sin(start_angle + 90) * rin) >> LV_TRIGO_SHIFT) + extra_area; in lv_draw_arc_get_area() 96 area->x1 = x + ((lv_trigo_sin(end_angle + 90) * rout) >> LV_TRIGO_SHIFT) - extra_area; in lv_draw_arc_get_area() 99 area->x1 = x + ((lv_trigo_sin(start_angle + 90) * rout) >> LV_TRIGO_SHIFT) - extra_area; in lv_draw_arc_get_area() 103 area->x2 = x + ((lv_trigo_sin(end_angle + 90) * rin) >> LV_TRIGO_SHIFT) + extra_area; in lv_draw_arc_get_area() 106 area->x1 = x + ((lv_trigo_sin(start_angle + 90) * rin) >> LV_TRIGO_SHIFT) - extra_area; in lv_draw_arc_get_area() [all …]
|
D | lv_draw_label.c | 118 w = p.x; in lv_draw_label() 127 pos.x = coords->x1; in lv_draw_label() 177 pos.x += (lv_area_get_width(coords) - line_width) / 2; in lv_draw_label() 183 pos.x += lv_area_get_width(coords) - line_width; in lv_draw_label() 213 int32_t pos_x_start = pos.x; in lv_draw_label() 216 pos.x += x_ofs; in lv_draw_label() 292 sel_coords.x1 = pos.x; in lv_draw_label() 294 sel_coords.x2 = pos.x + letter_w + dsc->letter_space - 1; in lv_draw_label() 305 pos.x += letter_w + dsc->letter_space; in lv_draw_label() 312 p1.x = pos_x_start; in lv_draw_label() [all …]
|
/lvgl-3.4.0/src/widgets/ |
D | lv_canvas.c | 81 void lv_canvas_set_px_color(lv_obj_t * obj, lv_coord_t x, lv_coord_t y, lv_color_t c) in lv_canvas_set_px_color() argument 87 lv_img_buf_set_px_color(&canvas->dsc, x, y, c); in lv_canvas_set_px_color() 91 void lv_canvas_set_px_opa(lv_obj_t * obj, lv_coord_t x, lv_coord_t y, lv_opa_t opa) in lv_canvas_set_px_opa() argument 97 lv_img_buf_set_px_alpha(&canvas->dsc, x, y, opa); in lv_canvas_set_px_opa() 115 lv_color_t lv_canvas_get_px(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) in lv_canvas_get_px() argument 122 return lv_img_buf_get_px_color(&canvas->dsc, x, y, color); in lv_canvas_get_px() 137 void lv_canvas_copy_buf(lv_obj_t * obj, const void * to_copy, lv_coord_t x, lv_coord_t y, lv_coord_… in lv_canvas_copy_buf() argument 144 …if(x + w - 1 >= (lv_coord_t)canvas->dsc.header.w || y + h - 1 >= (lv_coord_t)canvas->dsc.header.h)… in lv_canvas_copy_buf() 150 uint32_t px = canvas->dsc.header.w * y * px_size + x * px_size; in lv_canvas_copy_buf() 174 int32_t x; in lv_canvas_transform() local [all …]
|
D | lv_canvas.h | 75 void lv_canvas_set_px_color(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_color_t c); 80 static inline 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 82 lv_canvas_set_px_color(canvas, x, y, c); in lv_canvas_set_px() 92 void lv_canvas_set_px_opa(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_opa_t opa); 118 lv_color_t lv_canvas_get_px(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y); 141 void lv_canvas_copy_buf(lv_obj_t * canvas, const void * to_copy, lv_coord_t x, lv_coord_t y, lv_coo… 196 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, 208 void lv_canvas_draw_text(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t max_w, 219 void lv_canvas_draw_img(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, const void * src, 252 void lv_canvas_draw_arc(lv_obj_t * canvas, lv_coord_t x, lv_coord_t y, lv_coord_t r, int32_t start_…
|
/lvgl-3.4.0/src/extra/libs/qrcode/ |
D | qrcodegen.c | 64 testable uint8_t finiteFieldMultiply(uint8_t x, uint8_t y); 78 testable bool getModule(const uint8_t qrcode[], int x, int y); 79 testable void setModule(uint8_t qrcode[], int x, int y, bool isBlack); 80 testable void setModuleBounded(uint8_t qrcode[], int x, int y, bool isBlack); 81 static bool getBit(int x, int i); 397 testable uint8_t finiteFieldMultiply(uint8_t x, uint8_t y) { in finiteFieldMultiply() argument 402 z ^= ((y >> i) & 1) * x; in finiteFieldMultiply() 581 int x = right - j; // Actual x coordinate in drawCodewords() local 584 if (!getModule(qrcode, x, y) && i < dataLen * 8) { in drawCodewords() 586 setModule(qrcode, x, y, black); in drawCodewords() [all …]
|
/lvgl-3.4.0/src/extra/layouts/grid/ |
D | lv_grid.c | 19 #define IS_FR(x) (x >= LV_COORD_MAX - 100) argument 20 #define IS_CONTENT(x) (x == LV_COORD_MAX - 101) argument 21 #define GET_FR(x) (x - (LV_COORD_MAX - 100)) argument 33 lv_coord_t * x; member 364 hint.grid_abs.x = pad_left + cont->coords.x1 - lv_obj_get_scroll_x(cont); in grid_update() 411 calc_out->x, rev); in calc() 427 lv_mem_buf_release(calc->x); in calc_free() 439 c->x = lv_mem_buf_get(sizeof(lv_coord_t) * c->col_num); in calc_cols() 469 lv_coord_t x = col_templ[i]; in calc_cols() local 470 if(IS_FR(x)) { in calc_cols() [all …]
|
/lvgl-3.4.0/examples/widgets/canvas/ |
D | lv_example_canvas_2.c | 35 uint32_t x; in lv_example_canvas_2() local 38 for( x = 5; x < 20; x++) { in lv_example_canvas_2() 39 lv_canvas_set_px_color(canvas, x, y, c0); in lv_example_canvas_2()
|
/lvgl-3.4.0/src/core/ |
D | lv_indev.c | 192 …lv_obj_set_pos(indev->cursor, indev->proc.types.pointer.act_point.x, indev->proc.types.pointer.act… in lv_indev_set_cursor() 214 point->x = 0; in lv_indev_get_point() 219 point->x = -1; in lv_indev_get_point() 223 point->x = indev->proc.types.pointer.act_point.x; in lv_indev_get_point() 257 point->x = 0; in lv_indev_get_vect() 263 point->x = indev->proc.types.pointer.vect.x; in lv_indev_get_vect() 329 i->proc.types.pointer.last_raw_point.x = data->point.x; in indev_pointer_proc() 333 data->point.x = disp->driver->hor_res - data->point.x - 1; in indev_pointer_proc() 338 data->point.y = data->point.x; in indev_pointer_proc() 339 data->point.x = disp->driver->ver_res - tmp - 1; in indev_pointer_proc() [all …]
|
D | lv_obj_pos.c | 43 void lv_obj_set_pos(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) in lv_obj_set_pos() argument 47 lv_obj_set_x(obj, x); in lv_obj_set_pos() 51 void lv_obj_set_x(lv_obj_t * obj, lv_coord_t x) in lv_obj_set_x() argument 60 if((res_x == LV_RES_OK && v_x.num != x) || res_x == LV_RES_INV) { in lv_obj_set_x() 61 lv_obj_set_style_x(obj, x, 0); in lv_obj_set_x() 351 lv_coord_t x = 0; in lv_obj_align_to() local 370 x = lv_obj_get_content_width(base) / 2 - lv_obj_get_width(obj) / 2 + bleft; in lv_obj_align_to() 374 x = bleft; in lv_obj_align_to() 378 x = lv_obj_get_content_width(base) / 2 - lv_obj_get_width(obj) / 2 + bleft; in lv_obj_align_to() 383 x = lv_obj_get_content_width(base) - lv_obj_get_width(obj) + bleft; in lv_obj_align_to() [all …]
|
D | lv_indev_scroll.c | 51 proc->types.pointer.scroll_sum.x += proc->types.pointer.vect.x; in _lv_indev_scroll_handler() 64 if(proc->types.pointer.vect.x != 0 || proc->types.pointer.vect.y != 0) { in _lv_indev_scroll_handler() 71 diff_x = elastic_diff(scroll_obj, proc->types.pointer.vect.x, sl, sr, LV_DIR_HOR); in _lv_indev_scroll_handler() 89 proc->types.pointer.scroll_sum.x += diff_x; in _lv_indev_scroll_handler() 107 proc->types.pointer.scroll_throw_vect.x = 0; in _lv_indev_scroll_throw_handler() 114 proc->types.pointer.scroll_throw_vect.x = 0; in _lv_indev_scroll_throw_handler() 141 proc->types.pointer.scroll_throw_vect.x = in _lv_indev_scroll_throw_handler() 142 proc->types.pointer.scroll_throw_vect.x * (100 - scroll_throw) / 100; in _lv_indev_scroll_throw_handler() 147 …proc->types.pointer.scroll_throw_vect.x = elastic_diff(scroll_obj, proc->types.pointer.scroll_thro… in _lv_indev_scroll_throw_handler() 150 lv_obj_scroll_by(scroll_obj, proc->types.pointer.scroll_throw_vect.x, 0, LV_ANIM_OFF); in _lv_indev_scroll_throw_handler() [all …]
|
/lvgl-3.4.0/tests/src/ |
D | lv_test_indev.c | 21 data->point.x = x_act; in lv_test_mouse_read_cb() 26 void lv_test_mouse_move_to(lv_coord_t x, lv_coord_t y) in lv_test_mouse_move_to() argument 28 x_act = x; in lv_test_mouse_move_to() 32 void lv_test_mouse_move_by(lv_coord_t x, lv_coord_t y) in lv_test_mouse_move_by() argument 34 x_act += x; in lv_test_mouse_move_by() 48 void lv_test_mouse_click_at(lv_coord_t x, lv_coord_t y) in lv_test_mouse_click_at() argument 52 lv_test_mouse_move_to(x, y); in lv_test_mouse_click_at()
|
/lvgl-3.4.0/src/draw/sdl/ |
D | lv_draw_sdl_stack_blur.c | 99 unsigned int x, y, xp, yp, i; in stack_blur_job() local 152 for(x = 0; x < w; x++) { in stack_blur_job() 190 for(x = minX; x < maxX; x++) { in stack_blur_job() 195 src_ptr = src + x; // x,0 in stack_blur_job() 214 src_ptr = src + (x + yp * w); // img.pix_ptr(x, yp); in stack_blur_job() 215 dst_ptr = src + x; // img.pix_ptr(x, 0); in stack_blur_job()
|
D | lv_draw_sdl_arc.c | 53 area_out.x1 = center->x - radius; in lv_draw_sdl_draw_arc() 55 …area_out.x2 = center->x + radius - 1; /*-1 because the center already belongs to the left/bottom … in lv_draw_sdl_draw_arc() 90 lv_draw_mask_angle_init(&mask_angle_param, center->x, center->y, start_angle, end_angle); in lv_draw_sdl_draw_arc() 167 for(int x = 0; x < rect.w; x++) { in dump_masks() local 168 uint8_t * pixel = &pixels[y * pitch + x * 4]; in dump_masks() 169 *pixel = line_buf[x]; in dump_masks() 184 for(int x = 0; x < rect.w; x++) { in dump_masks() local 185 uint8_t * pixel = &pixels[y * pitch + x * 4]; in dump_masks() 186 uint16_t old_opa = line_buf[x] + *pixel; in dump_masks() 235 lv_area_move(out, center->x, center->y); in get_cap_area()
|