[gnome-photos/wip/rishi/edit-mode: 17/28] base-item: Add photos_base_item_get_bbox_source
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos/wip/rishi/edit-mode: 17/28] base-item: Add photos_base_item_get_bbox_source
- Date: Tue, 10 Nov 2015 11:29:09 +0000 (UTC)
commit 3fca1131d8e6298ab0829b411d5295b21bb47ecb
Author: Debarshi Ray <debarshir gnome org>
Date: Wed Jun 24 09:17:57 2015 +0200
base-item: Add photos_base_item_get_bbox_source
This is similar to cd695e2bdf936cbc8c74694119fc876273f538a5 except that
we make it clear that it is the bounding box of the original source
image before any editing operations were performed on it.
src/photos-base-item.c | 17 +++++++++++++++++
src/photos-base-item.h | 2 ++
2 files changed, 19 insertions(+), 0 deletions(-)
---
diff --git a/src/photos-base-item.c b/src/photos-base-item.c
index 92cfc67..1363f01 100644
--- a/src/photos-base-item.c
+++ b/src/photos-base-item.c
@@ -1341,6 +1341,23 @@ photos_base_item_get_author (PhotosBaseItem *self)
}
+gboolean
+photos_base_item_get_bbox_source (PhotosBaseItem *self, GeglRectangle *bbox)
+{
+ PhotosBaseItemPrivate *priv = self->priv;
+ gboolean ret_val = FALSE;
+
+ if (priv->buffer_source == NULL)
+ goto out;
+
+ *bbox = gegl_node_get_bounding_box (priv->buffer_source);
+ ret_val = TRUE;
+
+ out:
+ return ret_val;
+}
+
+
gint64
photos_base_item_get_date_created (PhotosBaseItem *self)
{
diff --git a/src/photos-base-item.h b/src/photos-base-item.h
index c4794d2..d21c7b1 100644
--- a/src/photos-base-item.h
+++ b/src/photos-base-item.h
@@ -108,6 +108,8 @@ gchar *photos_base_item_download_finish (PhotosBaseItem *se
const gchar *photos_base_item_get_author (PhotosBaseItem *self);
+gboolean photos_base_item_get_bbox_source (PhotosBaseItem *self, GeglRectangle *bbox);
+
gint64 photos_base_item_get_date_created (PhotosBaseItem *self);
const gchar *photos_base_item_get_default_app_name (PhotosBaseItem *self);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]