[gnome-photos/wip/rishi/misc-fixes: 9/14] base-item: Add photos_base_item_get_bbox_edited
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/misc-fixes: 9/14] base-item: Add photos_base_item_get_bbox_edited
- Date: Mon, 28 Dec 2015 17:08:39 +0000 (UTC)
commit 9da1dd5035756b137c6d5edfddc399788750dff5
Author: Debarshi Ray <debarshir gnome org>
Date: Fri Dec 25 10:11:27 2015 +0100
base-item: Add photos_base_item_get_bbox_edited
src/photos-base-item.c | 26 ++++++++++++++++++++++++++
src/photos-base-item.h | 2 ++
2 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 4284737..de706d4 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -1608,6 +1608,32 @@ photos_base_item_get_author (PhotosBaseItem *self)
gboolean
+photos_base_item_get_bbox_edited (PhotosBaseItem *self, GeglRectangle *out_bbox)
+{
+ PhotosBaseItemPrivate *priv;
+ GeglNode * graph;
+ GeglRectangle bbox;
+
+ g_return_val_if_fail (PHOTOS_IS_BASE_ITEM (self), FALSE);
+ priv = self->priv;
+
+ g_return_val_if_fail (priv->edit_graph != NULL, FALSE);
+ g_return_val_if_fail (priv->load_graph != NULL, FALSE);
+ g_return_val_if_fail (priv->pipeline != NULL, FALSE);
+ g_return_val_if_fail (priv->processor != NULL, FALSE);
+ g_return_val_if_fail (!gegl_processor_work (priv->processor, NULL), FALSE);
+
+ graph = photos_pipeline_get_graph (priv->pipeline);
+ bbox = gegl_node_get_bounding_box (graph);
+
+ if (out_bbox != NULL)
+ *out_bbox = bbox;
+
+ return TRUE;
+}
+
+
+gboolean
photos_base_item_get_bbox_source (PhotosBaseItem *self, GeglRectangle *bbox)
{
PhotosBaseItemPrivate *priv = self->priv;
diff --git a/src/photos-base-item.h b/src/photos-base-item.h
index 38f33bb..e247322 100644
--- a/src/photos-base-item.h
+++ b/src/photos-base-item.h
@@ -118,6 +118,8 @@ gchar *photos_base_item_download_finish (PhotosBaseItem *se
const gchar *photos_base_item_get_author (PhotosBaseItem *self);
+gboolean photos_base_item_get_bbox_edited (PhotosBaseItem *self, GeglRectangle *out_bbox);
+
gboolean photos_base_item_get_bbox_source (PhotosBaseItem *self, GeglRectangle *bbox);
gint64 photos_base_item_get_date_created (PhotosBaseItem *self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]