Skip to content
Browse files

beautify: add sunset gradient effect.

  • Loading branch information...
1 parent c51d866 commit f03f163f8d28c4c1a30a040b2106b218c3493fde @hejiann committed
Showing with 21 additions and 1 deletion.
  1. +1 −0 README
  2. +13 −0 beautify-effect.c
  3. +1 −1 beautify-effect.h
  4. +2 −0 beautify-textures.list
  5. +4 −0 beautify.c
  6. BIN textures/effects/sunset-gradient.jpg
View
1 README
@@ -55,6 +55,7 @@ beautify: add glass drops effect.
beautify: add life sketch effect.
beautify: add color pencil effect.
rip-border: add custom texures support.
+beautify: add sunset gradient effect.
2012-07-29
texture-border: add custom texures support.
View
13 beautify-effect.c
@@ -1568,6 +1568,19 @@ run_effect (gint32 image_ID, BeautifyEffectType effect)
break;
}
+ case BEAUTIFY_EFFECT_SUNSET_GRADIENT:
+ {
+ gint32 layer;
+ GdkPixbuf *pixbuf;
+
+ pixbuf = gdk_pixbuf_new_from_inline (-1, texture_sunset_gradient, FALSE, NULL);
+ layer = gimp_layer_new_from_pixbuf (image_ID, "texture", pixbuf, 100, GIMP_SCREEN_MODE, 0, 0);
+ gimp_image_add_layer (image_ID, layer, -1);
+ gimp_layer_scale (layer, width, height, FALSE);
+ gimp_image_merge_down (image_ID, layer, GIMP_CLIP_TO_BOTTOM_LAYER);
+
+ break;
+ }
case BEAUTIFY_EFFECT_BEAM_GRADIENT:
{
guint8 red_pts[] = {
View
2 beautify-effect.h
@@ -97,7 +97,7 @@ typedef enum
BEAUTIFY_EFFECT_PAINTING, // TODO
BEAUTIFY_EFFECT_BEAM_GRADIENT,
- BEAUTIFY_EFFECT_SUNSET_GRADIENT, // TODO
+ BEAUTIFY_EFFECT_SUNSET_GRADIENT,
BEAUTIFY_EFFECT_COOL_GRADIENT, // TODO
BEAUTIFY_EFFECT_BLUE_YELLOW_GRADIENT, // TODO
BEAUTIFY_EFFECT_RAINBOW_GRADIENT, // TODO
View
2 beautify-textures.list
@@ -30,5 +30,7 @@ texture_color_pencil
./textures/effects/color-pencil.jpg
texture_beam_gradient
./textures/effects/beam-gradient.png
+texture_sunset_gradient
+ ./textures/effects/sunset-gradient.jpg
texture_pink_blue_gradient
./textures/effects/pink-blue-gradient.png
View
4 beautify.c
@@ -110,6 +110,7 @@ static const BeautifyEffectType art_effects[] =
static const BeautifyEffectType gradient_effects[] =
{
BEAUTIFY_EFFECT_BEAM_GRADIENT,
+ BEAUTIFY_EFFECT_SUNSET_GRADIENT,
BEAUTIFY_EFFECT_PINK_BLUE_GRADIENT,
};
@@ -1055,6 +1056,9 @@ effect_icon_new (BeautifyEffectType effect)
case BEAUTIFY_EFFECT_COLOR_PENCIL:
title = "Color Pencil";
break;
+ case BEAUTIFY_EFFECT_SUNSET_GRADIENT:
+ title = "Sunset Gradient";
+ break;
case BEAUTIFY_EFFECT_BEAM_GRADIENT:
title = "Beam Gradient";
break;
View
BIN textures/effects/sunset-gradient.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f03f163

Please sign in to comment.
Something went wrong with that request. Please try again.