app: Add "FG to BG (Hardedge)" gradient

Add internal gradient "FG to BG (Hardedge)" based on gradient by
Saul Goode. See bug #589371.
This commit is contained in:
Martin Nordholts 2009-08-15 11:58:08 +02:00
parent 98aaae7cac
commit 966b81992b
1 changed files with 18 additions and 0 deletions

View File

@ -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)"),