Tizen Native API
|
Functions | |
static int | eina_spans_intersect (int c1, int l1, int c2, int l2) |
Check if the given spans intersect. | |
static Eina_Bool | eina_rectangle_is_empty (const Eina_Rectangle *r) |
Check if the given rectangle is empty. | |
static void | eina_rectangle_coords_from (Eina_Rectangle *r, int x, int y, int w, int h) |
Set the coordinates and size of the given rectangle. | |
static Eina_Bool | eina_rectangles_intersect (const Eina_Rectangle *r1, const Eina_Rectangle *r2) |
Check if the given rectangles intersect. | |
static Eina_Bool | eina_rectangle_xcoord_inside (const Eina_Rectangle *r, int x) |
Check if the given x-coordinate is in the rectangle . | |
static Eina_Bool | eina_rectangle_ycoord_inside (const Eina_Rectangle *r, int y) |
Check if the given y-coordinate is in the rectangle . | |
static Eina_Bool | eina_rectangle_coords_inside (const Eina_Rectangle *r, int x, int y) |
Check if the given point is in the rectangle . | |
static void | eina_rectangle_union (Eina_Rectangle *dst, const Eina_Rectangle *src) |
Get the union of two rectangles. | |
static Eina_Bool | eina_rectangle_intersection (Eina_Rectangle *dst, const Eina_Rectangle *src) |
Get the intersection of two rectangles. | |
static void | eina_rectangle_rescale_in (const Eina_Rectangle *out, const Eina_Rectangle *in, Eina_Rectangle *res) |
Rescale a rectangle inner position. | |
static void | eina_rectangle_rescale_out (const Eina_Rectangle *out, const Eina_Rectangle *in, Eina_Rectangle *res) |
Rescale a rectangle outter position. | |
Eina_Rectangle_Pool * | eina_rectangle_pool_new (int w, int h) |
Adds a rectangle in a new pool. | |
Eina_Rectangle_Pool * | eina_rectangle_pool_get (Eina_Rectangle *rect) |
Gets the pool of the given rectangle. | |
Eina_Bool | eina_rectangle_pool_geometry_get (Eina_Rectangle_Pool *pool, int *w, int *h) |
Gets the width and height of the given pool. | |
void * | eina_rectangle_pool_data_get (Eina_Rectangle_Pool *pool) |
Gets the data from the given pool. | |
void | eina_rectangle_pool_data_set (Eina_Rectangle_Pool *pool, const void *data) |
Sets the data to the given pool. | |
void | eina_rectangle_pool_free (Eina_Rectangle_Pool *pool) |
Frees the given pool. | |
int | eina_rectangle_pool_count (Eina_Rectangle_Pool *pool) |
Returns the number of rectangles in the given pool. | |
Eina_Rectangle * | eina_rectangle_pool_request (Eina_Rectangle_Pool *pool, int w, int h) |
Requests for a rectangle of the given size in the given pool. | |
void | eina_rectangle_pool_release (Eina_Rectangle *rect) |
Removes the given rectangle from the pool. | |
Eina_Rectangle * | eina_rectangle_new (int x, int y, int w, int h) |
Creates a new rectangle. | |
void | eina_rectangle_free (Eina_Rectangle *rect) |
Frees the given rectangle. | |
void | eina_rectangle_pool_packing_set (Eina_Rectangle_Pool *pool, Eina_Rectangle_Packing type) |
Sets the type of the given rectangle pool. | |
Typedefs | |
typedef struct _Eina_Rectangle | Eina_Rectangle |
The structure type for the simple rectangle structure. | |
typedef struct _Eina_Rectangle_Pool | Eina_Rectangle_Pool |
The structure type for an opaque rectangle pool. | |
Defines | |
#define | EINA_RECTANGLE_SET(Rectangle, X, Y, W, H) |
Provides a macro to set the values of a Eina_Rectangle. |
This group discusses the functions that provide rectangle management.
#define EINA_RECTANGLE_SET | ( | Rectangle, | |
X, | |||
Y, | |||
W, | |||
H | |||
) |
(Rectangle)->x = X; \ (Rectangle)->y = Y; \ (Rectangle)->w = W; \ (Rectangle)->h = H;
Provides a macro to set the values of a Eina_Rectangle.
This macro sets the values of Rectangle. (X, Y) are the coordinates of the top left corner of Rectangle, W is its width and H is its height.
Rectangle | The rectangle to set the values of |
X | The X coordinate of the top left corner of the rectangle |
Y | The Y coordinate of the top left corner of the rectangle |
W | The width of the rectangle |
H | The height of the rectangle |
Enumeration of the type for an Eina Pool based on the packing algorithm.
static void eina_rectangle_coords_from | ( | Eina_Rectangle * | r, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h | ||
) | [static] |
Set the coordinates and size of the given rectangle.
This function sets its top-left x coordinate to x
, its top-left y coordinate to y
, its width to w
and its height to h
. No check is done on r
, so it must be a valid rectangle.
[in] | r | The rectangle. |
[in] | x | The top-left x coordinate of the rectangle. |
[in] | y | The top-left y coordinate of the rectangle. |
[in] | w | The width of the rectangle. |
[in] | h | The height of the rectangle. |
static Eina_Bool eina_rectangle_coords_inside | ( | const Eina_Rectangle * | r, |
int | x, | ||
int | y | ||
) | [static] |
Check if the given point is in the rectangle .
This function returns EINA_TRUE if the point of coordinate (x
, y
) is in r
, EINA_FALSE otherwise. No check is done on r
, so it must be a valid rectangle.
[in] | r | The rectangle. |
[in] | x | The x coordinate of the point. |
[in] | y | The y coordinate of the point. |
void eina_rectangle_free | ( | Eina_Rectangle * | rect | ) |
Frees the given rectangle.
This function removes rect from the rectangles pool.
[in] | rect | The rectangle to free |
static Eina_Bool eina_rectangle_intersection | ( | Eina_Rectangle * | dst, |
const Eina_Rectangle * | src | ||
) | [static] |
Get the intersection of two rectangles.
This function get the intersection of the rectangles dst
and src
. The result is stored in dst
. No check is done on dst
or src
, so they must be valid rectangles.
[in] | dst | The first rectangle. |
[in] | src | The second rectangle. |
static Eina_Bool eina_rectangle_is_empty | ( | const Eina_Rectangle * | r | ) | [static] |
Check if the given rectangle is empty.
This function returns EINA_TRUE if r
is empty, EINA_FALSE otherwise. No check is done on r
, so it must be a valid rectangle.
[in] | r | The rectangle to check. |
Eina_Rectangle* eina_rectangle_new | ( | int | x, |
int | y, | ||
int | w, | ||
int | h | ||
) |
Creates a new rectangle.
This function creates a rectangle whose top left corner has the coordinates (x, y), with width w and height h and adds it to the rectangle's pool. No check is done on w and h. This function returns a new rectangle on success, otherwise it returns NULL
.
[in] | x | The X coordinate of the top left corner of the rectangle |
[in] | y | The Y coordinate of the top left corner of the rectangle |
[in] | w | The width of the rectangle |
[in] | h | The height of the rectangle |
NULL
int eina_rectangle_pool_count | ( | Eina_Rectangle_Pool * | pool | ) |
Returns the number of rectangles in the given pool.
This function returns the number of rectangles in pool.
[in] | pool | The pool |
void* eina_rectangle_pool_data_get | ( | Eina_Rectangle_Pool * | pool | ) |
Gets the data from the given pool.
This function gets the data from pool set by eina_rectangle_pool_data_set(). If pool is NULL
, this function returns NULL
.
[in] | pool | The pool |
void eina_rectangle_pool_data_set | ( | Eina_Rectangle_Pool * | pool, |
const void * | data | ||
) |
Sets the data to the given pool.
This function sets data to pool. If pool is NULL
, this function does nothing.
[in] | pool | The pool |
[in] | data | The data to set |
void eina_rectangle_pool_free | ( | Eina_Rectangle_Pool * | pool | ) |
Frees the given pool.
This function frees the allocated data of pool. If pool is NULL
, this function returns immediately.
[in] | pool | The pool to free |
Eina_Bool eina_rectangle_pool_geometry_get | ( | Eina_Rectangle_Pool * | pool, |
int * | w, | ||
int * | h | ||
) |
Gets the width and height of the given pool.
This function returns the width and height of pool and stores them in w and h respectively if they are not NULL
. If pool is NULL
, EINA_FALSE
is returned. Otherwise EINA_TRUE
is returned.
[in] | pool | The pool |
[out] | w | The returned width |
[out] | h | The returned height |
EINA_TRUE
on success, otherwise EINA_FALSE
Gets the pool of the given rectangle.
This function returns the pool in which rect is present. If rect is NULL
, NULL
is returned.
[in] | rect | The rectangle |
Eina_Rectangle_Pool* eina_rectangle_pool_new | ( | int | w, |
int | h | ||
) |
Adds a rectangle in a new pool.
This function adds the rectangle of size (width, height) to a new pool. If the pool cannot be created, NULL
is returned. Otherwise the newly allocated pool is returned.
[in] | w | The width of the rectangle |
[in] | h | The height of the rectangle |
NULL
void eina_rectangle_pool_packing_set | ( | Eina_Rectangle_Pool * | pool, |
Eina_Rectangle_Packing | type | ||
) |
Sets the type of the given rectangle pool.
This function sets type of pool.
[in] | pool | The rectangle pool type to set |
[in] | type | The packing type to set |
void eina_rectangle_pool_release | ( | Eina_Rectangle * | rect | ) |
Removes the given rectangle from the pool.
This function removes rect from the pool. If rect is NULL
, the function returns immediately. Otherwise it removes rect from the pool.
[in] | rect | The rectangle to remove from the pool |
Eina_Rectangle* eina_rectangle_pool_request | ( | Eina_Rectangle_Pool * | pool, |
int | w, | ||
int | h | ||
) |
Requests for a rectangle of the given size in the given pool.
This function retrieves from pool the rectangle of width w and height h. If pool is NULL
, or w or h are non-positive, the function returns NULL
. If w or h are greater than the pool size, the function returns NULL
. On success, the function returns the rectangle that matches the size (w, h). Otherwise it returns NULL
.
[in] | pool | The pool |
[in] | w | The width of the rectangle to request for |
[in] | h | The height of the rectangle to request for |
NULL
static void eina_rectangle_rescale_in | ( | const Eina_Rectangle * | out, |
const Eina_Rectangle * | in, | ||
Eina_Rectangle * | res | ||
) | [static] |
Rescale a rectangle inner position.
This function rescales a rectangle by using out
and in
.
[in] | out | The outter rectangle. |
[in] | in | The inner rectangle. |
[in] | res | The rectangle to be rescaled |
static void eina_rectangle_rescale_out | ( | const Eina_Rectangle * | out, |
const Eina_Rectangle * | in, | ||
Eina_Rectangle * | res | ||
) | [static] |
Rescale a rectangle outter position.
This function rescales a rectangle by using out
and in
.
[in] | out | The outter rectangle. |
[in] | in | The inner rectangle. |
[in] | res | The rectangle to be rescaled |
static void eina_rectangle_union | ( | Eina_Rectangle * | dst, |
const Eina_Rectangle * | src | ||
) | [static] |
Get the union of two rectangles.
This function get the union of the rectangles dst
and src
. The result is stored in dst
. No check is done on dst
or src
, so they must be valid rectangles.
[in] | dst | The first rectangle. |
[in] | src | The second rectangle. |
static Eina_Bool eina_rectangle_xcoord_inside | ( | const Eina_Rectangle * | r, |
int | x | ||
) | [static] |
Check if the given x-coordinate is in the rectangle .
This function returns EINA_TRUE if x
is in r
with respect to the horizontal direction, EINA_FALSE otherwise. No check is done on r
, so it must be a valid rectangle.
[in] | r | The rectangle. |
[in] | x | The x coordinate. |
static Eina_Bool eina_rectangle_ycoord_inside | ( | const Eina_Rectangle * | r, |
int | y | ||
) | [static] |
Check if the given y-coordinate is in the rectangle .
This function returns EINA_TRUE if y
is in r
with respect to the vertical direction, EINA_FALSE otherwise. No check is done on r
, so it must be a valid rectangle.
[in] | r | The rectangle. |
[in] | y | The y coordinate. |
static Eina_Bool eina_rectangles_intersect | ( | const Eina_Rectangle * | r1, |
const Eina_Rectangle * | r2 | ||
) | [static] |
Check if the given rectangles intersect.
This function returns EINA_TRUE if r1
and r2
intersect, EINA_FALSE otherwise. No check is done on r1
and r2
, so they must be valid rectangles.
[in] | r1 | The first rectangle. |
[in] | r2 | The second rectangle. |
static int eina_spans_intersect | ( | int | c1, |
int | l1, | ||
int | c2, | ||
int | l2 | ||
) | [static] |
Check if the given spans intersect.
This function returns EINA_TRUE if the given spans intersect, EINA_FALSE otherwise.
[in] | c1 | The column of the first span. |
[in] | l1 | The length of the first span. |
[in] | c2 | The column of the second span. |
[in] | l2 | The length of the second span. |