[gimp] app: Add "FG to BG (Hardedge)" gradient
- From: Martin Nordholts <martinn src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] app: Add "FG to BG (Hardedge)" gradient
- Date: Sat, 15 Aug 2009 09:55:55 +0000 (UTC)
commit 966b81992b3a614542ba8413a50fea49dad7ffe9
Author: Martin Nordholts <martinn src gnome org>
Date: Sat Aug 15 11:58:08 2009 +0200
app: Add "FG to BG (Hardedge)" gradient
Add internal gradient "FG to BG (Hardedge)" based on gradient by
Saul Goode. See bug #589371.
app/core/gimp-gradients.c | 18 ++++++++++++++++++
1 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimp-gradients.c b/app/core/gimp-gradients.c
index 0196d78..13052ab 100644
--- a/app/core/gimp-gradients.c
+++ b/app/core/gimp-gradients.c
@@ -35,6 +35,7 @@
#define FG_BG_RGB_KEY "gimp-gradient-fg-bg-rgb"
+#define FG_BG_HARDEDGE_KEY "gimp-gradient-fg-bg-rgb"
#define FG_BG_HSV_CCW_KEY "gimp-gradient-fg-bg-hsv-ccw"
#define FG_BG_HSV_CW_KEY "gimp-gradient-fg-bg-hsv-cw"
#define FG_TRANSPARENT_KEY "gimp-gradient-fg-transparent"
@@ -64,6 +65,23 @@ gimp_gradients_init (Gimp *gimp)
gradient->segments->right_color_type = GIMP_GRADIENT_COLOR_BACKGROUND;
gimp_context_set_gradient (gimp->user_context, gradient);
+ /* FG to BG (Hardedge) */
+ gradient = gimp_gradients_add_gradient (gimp,
+ _("FG to BG (Hardedge)"),
+ FG_BG_HARDEDGE_KEY);
+ gradient->segments->left = 0.00;
+ gradient->segments->middle = 0.25;
+ gradient->segments->right = 0.50;
+ gradient->segments->left_color_type = GIMP_GRADIENT_COLOR_FOREGROUND;
+ gradient->segments->right_color_type = GIMP_GRADIENT_COLOR_FOREGROUND;
+ gradient->segments->next = gimp_gradient_segment_new ();
+ gradient->segments->next->prev = gradient->segments->next;
+ gradient->segments->next->left = 0.50;
+ gradient->segments->next->middle = 0.75;
+ gradient->segments->next->right = 1.00;
+ gradient->segments->next->left_color_type = GIMP_GRADIENT_COLOR_BACKGROUND;
+ gradient->segments->next->right_color_type = GIMP_GRADIENT_COLOR_BACKGROUND;
+
/* FG to BG (HSV counter-clockwise) */
gradient = gimp_gradients_add_gradient (gimp,
_("FG to BG (HSV counter-clockwise)"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]