+eina_tiler_area_size_get

also fix docs for eina_tiler_area_size_set
This commit is contained in:
Mike Blumenkrantz 2013-07-08 09:07:38 +01:00
parent 2a1b993162
commit b8e16b8f4a
4 changed files with 26 additions and 2 deletions

View File

@ -1,3 +1,7 @@
2013-07-08 Mike Blumenkrantz
* add eina_tiler_area_size_get
2013-07-06 Carsten Haitzler (The Rasterman) 2013-07-06 Carsten Haitzler (The Rasterman)
* Add direct eina file map populate controls * Add direct eina file map populate controls

2
NEWS
View File

@ -31,7 +31,7 @@ Additions:
- Add eina_inlist_last - Add eina_inlist_last
- Add eina_str_convert_len() to work around broken eina_str_convert() - Add eina_str_convert_len() to work around broken eina_str_convert()
- Add eina_file_dup() - Add eina_file_dup()
- Add eina_tiler_area_size_set(), eina_tiler_strict_set() - Add eina_tiler_area_size_set(), eina_tiler_strict_set(), eina_tiler_area_size_get()
- Add eina_file_map_populate() - Add eina_file_map_populate()
* Eet: * Eet:
- Add eet_mmap() - Add eet_mmap()

View File

@ -1169,6 +1169,13 @@ EAPI void eina_tiler_area_size_set(Eina_Tiler *t, int w, int h)
t->area.h = h; t->area.h = h;
} }
EAPI void eina_tiler_area_size_get(const Eina_Tiler *t, int *w, int *h)
{
EINA_MAGIC_CHECK_TILER(t);
if (w) *w = t->area.w;
if (h) *h = t->area.h;
}
EAPI void eina_tiler_tile_size_set(Eina_Tiler *t, int w, int h) EAPI void eina_tiler_tile_size_set(Eina_Tiler *t, int w, int h)
{ {
EINA_MAGIC_CHECK_TILER(t); EINA_MAGIC_CHECK_TILER(t);

View File

@ -213,10 +213,23 @@ EAPI void eina_tiler_tile_size_set(Eina_Tiler *t, int w, int h);
* @param w Width of the area. * @param w Width of the area.
* @param h Height of the area. * @param h Height of the area.
* *
* Better clear the tiler before changing it's size. * @since 1.8
*
* @warning Must clear the tiler before changing its size.
*/ */
EAPI void eina_tiler_area_size_set(Eina_Tiler *t, int w, int h); EAPI void eina_tiler_area_size_set(Eina_Tiler *t, int w, int h);
/**
* @brief Get the size of the area covered by the tiler.
*
* @param t The tiler whose area size will be fetched.
* @param w Width of the area.
* @param h Height of the area.
*
* @since 1.8
*/
EAPI void eina_tiler_area_size_get(const Eina_Tiler *t, int *w, int *h);
/** /**
* @brief Define if we need to follow a strict grid of tile or a loosy one * @brief Define if we need to follow a strict grid of tile or a loosy one
* *