discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=536342c0858d7cbba663e3f5343909debbe16f8b

commit 536342c0858d7cbba663e3f5343909debbe16f8b
Author: Mike Blumenkrantz <[email protected]>
Date:   Mon Feb 9 20:38:00 2015 -0500

    add pixmap image border functions
---
 src/bin/e_pixmap.c | 18 ++++++++++++++++++
 src/bin/e_pixmap.h |  3 +++
 2 files changed, 21 insertions(+)

diff --git a/src/bin/e_pixmap.c b/src/bin/e_pixmap.c
index 6b2b92c..0587554 100644
--- a/src/bin/e_pixmap.c
+++ b/src/bin/e_pixmap.c
@@ -34,6 +34,7 @@ struct _E_Pixmap
 #if defined(HAVE_WAYLAND_CLIENTS) || defined(HAVE_WAYLAND_ONLY)
    struct wl_resource *resource;
    Eina_List *resource_cache;
+   Eina_Rectangle border;
 #endif
 
    Eina_Bool usable : 1;
@@ -886,3 +887,20 @@ e_pixmap_image_draw(E_Pixmap *cp, const Eina_Rectangle *r)
      }
    return EINA_FALSE;
 }
+
+EAPI void
+e_pixmap_image_border_set(E_Pixmap *cp, int l, int r, int t, int b)
+{
+   EINA_SAFETY_ON_NULL_RETURN(cp);
+   EINA_RECTANGLE_SET(&cp->border, t, b, l, r);
+}
+
+EAPI void
+e_pixmap_image_border_get(E_Pixmap *cp, int *l, int *r, int *t, int *b)
+{
+   EINA_SAFETY_ON_NULL_RETURN(cp);
+   if (t) *t = cp->border.x;
+   if (b) *b = cp->border.y;
+   if (l) *l = cp->border.w;
+   if (r) *r = cp->border.h;
+}
diff --git a/src/bin/e_pixmap.h b/src/bin/e_pixmap.h
index 5529858..ca18a0d 100644
--- a/src/bin/e_pixmap.h
+++ b/src/bin/e_pixmap.h
@@ -45,6 +45,9 @@ EAPI void *e_pixmap_image_data_get(E_Pixmap *cp);
 EAPI Eina_Bool e_pixmap_image_data_argb_convert(E_Pixmap *cp, void *pix, void 
*ipix, Eina_Rectangle *r, int stride);
 EAPI Eina_Bool e_pixmap_image_draw(E_Pixmap *cp, const Eina_Rectangle *r);
 
+EAPI void e_pixmap_image_border_set(E_Pixmap *cp, int l, int r, int t, int b);
+EAPI void e_pixmap_image_border_get(E_Pixmap *cp, int *l, int *r, int *t, int 
*b);
+
 static inline Eina_Bool
 e_pixmap_is_x(const E_Pixmap *cp)
 {

-- 


Reply via email to