discomfitor pushed a commit to branch master.

commit b8e16b8f4a30dd5cce1fda1f57fae023c7e2228f
Author: Mike Blumenkrantz <[email protected]>
Date:   Mon Jul 8 09:07:38 2013 +0100

    +eina_tiler_area_size_get
    
    also fix docs for eina_tiler_area_size_set
---
 ChangeLog                 |  4 ++++
 NEWS                      |  2 +-
 src/lib/eina/eina_tiler.c |  7 +++++++
 src/lib/eina/eina_tiler.h | 15 ++++++++++++++-
 4 files changed, 26 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index dc773b4..978d1b4 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 3ffbb8c..afafabe 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 fb22bf2..e122712 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 491fc6a..e1de173 100644
--- a/src/lib/eina/eina_tiler.h
+++ b/src/lib/eina/eina_tiler.h
@@ -213,11 +213,24 @@ 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
  *
  * @param t The tiler to apply the strict rules to.

-- 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Reply via email to