[gimp] app: add accessors for the built-in FG->BG,	FG->transparent etc. gradients
- From: Michael Natterer <mitch src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [gimp] app: add accessors for the built-in FG->BG,	FG->transparent etc. gradients
 
- Date: Wed, 30 Apr 2014 07:20:59 +0000 (UTC)
 
commit 626da25cf973fd60a46c6e6cbdcb7e9a8a97ee62
Author: Michael Natterer <mitch gimp org>
Date:   Wed Apr 30 09:15:42 2014 +0200
    app: add accessors for the built-in FG->BG, FG->transparent etc. gradients
 app/core/gimp-gradients.c |   32 ++++++++++++++++++++++++++++++++
 app/core/gimp-gradients.h |    7 ++++++-
 2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/app/core/gimp-gradients.c b/app/core/gimp-gradients.c
index 480ab64..1d6a874 100644
--- a/app/core/gimp-gradients.c
+++ b/app/core/gimp-gradients.c
@@ -107,6 +107,38 @@ gimp_gradients_init (Gimp *gimp)
   gradient->segments->right_color_type = GIMP_GRADIENT_COLOR_FOREGROUND_TRANSPARENT;
 }
 
+GimpGradient *
+gimp_gradients_get_fg_bg_rgb (Gimp *gimp)
+{
+  g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
+
+  return g_object_get_data (G_OBJECT (gimp), FG_BG_RGB_KEY);
+}
+
+GimpGradient *
+gimp_gradients_get_fg_bg_hsv_ccw (Gimp *gimp)
+{
+  g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
+
+  return g_object_get_data (G_OBJECT (gimp), FG_BG_HSV_CCW_KEY);
+}
+
+GimpGradient *
+gimp_gradients_get_fg_bg_hsv_cw (Gimp *gimp)
+{
+  g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
+
+  return g_object_get_data (G_OBJECT (gimp), FG_BG_HSV_CW_KEY);
+}
+
+GimpGradient *
+gimp_gradients_get_fg_transparent (Gimp *gimp)
+{
+  g_return_val_if_fail (GIMP_IS_GIMP (gimp), NULL);
+
+  return g_object_get_data (G_OBJECT (gimp), FG_TRANSPARENT_KEY);
+}
+
 
 /*  private functions  */
 
diff --git a/app/core/gimp-gradients.h b/app/core/gimp-gradients.h
index 04fc381..5afda63 100644
--- a/app/core/gimp-gradients.h
+++ b/app/core/gimp-gradients.h
@@ -22,7 +22,12 @@
 #define __GIMP_GRADIENTS__
 
 
-void   gimp_gradients_init (Gimp *gimp);
+void           gimp_gradients_init               (Gimp *gimp);
+
+GimpGradient * gimp_gradients_get_fg_bg_rgb      (Gimp *gimp);
+GimpGradient * gimp_gradients_get_fg_bg_hsv_ccw  (Gimp *gimp);
+GimpGradient * gimp_gradients_get_fg_bg_hsv_cw   (Gimp *gimp);
+GimpGradient * gimp_gradients_get_fg_transparent (Gimp *gimp);
 
 
 #endif /* __GIMP_GRADIENTS__ */
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]