[gegl] buffer: added gegl_buffer_set_abyss function



commit fd951cf6955a4fb748436012b999092891fe44fb
Author: Ville Sokk <ville sokk gmail com>
Date:   Sun Jul 8 19:59:11 2012 +0300

    buffer: added gegl_buffer_set_abyss function

 gegl/buffer/gegl-buffer.c |   11 +++++++++++
 gegl/buffer/gegl-buffer.h |   12 ++++++++++++
 2 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer.c b/gegl/buffer/gegl-buffer.c
index dc71186..d4ccc68 100644
--- a/gegl/buffer/gegl-buffer.c
+++ b/gegl/buffer/gegl-buffer.c
@@ -360,6 +360,17 @@ gegl_buffer_set_extent (GeglBuffer          *buffer,
   return TRUE;
 }
 
+gboolean
+gegl_buffer_set_abyss (GeglBuffer          *buffer,
+                       const GeglRectangle *abyss)
+{
+  g_return_val_if_fail(GEGL_IS_BUFFER(buffer), FALSE);
+
+  buffer->abyss = *abyss;
+
+  return TRUE;
+}
+
 void gegl_buffer_stats (void)
 {
   g_warning ("Buffer statistics: allocated:%i deallocated:%i balance:%i",
diff --git a/gegl/buffer/gegl-buffer.h b/gegl/buffer/gegl-buffer.h
index 5140ce8..0339fef 100644
--- a/gegl/buffer/gegl-buffer.h
+++ b/gegl/buffer/gegl-buffer.h
@@ -164,6 +164,18 @@ const GeglRectangle * gegl_buffer_get_extent  (GeglBuffer *buffer);
 gboolean          gegl_buffer_set_extent      (GeglBuffer          *buffer,
                                                const GeglRectangle *extent);
 
+/**
+ * gegl_buffer_set_abyss:
+ * @buffer: the buffer to operate on.
+ * @extent: new abyss.
+ *
+ * Changes the size and position of the abyss rectangle of a buffer.
+ *
+ * Returns TRUE if the change of abyss was succesful.
+ */
+gboolean          gegl_buffer_set_abyss      (GeglBuffer          *buffer,
+                                              const GeglRectangle *abyss);
+
 /* convenience access macros */
 
 /**



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]