Permalink
Browse files

beautify: add pick light effect.

  • Loading branch information...
1 parent 57105e5 commit 342f4b18c3f7e363631e0a1a785b3b19fbaf236a @hejiann committed Jul 18, 2012
View
1 README
@@ -27,6 +27,7 @@ CHANGELOG
2012-07-18
beautify: add blues effect
beautify: add pink lady effect
+beautify: add pick light effect
2012-07-17
beautify: add impression effect
View
@@ -1,4 +1,8 @@
-texture_astral
- ./textures/effects/astral.jpg
texture_christmas_eve
./textures/effects/christmas-eve.jpg
+texture_astral
+ ./textures/effects/astral.jpg
+texture_pick_light_1
+ ./textures/effects/pick-light-1.jpg
+texture_pick_light_2
+ ./textures/effects/pick-light-2.jpg
View
@@ -65,6 +65,7 @@ typedef enum
BEAUTIFY_EFFECT_CHRISTMAS_EVE,
BEAUTIFY_EFFECT_ASTRAL,
+ BEAUTIFY_EFFECT_PICK_LIGHT,
} BeautifyEffectType;
static const BeautifyEffectType basic_effects[] =
@@ -96,6 +97,7 @@ static const BeautifyEffectType advanced_effects[] =
BEAUTIFY_EFFECT_CHRISTMAS_EVE,
BEAUTIFY_EFFECT_ASTRAL,
+ BEAUTIFY_EFFECT_PICK_LIGHT,
};
static void query (void);
@@ -812,6 +814,9 @@ effect_icon_new (BeautifyEffectType effect)
case BEAUTIFY_EFFECT_ASTRAL:
title = "Astral";
break;
+ case BEAUTIFY_EFFECT_PICK_LIGHT:
+ title = "Pick Light";
+ break;
}
gint32 image = gimp_image_duplicate (preview_image);
@@ -1276,6 +1281,37 @@ do_effect (gint32 image, BeautifyEffectType effect)
gimp_image_merge_down (image, texture_layer, GIMP_CLIP_TO_BOTTOM_LAYER);
}
break;
+ case BEAUTIFY_EFFECT_PICK_LIGHT:
+ {
+ gint32 layer;
+ GdkPixbuf *pixbuf;
+
+ layer = gimp_layer_new (image, "color", width, height, GIMP_RGB_IMAGE, 100, GIMP_SCREEN_MODE);
+ gimp_image_insert_layer (image, layer, -1, 0);
+ GimpRGB color =
+ {
+ (gdouble) 62.0 / 255.0,
+ (gdouble) 62.0 / 255.0,
+ (gdouble) 62.0 / 255.0,
+ 1.0,
+ };
+ gimp_context_set_foreground (&color);
+ gimp_edit_fill (layer, GIMP_FOREGROUND_FILL);
+ gimp_image_merge_down (image, layer, GIMP_CLIP_TO_BOTTOM_LAYER);
+
+ pixbuf = gdk_pixbuf_new_from_inline (-1, texture_pick_light_1, FALSE, NULL);
+ layer = gimp_layer_new_from_pixbuf (image, "texture 1", pixbuf, 100, GIMP_SCREEN_MODE, 0, 0);
+ gimp_image_insert_layer (image, layer, -1, 0);
+ gimp_layer_scale (layer, width, height, FALSE);
+ gimp_image_merge_down (image, layer, GIMP_CLIP_TO_BOTTOM_LAYER);
+
+ pixbuf = gdk_pixbuf_new_from_inline (-1, texture_pick_light_2, FALSE, NULL);
+ layer = gimp_layer_new_from_pixbuf (image, "texture 2", pixbuf, 100, GIMP_SCREEN_MODE, 0, 0);
+ gimp_image_insert_layer (image, layer, -1, 0);
+ gimp_layer_scale (layer, width, height, FALSE);
+ gimp_image_merge_down (image, layer, GIMP_CLIP_TO_BOTTOM_LAYER);
+ break;
+ }
}
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 342f4b1

Please sign in to comment.