Home
last modified time | relevance | path

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

12345678910>>...14

/lvgl-latest/src/misc/
Dlv_math.c126 int32_t lv_cubic_bezier(int32_t x, int32_t x1, int32_t y1, int32_t x2, int32_t y2) in lv_cubic_bezier() argument
137 if(x == 0 || x == LV_BEZIER_VAL_MAX) return x; in lv_cubic_bezier()
142 x <<= CUBIC_PRECISION_BITS - LV_BEZIER_VAL_SHIFT; in lv_cubic_bezier()
158 t = x; /*Make a guess*/ in lv_cubic_bezier()
161 xs = do_cubic_bezier(t, ax, bx, cx) - x; in lv_cubic_bezier()
178 tl = 0, tr = 1L << CUBIC_PRECISION_BITS, t = x; in lv_cubic_bezier()
192 if(LV_ABS(xs - x) <= 1) goto found; in lv_cubic_bezier()
193 x > xs ? (tl = t) : (tr = t); in lv_cubic_bezier()
208 void LV_ATTRIBUTE_FAST_MEM lv_sqrt(uint32_t x, lv_sqrt_res_t * q, uint32_t mask) in lv_sqrt() argument
210 x = x << 8; /*To get 4 bit precision. (sqrt(256) = 16 = 4 bit)*/ in lv_sqrt()
[all …]
Dlv_area.h32 int32_t x; member
37 lv_value_precise_t x; member
194 void lv_point_set(lv_point_t * p, int32_t x, int32_t y);
196 void lv_point_precise_set(lv_point_precise_t * p, lv_value_precise_t x, lv_value_precise_t y);
209 #define LV_COORD_TYPE(x) ((x) & LV_COORD_TYPE_MASK) /*Extract type specifiers*/ argument
210 #define LV_COORD_PLAIN(x) ((x) & ~LV_COORD_TYPE_MASK) /*Remove type specifiers*/ argument
216 #define LV_COORD_IS_PX(x) (LV_COORD_TYPE(x) == LV_COORD_TYPE_PX || LV_COORD_TYPE(x) == LV_COO… argument
217 #define LV_COORD_IS_SPEC(x) (LV_COORD_TYPE(x) == LV_COORD_TYPE_SPEC) argument
219 #define LV_COORD_SET_SPEC(x) ((x) | LV_COORD_TYPE_SPEC) argument
232 #define LV_PCT(x) (LV_COORD_SET_SPEC(((x) < 0 ? (LV_PCT_POS_MAX - LV_MAX((x), -LV_PCT… argument
[all …]
Dlv_math.h30 #define LV_ALIGN_UP(x, align) (((x) + ((align) - 1)) & ~((align) - 1)) argument
33 #define LV_ROUND_UP(x, round) ((((x) + ((round) - 1)) / (round)) * (round)) argument
69 int32_t lv_cubic_bezier(int32_t x, int32_t x1, int32_t y1, int32_t x2, int32_t y2);
89 uint16_t lv_atan2(int x, int y);
103 void /* LV_ATTRIBUTE_FAST_MEM */ lv_sqrt(uint32_t x, lv_sqrt_res_t * q, uint32_t mask);
111 int32_t /* LV_ATTRIBUTE_FAST_MEM */ lv_sqrt32(uint32_t x);
118 static inline int32_t lv_sqr(int32_t x) in lv_sqr() argument
120 return x * x; in lv_sqr()
140 int32_t lv_map(int32_t x, int32_t min_in, int32_t max_in, int32_t min_out, int32_t max_out);
169 #define LV_ABS(x) ((x) > 0 ? (x) : (-(x))) argument
[all …]
Dlv_area.c59 void lv_area_set_pos(lv_area_t * area_p, int32_t x, int32_t y) in lv_area_set_pos() argument
63 area_p->x1 = x; in lv_area_set_pos()
188 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()
319 int32_t x; in lv_area_align() local
323 x = lv_area_get_width(base) / 2 - lv_area_get_width(to_align) / 2; in lv_area_align()
328 x = 0; in lv_area_align()
332 x = lv_area_get_width(base) / 2 - lv_area_get_width(to_align) / 2; in lv_area_align()
337 x = lv_area_get_width(base) - lv_area_get_width(to_align); in lv_area_align()
342 x = 0; in lv_area_align()
346 x = lv_area_get_width(base) / 2 - lv_area_get_width(to_align) / 2; in lv_area_align()
[all …]
/lvgl-latest/tests/unity/
Dunity_support.c173 int x, y; in screenshot_compare() local
177 for(x = 0; x < p.width; x++) { in screenshot_compare()
178 ptr_ref = &(row[x * 3]); in screenshot_compare()
194 fn_ref_full, mode, x, y, ref_px, act_px, tolerance); in screenshot_compare()
345 for(uint32_t x = 0; x < width; x++) { in write_png_file() local
346 row_pointers[y][x * 3 + 0] = line[x * 4 + 0]; in write_png_file()
347 row_pointers[y][x * 3 + 1] = line[x * 4 + 1]; in write_png_file()
348 row_pointers[y][x * 3 + 2] = line[x * 4 + 2]; in write_png_file()
390 uint32_t x; in buf_to_xrgb8888() local
391 for(x = 0; x < 800; x++) { in buf_to_xrgb8888()
[all …]
/lvgl-latest/src/draw/sw/blend/
Dlv_draw_sw_blend_to_al88.c209 int32_t x; in lv_draw_sw_blend_color_to_al88() local
214 LV_UNUSED(x); in lv_draw_sw_blend_color_to_al88()
229 for(x = 0; x < w - 16; x += 16) { in lv_draw_sw_blend_color_to_al88()
230 dest_buf[x + 0] = color16a; in lv_draw_sw_blend_color_to_al88()
231 dest_buf[x + 1] = color16a; in lv_draw_sw_blend_color_to_al88()
232 dest_buf[x + 2] = color16a; in lv_draw_sw_blend_color_to_al88()
233 dest_buf[x + 3] = color16a; in lv_draw_sw_blend_color_to_al88()
235 dest_buf[x + 4] = color16a; in lv_draw_sw_blend_color_to_al88()
236 dest_buf[x + 5] = color16a; in lv_draw_sw_blend_color_to_al88()
237 dest_buf[x + 6] = color16a; in lv_draw_sw_blend_color_to_al88()
[all …]
Dlv_draw_sw_blend_to_argb8888.c221 int32_t x; in lv_draw_sw_blend_color_to_argb8888() local
226 LV_UNUSED(x); in lv_draw_sw_blend_color_to_argb8888()
239 for(x = 0; x < w - 16; x += 16) { in lv_draw_sw_blend_color_to_argb8888()
240 dest_buf[x + 0] = color32; in lv_draw_sw_blend_color_to_argb8888()
241 dest_buf[x + 1] = color32; in lv_draw_sw_blend_color_to_argb8888()
242 dest_buf[x + 2] = color32; in lv_draw_sw_blend_color_to_argb8888()
243 dest_buf[x + 3] = color32; in lv_draw_sw_blend_color_to_argb8888()
245 dest_buf[x + 4] = color32; in lv_draw_sw_blend_color_to_argb8888()
246 dest_buf[x + 5] = color32; in lv_draw_sw_blend_color_to_argb8888()
247 dest_buf[x + 6] = color32; in lv_draw_sw_blend_color_to_argb8888()
[all …]
/lvgl-latest/src/libs/thorvg/rapidjson/
Drapidjson.h50 #define RAPIDJSON_STRINGIFY(x) RAPIDJSON_DO_STRINGIFY(x) argument
51 #define RAPIDJSON_DO_STRINGIFY(x) #x argument
307 #define RAPIDJSON_ALIGN(x) (((x) + static_cast<size_t>(7u)) & ~static_cast<size_t>(7u)) argument
346x) (p = reinterpret_cast<type *>((reinterpret_cast<uintptr_t>(p) & static_cast<uintptr_t>(RAPIDJSO… argument
349 #define RAPIDJSON_SETPOINTER(type, p, x) (p = (x)) argument
437 #define RAPIDJSON_ASSERT(x) assert(x) argument
446 #define RAPIDJSON_STATIC_ASSERT(x) \ argument
447 static_assert(x, RAPIDJSON_STRINGIFY(x))
457 template <bool x> struct STATIC_ASSERTION_FAILURE;
459 template <size_t x> struct StaticAssertTest {};
[all …]
/lvgl-latest/src/draw/vg_lite/
Dlv_vg_lite_math.h35 #define MATH_TANF(x) tanf(x) argument
36 #define MATH_SINF(x) sinf(x) argument
37 #define MATH_COSF(x) cosf(x) argument
38 #define MATH_ASINF(x) asinf(x) argument
39 #define MATH_ACOSF(x) acosf(x) argument
40 #define MATH_FABSF(x) fabsf(x) argument
41 #define MATH_SQRTF(x) sqrtf(x) argument
Dlv_draw_vg_lite_border.c37 int32_t x, int32_t y, int32_t w, int32_t h,
118 int32_t x, int32_t y, int32_t w, int32_t h, in path_append_inner_rect() argument
139 x + border_w, y + border_w, in path_append_inner_rect()
169 x + x_offset, in path_append_inner_rect()
182 const float c1_x = x + r; in path_append_inner_rect()
184 const float c2_x = x + w - r; in path_append_inner_rect()
193 const float p1_x = x; in path_append_inner_rect()
195 const float p2_x = x; in path_append_inner_rect()
197 const float p3_x = x + r; in path_append_inner_rect()
199 const float p4_x = x + border_w; in path_append_inner_rect()
[all …]
/lvgl-latest/src/libs/thorvg/
DtvgSwRle.cpp215 SwCoord x; member
264 …return {SwCoord(((unsigned long) pt.x) << (PIXEL_BITS - 6)), SwCoord(((unsigned long) pt.y) << (PI… in UPSCALE()
270 return {pt.x >> PIXEL_BITS, pt.y >> PIXEL_BITS}; in TRUNC()
274 static inline SwCoord TRUNC(const SwCoord x) in TRUNC() argument
276 return x >> PIXEL_BITS; in TRUNC()
282 …return {SwCoord(((unsigned long) pt.x) << PIXEL_BITS), SwCoord(((unsigned long) pt.y) << PIXEL_BIT… in SUBPIXELS()
286 static inline SwCoord SUBPIXELS(const SwCoord x) in SUBPIXELS() argument
288 return SwCoord(((unsigned long) x) << PIXEL_BITS); in SUBPIXELS()
298 if (pt.x < 0) pt.x = -pt.x; in HYPOT()
300 return ((pt.x > pt.y) ? (pt.x + (3 * pt.y >> 3)) : (pt.y + (3 * pt.x >> 3))); in HYPOT()
[all …]
DtvgRender.cpp54 auto x1 = x + w; in intersect()
56 auto x2 = rhs.x + rhs.w; in intersect()
59 x = (x > rhs.x) ? x : rhs.x; in intersect()
61 w = ((x1 < x2) ? x1 : x2) - x; in intersect()
71 if (rhs.x < x) { in add()
72 w += (x - rhs.x); in add()
73 x = rhs.x; in add()
79 if (rhs.x + rhs.w > x + w) w = (rhs.x + rhs.w) - x; in add()
DtvgMath.cpp40 Point diff = {pt2.x - pt1.x, pt2.y - pt1.y}; in _lineLengthApprox()
41 if (diff.x < 0) diff.x = -diff.x; in _lineLengthApprox()
43 return (diff.x > diff.y) ? (diff.x + diff.y * 0.375f) : (diff.y + diff.x * 0.375f); in _lineLengthApprox()
49 Point diff = {pt2.x - pt1.x, pt2.y - pt1.y}; in _lineLength()
50 return sqrtf(diff.x * diff.x + diff.y * diff.y); in _lineLength()
107 float atan2(float y, float x) in atan2() argument
109 if (y == 0.0f && x == 0.0f) return 0.0f; in atan2()
110 auto a = std::min(fabsf(x), fabsf(y)) / std::max(fabsf(x), fabsf(y)); in atan2()
113 if (fabsf(y) > fabsf(x)) r = 1.57079637f - r; in atan2()
114 if (x < 0) r = 3.14159274f - r; in atan2()
[all …]
DtvgSwMath.cpp170 pt.x = SwCoord(nearbyint((v.x * cosv - v.y * sinv) * 64.0f)); in mathRotate()
171 pt.y = SwCoord(nearbyint((v.x * sinv + v.y * cosv) * 64.0f)); in mathRotate()
185 return SwFixed(tvg::atan2(TO_FLOAT(pt.y), TO_FLOAT(pt.x)) * (180.0f / MATH_PI) * 65536.0f); in mathAtan()
207 if (pt.x == 0) return abs(pt.y); in mathLength()
208 if (pt.y == 0) return abs(pt.x); in mathLength()
216 if (v.x < 0) v.x = -v.x; in mathLength()
218 return static_cast<SwFixed>((v.x > v.y) ? (v.x + v.y * 0.375f) : (v.y + v.x * 0.375f)); in mathLength()
226 base[6].x = base[3].x; in mathSplitCubic()
227 c = base[1].x; in mathSplitCubic()
228 d = base[2].x; in mathSplitCubic()
[all …]
DtvgMath.h47 float atan2(float y, float x);
126 static inline void scaleR(Matrix* m, float x, float y) in scaleR() argument
128 if (x != 1.0f) { in scaleR()
129 m->e11 *= x; in scaleR()
130 m->e21 *= x; in scaleR()
139 static inline void translate(Matrix* m, float x, float y) in translate() argument
141 m->e13 += x; in translate()
146 static inline void translateR(Matrix* m, float x, float y) in translateR() argument
148 if (x == 0.0f && y == 0.0f) return; in translateR()
149 m->e13 += (x * m->e11 + y * m->e12); in translateR()
[all …]
DtvgSwRaster.cpp45 …void operator()(const SwFill* fill, uint8_t* dst, uint32_t y, uint32_t x, uint32_t len, SwMask op,… in operator ()()
47 fillLinear(fill, dst, y, x, len, op, a); in operator ()()
50 …void operator()(const SwFill* fill, uint8_t* dst, uint32_t y, uint32_t x, uint32_t len, uint8_t* c… in operator ()()
52 fillLinear(fill, dst, y, x, len, cmp, op, a); in operator ()()
55 …void operator()(const SwFill* fill, uint32_t* dst, uint32_t y, uint32_t x, uint32_t len, SwBlender… in operator ()()
57 fillLinear(fill, dst, y, x, len, op, a); in operator ()()
60 …void operator()(const SwFill* fill, uint32_t* dst, uint32_t y, uint32_t x, uint32_t len, uint8_t* … in operator ()()
62 fillLinear(fill, dst, y, x, len, cmp, alpha, csize, opacity); in operator ()()
65 …void operator()(const SwFill* fill, uint32_t* dst, uint32_t y, uint32_t x, uint32_t len, SwBlender… in operator ()()
67 fillLinear(fill, dst, y, x, len, op, op2, a); in operator ()()
[all …]
DtvgLottieInterpolator.cpp83 auto initialSlope = _getSlope(guessForT, outTangent.x, inTangent.x); in getTForX()
92 float x, t; in binarySubdivide() local
97 x = _calcBezier(t, outTangent.x, inTangent.x) - aX; in binarySubdivide()
98 if (x > 0.0f) aB = t; in binarySubdivide()
100 } while (fabsf(x) > SUBDIVISION_PRECISION && ++i < SUBDIVISION_MAX_ITERATIONS); in binarySubdivide()
111 auto currentX = _calcBezier(aGuessT, outTangent.x, inTangent.x) - aX; in NewtonRaphsonIterate()
112 auto currentSlope = _getSlope(aGuessT, outTangent.x, inTangent.x); in NewtonRaphsonIterate()
126 if (outTangent.x == outTangent.y && inTangent.x == inTangent.y) return t; in progress()
137 if (outTangent.x == outTangent.y && inTangent.x == inTangent.y) return; in set()
141 samples[i] = _calcBezier(float(i) * SAMPLE_STEP_SIZE, outTangent.x, inTangent.x); in set()
DtvgSwRasterC.h75 auto dst = &surface->buf32[span->y * surface->stride + span->x]; in cRasterTranslucentRle()
79 for (uint32_t x = 0; x < span->len; ++x, ++dst) { in cRasterTranslucentRle() local
87 auto dst = &surface->buf8[span->y * surface->stride + span->x]; in cRasterTranslucentRle()
91 for (uint32_t x = 0; x < span->len; ++x, ++dst) { in cRasterTranslucentRle() local
103 auto w = static_cast<uint32_t>(region.max.x - region.min.x); in cRasterTranslucentRect()
108 auto buffer = surface->buf32 + (region.min.y * surface->stride) + region.min.x; in cRasterTranslucentRect()
112 for (uint32_t x = 0; x < w; ++x, ++dst) { in cRasterTranslucentRect() local
118 auto buffer = surface->buf8 + (region.min.y * surface->stride) + region.min.x; in cRasterTranslucentRect()
122 for (uint32_t x = 0; x < w; ++x, ++dst) { in cRasterTranslucentRect() local
140 for (uint32_t x = 0; x < surface->w / 2; ++x, ++dst) { in cRasterABGRtoARGB() local
[all …]
DtvgSwRasterTexmap.h39 int32_t x[2]; member
92 int32_t x1, x2, x, y, ar, ab, iru, irv, px, ay;
104 minx = region->min.x;
105 maxx = region->max.x;
125 if (minx > span->x) minx = span->x;
126 if (maxx < span->x + span->len) maxx = span->x + span->len;
136 if (aaSpans->lines[ay].x[0] > x1) aaSpans->lines[ay].x[0] = x1;
137 if (aaSpans->lines[ay].x[1] < x2) aaSpans->lines[ay].x[1] = x2;
147 x = x1;
154 while (x++ < x2) {
[all …]
/lvgl-latest/libs/nema_gfx/include/
Dnema_math.h108 float nema_atan2(float y, float x);
117 float nema_atan2_r(float y, float x);
126 float nema_pow(float x, float y);
135 float nema_sqrt(float x);
144 float nema_atan(float x);
198 #define nema_floats_equal(x, y) (nema_absf((x) - (y)) <= 0.00001f * nema_min2(nema_absf(x), nema_ab… argument
206 #define nema_float_is_zero(x) (nema_absf(x) <= 0.00001f) argument
263 #define nema_truncf(x) (x < 0.0f ? nema_ceil(x) : nema_floor(x)) argument
272 #define nema_fmod(x, y) ( (x) - nema_truncf( ( (x) / (y) ) ) * (y) ) argument
/lvgl-latest/examples/widgets/canvas/
Dlv_example_canvas_2.c27 uint32_t x; in lv_example_canvas_2() local
30 for(x = 5; x < 75; x++) { in lv_example_canvas_2()
31 lv_canvas_set_px(canvas, x, y, lv_palette_main(LV_PALETTE_BLUE), LV_OPA_50); in lv_example_canvas_2()
36 for(x = 5; x < 75; x++) { in lv_example_canvas_2()
37 lv_canvas_set_px(canvas, x, y, lv_palette_main(LV_PALETTE_BLUE), LV_OPA_20); in lv_example_canvas_2()
42 for(x = 5; x < 75; x++) { in lv_example_canvas_2()
43 lv_canvas_set_px(canvas, x, y, lv_palette_main(LV_PALETTE_BLUE), LV_OPA_0); in lv_example_canvas_2()
/lvgl-latest/tests/src/test_cases/widgets/
Dtest_label.c63 .x = 0, in test_label_get_letter_pos_align_left()
67 .x = 29, in test_label_get_letter_pos_align_left()
76 TEST_ASSERT_EQUAL(expected_first_letter_point.x, first_letter_point.x); in test_label_get_letter_pos_align_left()
81 TEST_ASSERT_EQUAL(expected_last_letter_point.x, last_letter_point.x); in test_label_get_letter_pos_align_left()
91 .x = 0, in test_label_get_letter_pos_align_left_on_empty_text()
95 .x = 0, in test_label_get_letter_pos_align_left_on_empty_text()
104 TEST_ASSERT_EQUAL(expected_first_letter_point.x, first_letter_point.x); in test_label_get_letter_pos_align_left_on_empty_text()
109 TEST_ASSERT_EQUAL(expected_last_letter_point.x, last_letter_point.x); in test_label_get_letter_pos_align_left_on_empty_text()
120 .x = 0, in test_label_long_text_multiline_get_letter_pos_align_left()
124 .x = 305, in test_label_long_text_multiline_get_letter_pos_align_left()
[all …]
/lvgl-latest/src/draw/sw/
Dlv_draw_sw_transform.c125 tr_dsc.pivot_x_256 = tr_dsc.pivot.x * 256; in lv_draw_sw_transform()
178 … int32_t x_max = (((src_w - 1 - draw_dsc->pivot.x) * draw_dsc->scale_x) >> 8) + draw_dsc->pivot.x; in lv_draw_sw_transform()
299 int32_t x; in transform_rgb888() local
300 for(x = 0; x < x_end; x++) { in transform_rgb888()
301 xs_ups = xs_ups_start + ((xs_step * x) >> 8); in transform_rgb888()
302 ys_ups = ys_ups_start + ((ys_step * x) >> 8); in transform_rgb888()
309 dest_c32[x].alpha = 0x00; in transform_rgb888()
339 dest_c32[x].red = src_u8[2]; in transform_rgb888()
340 dest_c32[x].green = src_u8[1]; in transform_rgb888()
341 dest_c32[x].blue = src_u8[0]; in transform_rgb888()
[all …]
Dlv_draw_sw_utils.c229 for(uint32_t x = 0; x < width; x++) { in lv_draw_sw_i1_convert_to_vtiled() local
230 uint32_t src_index = y * width + x; in lv_draw_sw_i1_convert_to_vtiled()
231 uint32_t dst_index = x * height + y; in lv_draw_sw_i1_convert_to_vtiled()
354 for(int32_t x = 0; x < src_width; ++x) { in rotate270_argb8888() local
355 int32_t dstIndex = x * dst_stride; in rotate270_argb8888()
356 int32_t srcIndex = x; in rotate270_argb8888()
378 for(int32_t x = 0; x < width; ++x) { in rotate180_argb8888() local
379 dst[dstIndex + width - x - 1] = src[srcIndex + x]; in rotate180_argb8888()
394 for(int32_t x = 0; x < src_width; ++x) { in rotate90_argb8888() local
395 int32_t dstIndex = (src_width - x - 1); in rotate90_argb8888()
[all …]
/lvgl-latest/src/libs/tiny_ttf/
Dstb_rect_pack.h133 stbrp_coord x, y; member
181 stbrp_coord x, y; member
280 context->extra[0].x = 0; in stbrp_init_target()
283 context->extra[1].x = (stbrp_coord) width; in stbrp_init_target()
297 STBRP_ASSERT(first->x <= x0); in stbrp__skyline_find_min_y()
301 while(node->next->x <= x0) in stbrp__skyline_find_min_y()
304 STBRP_ASSERT(node->next->x > x0); // we ended up handling this in the caller for efficiency in stbrp__skyline_find_min_y()
307 STBRP_ASSERT(node->x <= x0); in stbrp__skyline_find_min_y()
312 while(node->x < x1) { in stbrp__skyline_find_min_y()
320 if(node->x < x0) in stbrp__skyline_find_min_y()
[all …]

12345678910>>...14