diff --git a/ChangeLog b/ChangeLog index dc773b46a6..978d1b46bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2013-07-08 Mike Blumenkrantz + + * add eina_tiler_area_size_get + 2013-07-06 Carsten Haitzler (The Rasterman) * Add direct eina file map populate controls diff --git a/NEWS b/NEWS index 3ffbb8c85b..afafabe956 100644 --- a/NEWS +++ b/NEWS @@ -31,7 +31,7 @@ Additions: - Add eina_inlist_last - Add eina_str_convert_len() to work around broken eina_str_convert() - 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() * Eet: - Add eet_mmap() diff --git a/src/lib/eina/eina_tiler.c b/src/lib/eina/eina_tiler.c index fb22bf2e73..e122712eed 100644 --- a/src/lib/eina/eina_tiler.c +++ b/src/lib/eina/eina_tiler.c @@ -1169,6 +1169,13 @@ EAPI void eina_tiler_area_size_set(Eina_Tiler *t, int w, int 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) { EINA_MAGIC_CHECK_TILER(t); diff --git a/src/lib/eina/eina_tiler.h b/src/lib/eina/eina_tiler.h index 491fc6a036..e1de173128 100644 --- a/src/lib/eina/eina_tiler.h +++ b/src/lib/eina/eina_tiler.h @@ -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 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); +/** + * @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 *