Tiler
[Data types.]

Data Structures

struct  Eina_Tile_Grid_Info
 Grid type of a tiler. More...

Typedefs

typedef struct _Eina_Tiler Eina_Tiler
 Tiler type.
typedef struct Eina_Tile_Grid_Info Eina_Tile_Grid_Info
 Grid type of a tiler.
typedef struct
_Eina_Tile_Grid_Slicer 
Eina_Tile_Grid_Slicer

Functions

Eina_Tilereina_tiler_new (int w, int h)
void eina_tiler_free (Eina_Tiler *t)
void eina_tiler_tile_size_set (Eina_Tiler *t, int w, int h)
Eina_Bool eina_tiler_rect_add (Eina_Tiler *t, const Eina_Rectangle *r)
void eina_tiler_rect_del (Eina_Tiler *t, const Eina_Rectangle *r)
void eina_tiler_clear (Eina_Tiler *t)
Eina_Iteratoreina_tiler_iterator_new (const Eina_Tiler *t)
Eina_Iteratoreina_tile_grid_slicer_iterator_new (int x, int y, int w, int h, int tile_w, int tile_h)
 Creates a new Eina_Iterator that slices over a list of tiles.
static Eina_Bool eina_tile_grid_slicer_next (Eina_Tile_Grid_Slicer *slc, const Eina_Tile_Grid_Info **rect)
static Eina_Bool eina_tile_grid_slicer_setup (Eina_Tile_Grid_Slicer *slc, int x, int y, int w, int h, int tile_w, int tile_h)

Function Documentation

Eina_Iterator* eina_tile_grid_slicer_iterator_new ( int  x,
int  y,
int  w,
int  h,
int  tile_w,
int  tile_h 
)

Creates a new Eina_Iterator that slices over a list of tiles.

Parameters:
x X axis coordinate.
y Y axis coordinate.
w width.
h height.
tile_w tile width.
tile_h tile height.
Returns:
A pointer to the Eina_Iterator. NULL on failure.

The tile grid is defined by tile_w and tile_h while the region is defined by x, y, w, h. The output is given as Eina_Tile_Grid_Info where tile index is given in col col and row row with tile-relative coordinates in x, y, w, h. If tile was fully filled by region, then full flag is set.