[gimp] app: add gimp_canvas_corner_set() which sets everything except the anchor
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: add gimp_canvas_corner_set() which sets everything except the anchor
- Date: Sat, 24 Jun 2017 18:17:18 +0000 (UTC)
commit 9c3a2b5021b5e91e1f6ae5385a1bb58b120eec87
Author: Michael Natterer <mitch gimp org>
Date: Sat Jun 24 17:27:53 2017 +0200
app: add gimp_canvas_corner_set() which sets everything except the anchor
app/display/gimpcanvascorner.c | 25 +++++++++++++++++++++++++
app/display/gimpcanvascorner.h | 9 +++++++++
2 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/app/display/gimpcanvascorner.c b/app/display/gimpcanvascorner.c
index 1d02a4e..8acc683 100644
--- a/app/display/gimpcanvascorner.c
+++ b/app/display/gimpcanvascorner.c
@@ -445,3 +445,28 @@ gimp_canvas_corner_new (GimpDisplayShell *shell,
"outside", outside,
NULL);
}
+
+void
+gimp_canvas_corner_set (GimpCanvasItem *corner,
+ gdouble x,
+ gdouble y,
+ gdouble width,
+ gdouble height,
+ gint corner_width,
+ gint corner_height,
+ gboolean outside)
+{
+ g_return_if_fail (GIMP_IS_CANVAS_CORNER (corner));
+
+ gimp_canvas_item_begin_change (corner);
+ g_object_set (corner,
+ "x", x,
+ "y", y,
+ "width", width,
+ "height", height,
+ "corner-width", corner_width,
+ "corner-height", corner_height,
+ "outside", outside,
+ NULL);
+ gimp_canvas_item_end_change (corner);
+}
diff --git a/app/display/gimpcanvascorner.h b/app/display/gimpcanvascorner.h
index cbc28c3..d0c3901 100644
--- a/app/display/gimpcanvascorner.h
+++ b/app/display/gimpcanvascorner.h
@@ -59,5 +59,14 @@ GimpCanvasItem * gimp_canvas_corner_new (GimpDisplayShell *shell,
gint corner_height,
gboolean outside);
+void gimp_canvas_corner_set (GimpCanvasItem *corner,
+ gdouble x,
+ gdouble y,
+ gdouble width,
+ gdouble height,
+ gint corner_width,
+ gint corner_height,
+ gboolean outside);
+
#endif /* __GIMP_CANVAS_CORNER_H__ */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]