Home
last modified time | relevance | path

Searched refs:x (Results 1 – 25 of 160) sorted by relevance

1234567

/lvgl-3.5.0/src/draw/sw/
Dlv_draw_sw_blend.c79 #define MAP_NORMAL_MASK_PX(x) \ argument
81 if(*mask_tmp_x == LV_OPA_COVER) dest_buf[x] = src_buf[x]; \
82 else dest_buf[x] = lv_color_mix(src_buf[x], dest_buf[x], *mask_tmp_x); \
212 int32_t x; in fill_set_px() local
217 for(x = blend_area->x1; x <= blend_area->x2; x++) { in fill_set_px()
218 … disp->driver->set_px_cb(disp->driver, (void *)dest_buf, dest_stride, x, y, color, opa); in fill_set_px()
227 for(x = 0; x < w; x++) { in fill_set_px()
228 if(mask[x]) { in fill_set_px()
231 …er->set_px_cb(disp->driver, (void *)dest_buf, dest_stride, blend_area->x1 + x, blend_area->y1 + y,… in fill_set_px()
232 (uint32_t)((uint32_t)opa * mask[x]) >> 8); in fill_set_px()
[all …]
Dlv_draw_sw_transform.c105 tr_dsc.pivot_x_256 = tr_dsc.pivot.x * 256; in lv_draw_sw_transform()
171 lv_coord_t x; in rgb_no_aa() local
172 for(x = 0; x < x_end; x++) { in rgb_no_aa()
173 xs_ups = xs_ups_start + ((xs_step * x) >> 8); in rgb_no_aa()
174 ys_ups = ys_ups_start + ((ys_step * x) >> 8); in rgb_no_aa()
179 abuf[x] = 0x00; in rgb_no_aa()
186 cbuf[x].full = src_tmp[0]; in rgb_no_aa()
190 cbuf[x] = *src_tmp; in rgb_no_aa()
194 cbuf[x].full = *((uint32_t *)src_tmp); in rgb_no_aa()
197 if(cf == LV_IMG_CF_TRUE_COLOR_CHROMA_KEYED && cbuf[x].full == ck.full) { in rgb_no_aa()
[all …]
Dlv_draw_sw_line.c58 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 …]
Dlv_draw_sw_dither.c20 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 …]
Dlv_draw_sw_polygon.c61 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 …]
Dlv_draw_sw_arc.c85 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()
131 lv_draw_mask_angle_init(&mask_angle_param, center->x, center->y, start_angle, end_angle); in lv_draw_sw_arc()
183 round_area.x1 += center->x; in lv_draw_sw_arc()
184 round_area.x2 += center->x; in lv_draw_sw_arc()
199 round_area.x1 += center->x; in lv_draw_sw_arc()
200 round_area.x2 += center->x; in lv_draw_sw_arc()
238 …quarter_area.x2 = q->center->x + ((lv_trigo_sin(q->start_angle + 90) * (q->radius)) >> LV_TRIGO_SH… in draw_quarter_0()
241 …quarter_area.x1 = q->center->x + ((lv_trigo_sin(q->end_angle + 90) * (q->radius - q->width)) >> LV… in draw_quarter_0()
252 quarter_area.x1 = q->center->x; in draw_quarter_0()
[all …]
/lvgl-3.5.0/src/draw/
Dlv_img_buf.c51 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 …]
Dlv_draw_arc.c57 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 …]
Dlv_draw_label.c118 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.5.0/src/misc/
Dlv_area.h38 lv_coord_t x; member
158 void _lv_area_set_pos(lv_area_t * area_p, lv_coord_t x, lv_coord_t y);
252 #define _LV_COORD_TYPE(x) ((x) & _LV_COORD_TYPE_MASK) /*Extract type specifiers*/ argument
253 #define _LV_COORD_PLAIN(x) ((x) & ~_LV_COORD_TYPE_MASK) /*Remove type specifiers*/ argument
259 #define LV_COORD_IS_PX(x) (_LV_COORD_TYPE(x) == _LV_COORD_TYPE_PX || \ argument
260 _LV_COORD_TYPE(x) == _LV_COORD_TYPE_PX_NEG ? true : false)
261 #define LV_COORD_IS_SPEC(x) (_LV_COORD_TYPE(x) == _LV_COORD_TYPE_SPEC ? true : false) argument
263 #define LV_COORD_SET_SPEC(x) ((x) | _LV_COORD_TYPE_SPEC) argument
266 #define LV_PCT(x) (x < 0 ? LV_COORD_SET_SPEC(1000 - (x)) : LV_COORD_SET_SPEC(x)) argument
267 #define LV_COORD_IS_PCT(x) ((LV_COORD_IS_SPEC(x) && _LV_COORD_PLAIN(x) <= 2000) ? true : false) argument
[all …]
Dlv_math.c109 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(max_in >= min_in && x >= max_in) return max_out; in lv_map()
239 if(max_in >= min_in && x <= min_in) return min_out; in lv_map()
[all …]
Dlv_area.c82 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 …]
Dlv_types.h72 #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
Dlv_math.h73 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.5.0/src/extra/libs/qrcode/
Dqrcodegen.c64 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.5.0/src/core/
Dlv_obj_pos.c44 void lv_obj_set_pos(lv_obj_t * obj, lv_coord_t x, lv_coord_t y) in lv_obj_set_pos() argument
48 lv_obj_set_x(obj, x); in lv_obj_set_pos()
52 void lv_obj_set_x(lv_obj_t * obj, lv_coord_t x) in lv_obj_set_x() argument
61 if((res_x == LV_RES_OK && v_x.num != x) || res_x == LV_RES_INV) { in lv_obj_set_x()
62 lv_obj_set_style_x(obj, x, 0); in lv_obj_set_x()
354 lv_coord_t x = 0; in lv_obj_align_to() local
373 x = lv_obj_get_content_width(base) / 2 - lv_obj_get_width(obj) / 2 + bleft; in lv_obj_align_to()
377 x = bleft; in lv_obj_align_to()
381 x = lv_obj_get_content_width(base) / 2 - lv_obj_get_width(obj) / 2 + bleft; in lv_obj_align_to()
386 x = lv_obj_get_content_width(base) - lv_obj_get_width(obj) + bleft; in lv_obj_align_to()
[all …]
Dlv_indev.c202 …lv_obj_set_pos(indev->cursor, indev->proc.types.pointer.act_point.x, indev->proc.types.pointer.act… in lv_indev_set_cursor()
224 point->x = 0; in lv_indev_get_point()
229 point->x = -1; in lv_indev_get_point()
233 point->x = indev->proc.types.pointer.act_point.x; in lv_indev_get_point()
267 point->x = 0; in lv_indev_get_vect()
273 point->x = indev->proc.types.pointer.vect.x; in lv_indev_get_vect()
344 i->proc.types.pointer.last_raw_point.x = data->point.x; in indev_pointer_proc()
348 data->point.x = disp->driver->hor_res - data->point.x - 1; in indev_pointer_proc()
353 data->point.y = data->point.x; in indev_pointer_proc()
354 data->point.x = disp->driver->ver_res - tmp - 1; in indev_pointer_proc()
[all …]
/lvgl-3.5.0/src/widgets/
Dlv_canvas.c82 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
88 lv_img_buf_set_px_color(&canvas->dsc, x, y, c); in lv_canvas_set_px_color()
92 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
98 lv_img_buf_set_px_alpha(&canvas->dsc, x, y, opa); in lv_canvas_set_px_opa()
116 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
123 return lv_img_buf_get_px_color(&canvas->dsc, x, y, color); in lv_canvas_get_px()
138 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
145 …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()
151 uint32_t px = canvas->dsc.header.w * y * px_size + x * px_size; in lv_canvas_copy_buf()
172 int32_t x; in lv_canvas_transform() local
[all …]
Dlv_canvas.h75 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.5.0/src/extra/layouts/grid/
Dlv_grid.c19 #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.5.0/examples/widgets/canvas/
Dlv_example_canvas_2.c35 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.5.0/tests/src/
Dlv_test_indev.c21 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.5.0/src/draw/sdl/
Dlv_draw_sdl_stack_blur.c99 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()
Dlv_draw_sdl_arc.c53 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()
/lvgl-3.5.0/tests/unity/
Dunity_support.c85 int x, y, i_buf = 0; in lv_test_assert_img_eq() local
89 for (x = 0; x < p.width; x++) { in lv_test_assert_img_eq()
90 ptr_ref = &(row[x*3]); in lv_test_assert_img_eq()
118 fprintf(f, "//Diff in %s at (%d;%d), %x instead of %x)\n\n", fn_ref, x, y, act_px, ref_px); in lv_test_assert_img_eq()
124 for (x = 0; x < 800; x++) { in lv_test_assert_img_eq()

1234567