Eina_Rectangle_Group

Langue: en

Version: 374689 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

NAME

Rectangle -

Data Structures


struct _Eina_Rectangle
Simple rectangle structure.

Defines


#define EINA_RECTANGLE_SET(Rectangle, X, Y, W, H)
Macro to set the values of a Eina_Rectangle.

Typedefs


typedef struct _Eina_Rectangle Eina_Rectangle
Simple rectangle structure.
typedef struct _Eina_Rectangle_Pool Eina_Rectangle_Pool

Functions


static int eina_spans_intersect (int c1, int l1, int c2, int l2) EINA_WARN_UNUSED_RESULT

static Eina_Bool eina_rectangle_is_empty (const Eina_Rectangle *r) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT

static void eina_rectangle_coords_from (Eina_Rectangle *r, int x, int y, int w, int h) EINA_ARG_NONNULL(1)

static Eina_Bool eina_rectangles_intersect (const Eina_Rectangle *r1, const Eina_Rectangle *r2) EINA_ARG_NONNULL(1

static Eina_Bool eina_rectangle_xcoord_inside (const Eina_Rectangle *r, int x) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT

static Eina_Bool eina_rectangle_ycoord_inside (const Eina_Rectangle *r, int y) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT

static Eina_Bool eina_rectangle_coords_inside (const Eina_Rectangle *r, int x, int y) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT

static void eina_rectangle_union (Eina_Rectangle *dst, const Eina_Rectangle *src) EINA_ARG_NONNULL(1

static void static Eina_Bool eina_rectangle_intersection (Eina_Rectangle *dst, const Eina_Rectangle *src) EINA_ARG_NONNULL(1

static void eina_rectangle_rescale_in (const Eina_Rectangle *out, const Eina_Rectangle *in, Eina_Rectangle *res) EINA_ARG_NONNULL(1

static void static void eina_rectangle_rescale_out (const Eina_Rectangle *out, const Eina_Rectangle *in, Eina_Rectangle *res) EINA_ARG_NONNULL(1

static void static void EAPI Eina_Rectangle_Pool * eina_rectangle_pool_new (int w, int h) EINA_MALLOC EINA_WARN_UNUSED_RESULT

EAPI Eina_Rectangle_Pool * eina_rectangle_pool_get (Eina_Rectangle *rect) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1)
Return the pool of the given rectangle.
EAPI Eina_Bool eina_rectangle_pool_geometry_get (Eina_Rectangle_Pool *pool, int *w, int *h) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT
Return the width and height of the given pool.
EAPI void * eina_rectangle_pool_data_get (Eina_Rectangle_Pool *pool) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1)
Get the data from the given pool.
EAPI void eina_rectangle_pool_data_set (Eina_Rectangle_Pool *pool, const void *data) EINA_ARG_NONNULL(1)
Set the data to the given pool.
EAPI void eina_rectangle_pool_free (Eina_Rectangle_Pool *pool) EINA_ARG_NONNULL(1)

EAPI int eina_rectangle_pool_count (Eina_Rectangle_Pool *pool) EINA_ARG_NONNULL(1) EINA_WARN_UNUSED_RESULT
Return the number of rectangles in the given pool.
EAPI Eina_Rectangle * eina_rectangle_pool_request (Eina_Rectangle_Pool *pool, int w, int h) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1)

EAPI void eina_rectangle_pool_release (Eina_Rectangle *rect) EINA_ARG_NONNULL(1)

EAPI Eina_Rectangle * eina_rectangle_new (int x, int y, int w, int h) EINA_MALLOC EINA_WARN_UNUSED_RESULT
Create a new rectangle.
EAPI void eina_rectangle_free (Eina_Rectangle *rect) EINA_ARG_NONNULL(1)
Free the given rectangle.

Variables


static Eina_Bool EINA_WARN_UNUSED_RESULT

Define Documentation

#define EINA_RECTANGLE_SET(Rectangle, X, Y, W, H)Value:

 (Rectangle)->x = X;                             (Rectangle)->y = Y;                               (Rectangle)->w = W;                               (Rectangle)->h = H;
 

Macro to set the values of a Eina_Rectangle. Parameters:

Rectangle The rectangle to set the values.
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.

This macro set the values of Rectangle. (X, Y) is the coordinates of the top left corner of Rectangle, W is its width and H is its height.

Function Documentation

EAPI Eina_Rectangle_Pool* eina_rectangle_pool_get (Eina_Rectangle * rect)

Return the pool of the given rectangle. Parameters:

rect The rectangle.

Returns:

The pool of the given rectangle.

This function returns the pool in which rect is. If rect is NULL, NULL is returned.

EAPI Eina_Bool eina_rectangle_pool_geometry_get (Eina_Rectangle_Pool * pool, int * w, int * h)

Return the width and height of the given pool. Parameters:

pool The pool.
w The returned width.
h The returned height.

Returns:

EINA_TRUE on sucess, EINA_FALSE otherwise.

This function returns the width and height of pool and store them in respectively w and h if they are not NULL. If pool is NULL, EINA_FALSE is returned. Otherwise EINA_TRUE is returned.

EAPI void* eina_rectangle_pool_data_get (Eina_Rectangle_Pool * pool)

Get the data from the given pool. Parameters:

pool The pool.

Returns:

The returned data.

This function gets the data from pool set by eina_rectangle_pool_data_set(). If pool is NULL, this function returns NULL.

EAPI void eina_rectangle_pool_data_set (Eina_Rectangle_Pool * pool, const void * data)

Set the data to the given pool. Parameters:

pool The pool.
data The data to set.

This function sets data to pool. If pool is NULL, this function does nothing.

EAPI int eina_rectangle_pool_count (Eina_Rectangle_Pool * pool)

Return the number of rectangles in the given pool. Parameters:

pool The pool.

Returns:

The number of rectangles in the pool.

This function returns the number of rectangles in pool.

EAPI Eina_Rectangle* eina_rectangle_new (int x, int y, int w, int h)

Create a new rectangle. Parameters:

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.

Returns:

The new rectangle on success, @ NULL otherwise.

This function creates a rectangle which top left corner has the coordinates (x, y), with height w and height h and adds it to the rectangles pool. No check is done on w and h. This function returns a new rectangle on success, NULL otherwhise.

EAPI void eina_rectangle_free (Eina_Rectangle * rect)

Free the given rectangle. Parameters:

rect The rectangle to free.

This function removes rect from the rectangles pool.

Author

Generated automatically by Doxygen for Eina from the source code.