lv_area_private.h
API reference for lv_area_private.h
Functions
lv_area_set_pos
Set the position of an area (width and height will be kept)
void lv_area_set_pos(lv_area_t *area_p, int32_t x, int32_t y)| Name | Type | Description |
|---|---|---|
area_p | lv_area_t * | pointer to an area |
x | int32_t | the new x coordinate of the area |
y | int32_t | the new y coordinate of the area |
lv_area_intersect
Get the common parts of two areas
bool lv_area_intersect(lv_area_t *res_p, const lv_area_t *a1_p, const lv_area_t *a2_p)| Name | Type | Description |
|---|---|---|
res_p | lv_area_t * | pointer to an area, the result will be stored her |
a1_p | const lv_area_t * | pointer to the first area |
a2_p | const lv_area_t * | pointer to the second area |
Returns: bool — false: the two area has NO common parts, res_p is invalid
lv_area_diff
Get resulting sub areas after removing the common parts of two areas from the first area
int8_t lv_area_diff(lv_area_t res_p[], const lv_area_t *a1_p, const lv_area_t *a2_p)| Name | Type | Description |
|---|---|---|
res_p | lv_area_t | pointer to an array of areas with a count of 4, the resulting areas will be stored here |
a1_p | const lv_area_t * | pointer to the first area |
a2_p | const lv_area_t * | pointer to the second area |
Returns: int8_t — number of results (max 4) or -1 if no intersect
lv_area_join
Join two areas into a third which involves the other two
void lv_area_join(lv_area_t *a_res_p, const lv_area_t *a1_p, const lv_area_t *a2_p)| Name | Type | Description |
|---|---|---|
a_res_p | lv_area_t * | pointer to an area, the result will be stored here |
a1_p | const lv_area_t * | pointer to the first area |
a2_p | const lv_area_t * | pointer to the second area |
lv_area_is_point_on
Check if a point is on an area
bool lv_area_is_point_on(const lv_area_t *a_p, const lv_point_t *p_p, int32_t radius)| Name | Type | Description |
|---|---|---|
a_p | const lv_area_t * | pointer to an area |
p_p | const lv_point_t * | pointer to a point |
radius | int32_t | radius of area (e.g. for rounded rectangle) |
Returns: bool — false:the point is out of the area
lv_area_is_on
Check if two area has common parts
bool lv_area_is_on(const lv_area_t *a1_p, const lv_area_t *a2_p)| Name | Type | Description |
|---|---|---|
a1_p | const lv_area_t * | pointer to an area. |
a2_p | const lv_area_t * | pointer to another area |
Returns: bool — false: a1_p and a2_p has no common parts
lv_area_is_in
Check if an area is fully on another
bool lv_area_is_in(const lv_area_t *ain_p, const lv_area_t *aholder_p, int32_t radius)| Name | Type | Description |
|---|---|---|
ain_p | const lv_area_t * | pointer to an area which could be in 'aholder_p' |
aholder_p | const lv_area_t * | pointer to an area which could involve 'ain_p' |
radius | int32_t | radius of aholder_p (e.g. for rounded rectangle) |
Returns: bool — true: ain_p is fully inside aholder_p
lv_area_is_out
Check if an area is fully out of another
bool lv_area_is_out(const lv_area_t *aout_p, const lv_area_t *aholder_p, int32_t radius)| Name | Type | Description |
|---|---|---|
aout_p | const lv_area_t * | pointer to an area which could be in 'aholder_p' |
aholder_p | const lv_area_t * | pointer to an area which could involve 'ain_p' |
radius | int32_t | radius of aholder_p (e.g. for rounded rectangle) |
Returns: bool — true: aout_p is fully outside aholder_p
lv_area_is_equal
Check if 2 area is the same
bool lv_area_is_equal(const lv_area_t *a, const lv_area_t *b)| Name | Type | Description |
|---|---|---|
a | const lv_area_t * | pointer to an area |
b | const lv_area_t * | pointer to another area |
Dependencies
Last updated on