Lines Matching +full:- +full:p
26 static bool lv_point_within_circle(const lv_area_t * area, const lv_point_t * p);
50 area_p->x1 = x1; in lv_area_set()
51 area_p->y1 = y1; in lv_area_set()
52 area_p->x2 = x2; in lv_area_set()
53 area_p->y2 = y2; in lv_area_set()
63 area_p->x2 = area_p->x1 + w - 1; in lv_area_set_width()
73 area_p->y2 = area_p->y1 + h - 1; in lv_area_set_height()
86 area_p->x1 = x; in _lv_area_set_pos()
87 area_p->y1 = y; in _lv_area_set_pos()
101 size = (uint32_t)(area_p->x2 - area_p->x1 + 1) * (area_p->y2 - area_p->y1 + 1); in lv_area_get_size()
108 area->x1 -= w_extra; in lv_area_increase()
109 area->x2 += w_extra; in lv_area_increase()
110 area->y1 -= h_extra; in lv_area_increase()
111 area->y2 += h_extra; in lv_area_increase()
116 area->x1 += x_ofs; in lv_area_move()
117 area->x2 += x_ofs; in lv_area_move()
118 area->y1 += y_ofs; in lv_area_move()
119 area->y2 += y_ofs; in lv_area_move()
132 res_p->x1 = LV_MAX(a1_p->x1, a2_p->x1); in _lv_area_intersect()
133 res_p->y1 = LV_MAX(a1_p->y1, a2_p->y1); in _lv_area_intersect()
134 res_p->x2 = LV_MIN(a1_p->x2, a2_p->x2); in _lv_area_intersect()
135 res_p->y2 = LV_MIN(a1_p->y2, a2_p->y2); in _lv_area_intersect()
139 if((res_p->x1 > res_p->x2) || (res_p->y1 > res_p->y2)) { in _lv_area_intersect()
151 * @return number of results or -1 if no intersect
156 if(!_lv_area_is_on(a1_p, a2_p)) return -1; in _lv_area_diff()
166 lv_coord_t a1_w = lv_area_get_width(a1_p) - 1; in _lv_area_diff()
167 lv_coord_t a1_h = lv_area_get_height(a1_p) - 1; in _lv_area_diff()
170 lv_coord_t th = a2_p->y1 - a1_p->y1; in _lv_area_diff()
172 n.x1 = a1_p->x1; in _lv_area_diff()
173 n.y1 = a1_p->y1; in _lv_area_diff()
174 n.x2 = a1_p->x2; in _lv_area_diff()
175 n.y2 = a1_p->y1 + th; in _lv_area_diff()
180 lv_coord_t bh = a1_h - (a2_p->y2 - a1_p->y1); in _lv_area_diff()
181 if(bh > 0 && a2_p->y2 < a1_p->y2) { in _lv_area_diff()
182 n.x1 = a1_p->x1; in _lv_area_diff()
183 n.y1 = a2_p->y2; in _lv_area_diff()
184 n.x2 = a1_p->x2; in _lv_area_diff()
185 n.y2 = a2_p->y2 + bh; in _lv_area_diff()
190 lv_coord_t y1 = a2_p->y1 > a1_p->y1 ? a2_p->y1 : a1_p->y1; in _lv_area_diff()
191 lv_coord_t y2 = a2_p->y2 < a1_p->y2 ? a2_p->y2 : a1_p->y2; in _lv_area_diff()
192 lv_coord_t sh = y2 - y1; in _lv_area_diff()
195 lv_coord_t lw = a2_p->x1 - a1_p->x1; in _lv_area_diff()
197 n.x1 = a1_p->x1; in _lv_area_diff()
199 n.x2 = a1_p->x1 + lw; in _lv_area_diff()
205 lv_coord_t rw = a1_w - (a2_p->x2 - a1_p->x1); in _lv_area_diff()
207 n.x1 = a2_p->x2; in _lv_area_diff()
209 n.x2 = a2_p->x2 + rw; in _lv_area_diff()
226 a_res_p->x1 = LV_MIN(a1_p->x1, a2_p->x1); in _lv_area_join()
227 a_res_p->y1 = LV_MIN(a1_p->y1, a2_p->y1); in _lv_area_join()
228 a_res_p->x2 = LV_MAX(a1_p->x2, a2_p->x2); in _lv_area_join()
229 a_res_p->y2 = LV_MAX(a1_p->y2, a2_p->y2); in _lv_area_join()
243 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()
262 corner_area.x1 = a_p->x1; in _lv_area_is_point_on()
263 corner_area.x2 = a_p->x1 + radius; in _lv_area_is_point_on()
264 corner_area.y1 = a_p->y1; in _lv_area_is_point_on()
265 corner_area.y2 = a_p->y1 + radius; in _lv_area_is_point_on()
272 corner_area.y1 = a_p->y2 - radius; in _lv_area_is_point_on()
273 corner_area.y2 = a_p->y2; in _lv_area_is_point_on()
276 corner_area.y1 -= radius; in _lv_area_is_point_on()
280 corner_area.x1 = a_p->x2 - radius; in _lv_area_is_point_on()
281 corner_area.x2 = a_p->x2; in _lv_area_is_point_on()
283 corner_area.x1 -= radius; in _lv_area_is_point_on()
284 corner_area.y1 -= radius; in _lv_area_is_point_on()
288 corner_area.y1 = a_p->y1; in _lv_area_is_point_on()
289 corner_area.y2 = a_p->y1 + radius; in _lv_area_is_point_on()
291 corner_area.x1 -= radius; in _lv_area_is_point_on()
307 …if((a1_p->x1 <= a2_p->x2) && (a1_p->x2 >= a2_p->x1) && (a1_p->y1 <= a2_p->y2) && (a1_p->y2 >= a2_p… in _lv_area_is_on()
326 if(ain_p->x1 >= aholder_p->x1 && ain_p->y1 >= aholder_p->y1 && ain_p->x2 <= aholder_p->x2 && in _lv_area_is_in()
327 ain_p->y2 <= aholder_p->y2) { in _lv_area_is_in()
335 lv_point_t p; in _lv_area_is_in() local
337 p.x = ain_p->x1; in _lv_area_is_in()
338 p.y = ain_p->y1; in _lv_area_is_in()
339 if(_lv_area_is_point_on(aholder_p, &p, radius) == false) return false; in _lv_area_is_in()
341 p.x = ain_p->x2; in _lv_area_is_in()
342 p.y = ain_p->y1; in _lv_area_is_in()
343 if(_lv_area_is_point_on(aholder_p, &p, radius) == false) return false; in _lv_area_is_in()
345 p.x = ain_p->x1; in _lv_area_is_in()
346 p.y = ain_p->y2; in _lv_area_is_in()
347 if(_lv_area_is_point_on(aholder_p, &p, radius) == false) return false; in _lv_area_is_in()
349 p.x = ain_p->x2; in _lv_area_is_in()
350 p.y = ain_p->y2; in _lv_area_is_in()
351 if(_lv_area_is_point_on(aholder_p, &p, radius) == false) return false; in _lv_area_is_in()
365 if(aout_p->x2 < aholder_p->x1 || aout_p->y2 < aholder_p->y1 || aout_p->x1 > aholder_p->x2 || in _lv_area_is_out()
366 aout_p->y1 > aholder_p->y2) { in _lv_area_is_out()
373 lv_point_t p; in _lv_area_is_out() local
375 p.x = aout_p->x1; in _lv_area_is_out()
376 p.y = aout_p->y1; in _lv_area_is_out()
377 if(_lv_area_is_point_on(aholder_p, &p, radius)) return false; in _lv_area_is_out()
379 p.x = aout_p->x2; in _lv_area_is_out()
380 p.y = aout_p->y1; in _lv_area_is_out()
381 if(_lv_area_is_point_on(aholder_p, &p, radius)) return false; in _lv_area_is_out()
383 p.x = aout_p->x1; in _lv_area_is_out()
384 p.y = aout_p->y2; in _lv_area_is_out()
385 if(_lv_area_is_point_on(aholder_p, &p, radius)) return false; in _lv_area_is_out()
387 p.x = aout_p->x2; in _lv_area_is_out()
388 p.y = aout_p->y2; in _lv_area_is_out()
389 if(_lv_area_is_point_on(aholder_p, &p, radius)) return false; in _lv_area_is_out()
396 return a->x1 == b->x1 && a->x2 == b->x2 && a->y1 == b->y1 && a->y2 == b->y2; in _lv_area_is_equal()
413 x = lv_area_get_width(base) / 2 - lv_area_get_width(to_align) / 2; in lv_area_align()
414 y = lv_area_get_height(base) / 2 - lv_area_get_height(to_align) / 2; in lv_area_align()
422 x = lv_area_get_width(base) / 2 - lv_area_get_width(to_align) / 2; in lv_area_align()
427 x = lv_area_get_width(base) - lv_area_get_width(to_align); in lv_area_align()
433 y = lv_area_get_height(base) - lv_area_get_height(to_align); in lv_area_align()
436 x = lv_area_get_width(base) / 2 - lv_area_get_width(to_align) / 2; in lv_area_align()
437 y = lv_area_get_height(base) - lv_area_get_height(to_align); in lv_area_align()
441 x = lv_area_get_width(base) - lv_area_get_width(to_align); in lv_area_align()
442 y = lv_area_get_height(base) - lv_area_get_height(to_align); in lv_area_align()
447 y = lv_area_get_height(base) / 2 - lv_area_get_height(to_align) / 2; in lv_area_align()
451 x = lv_area_get_width(base) - lv_area_get_width(to_align); in lv_area_align()
452 y = lv_area_get_height(base) / 2 - lv_area_get_height(to_align) / 2; in lv_area_align()
457 y = -lv_area_get_height(to_align); in lv_area_align()
461 x = lv_area_get_width(base) / 2 - lv_area_get_width(to_align) / 2; in lv_area_align()
462 y = -lv_area_get_height(to_align); in lv_area_align()
466 x = lv_area_get_width(base) - lv_area_get_width(to_align); in lv_area_align()
467 y = -lv_area_get_height(to_align); in lv_area_align()
476 x = lv_area_get_width(base) / 2 - lv_area_get_width(to_align) / 2; in lv_area_align()
481 x = lv_area_get_width(base) - lv_area_get_width(to_align); in lv_area_align()
486 x = -lv_area_get_width(to_align); in lv_area_align()
491 x = -lv_area_get_width(to_align); in lv_area_align()
492 y = lv_area_get_height(base) / 2 - lv_area_get_height(to_align) / 2; in lv_area_align()
496 x = -lv_area_get_width(to_align); in lv_area_align()
497 y = lv_area_get_height(base) - lv_area_get_height(to_align); in lv_area_align()
507 y = lv_area_get_height(base) / 2 - lv_area_get_height(to_align) / 2; in lv_area_align()
512 y = lv_area_get_height(base) - lv_area_get_height(to_align); in lv_area_align()
520 x += base->x1; in lv_area_align()
521 y += base->y1; in lv_area_align()
525 to_align->x1 = x + ofs_x; in lv_area_align()
526 to_align->y1 = y + ofs_y; in lv_area_align()
527 to_align->x2 = to_align->x1 + w - 1; in lv_area_align()
528 to_align->y2 = to_align->y1 + h - 1; in lv_area_align()
532 void lv_point_transform(lv_point_t * p, int32_t angle, int32_t zoom, const lv_point_t * pivot) in lv_point_transform() argument
538 p->x -= pivot->x; in lv_point_transform()
539 p->y -= pivot->y; in lv_point_transform()
542 p->x = (((int32_t)(p->x) * zoom) >> 8) + pivot->x; in lv_point_transform()
543 p->y = (((int32_t)(p->y) * zoom) >> 8) + pivot->y; in lv_point_transform()
552 if(angle_limited > 3600) angle_limited -= 3600; in lv_point_transform()
557 int32_t angle_rem = angle_limited - (angle_low * 10); in lv_point_transform()
565 sinma = (s1 * (10 - angle_rem) + s2 * angle_rem) / 10; in lv_point_transform()
566 cosma = (c1 * (10 - angle_rem) + c2 * angle_rem) / 10; in lv_point_transform()
567 sinma = sinma >> (LV_TRIGO_SHIFT - _LV_TRANSFORM_TRIGO_SHIFT); in lv_point_transform()
568 cosma = cosma >> (LV_TRIGO_SHIFT - _LV_TRANSFORM_TRIGO_SHIFT); in lv_point_transform()
571 int32_t x = p->x; in lv_point_transform()
572 int32_t y = p->y; in lv_point_transform()
574 p->x = ((cosma * x - sinma * y) >> _LV_TRANSFORM_TRIGO_SHIFT) + pivot->x; in lv_point_transform()
575 p->y = ((sinma * x + cosma * y) >> _LV_TRANSFORM_TRIGO_SHIFT) + pivot->y; in lv_point_transform()
578 p->x = (((cosma * x - sinma * y) * zoom) >> (_LV_TRANSFORM_TRIGO_SHIFT + 8)) + pivot->x; in lv_point_transform()
579 p->y = (((sinma * x + cosma * y) * zoom) >> (_LV_TRANSFORM_TRIGO_SHIFT + 8)) + pivot->y; in lv_point_transform()
587 static bool lv_point_within_circle(const lv_area_t * area, const lv_point_t * p) in lv_point_within_circle() argument
589 lv_coord_t r = (area->x2 - area->x1) / 2; in lv_point_within_circle()
592 lv_coord_t cx = area->x1 + r; in lv_point_within_circle()
593 lv_coord_t cy = area->y1 + r; in lv_point_within_circle()
596 lv_coord_t px = p->x - cx; in lv_point_within_circle()
597 lv_coord_t py = p->y - cy; in lv_point_within_circle()