[gegl/abyss] buffer: added gegl_buffer_set_abyss function
- From: Ville Sokk <villesokk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl/abyss] buffer: added gegl_buffer_set_abyss function
- Date: Sun, 8 Jul 2012 17:13:00 +0000 (UTC)
commit 9ce863d56b964a913688ec0b0e4943eeea4c56f2
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 c3e1c6b..a857284 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 95d9097..f6a2325 100644
--- a/gegl/buffer/gegl-buffer.h
+++ b/gegl/buffer/gegl-buffer.h
@@ -159,6 +159,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]