[gegl/gsoc2009-gpu: 3/15] Add gegl_tile_get_width() and gegl_tile_get_height()
- From: Martin Nordholts <martinn src gnome org>
- To: svn-commits-list gnome org
- Subject: [gegl/gsoc2009-gpu: 3/15] Add gegl_tile_get_width() and gegl_tile_get_height()
- Date: Wed, 24 Jun 2009 05:38:14 +0000 (UTC)
commit 7274165c2d0e64f0c465f69b98467900c27a7726
Author: Jerson Michael Perpetua <jersonperpetua gmail com>
Date: Sat Jun 13 02:10:07 2009 +0800
Add gegl_tile_get_width() and gegl_tile_get_height()
Add and implement gegl_tile_get_width() and gegl_tile_get_height() by
looking them up through the tile's tile storage.
gegl/buffer/gegl-tile.c | 12 ++++++++++++
gegl/buffer/gegl-tile.h | 3 +++
2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/gegl/buffer/gegl-tile.c b/gegl/buffer/gegl-tile.c
index 5dc8528..b3a0788 100644
--- a/gegl/buffer/gegl-tile.c
+++ b/gegl/buffer/gegl-tile.c
@@ -236,6 +236,18 @@ gegl_tile_get_format (GeglTile *tile)
return (void *) tile->tile_storage->format;
}
+gint
+gegl_tile_get_width (GeglTile *tile)
+{
+ return tile->tile_storage->tile_width;
+}
+
+gint
+gegl_tile_get_height (GeglTile *tile)
+{
+ return tile->tile_storage->tile_height;
+}
+
static gpointer
gegl_memdup (gpointer src, gsize size)
{
diff --git a/gegl/buffer/gegl-tile.h b/gegl/buffer/gegl-tile.h
index 86f973a..464de90 100644
--- a/gegl/buffer/gegl-tile.h
+++ b/gegl/buffer/gegl-tile.h
@@ -77,7 +77,10 @@ struct _GeglTileClass
GType gegl_tile_get_type (void) G_GNUC_CONST;
GeglTile * gegl_tile_new (gint size);
+
void * gegl_tile_get_format (GeglTile *tile);
+gint gegl_tile_get_width (GeglTile *tile);
+gint gegl_tile_get_height (GeglTile *tile);
/* lock a tile for writing, this would allow writing to buffers
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]