[gimp/blend-tool-fun: 92/163] app: save first and last color of the blend tool gradient...
- From: Michael Henning <mhenning src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/blend-tool-fun: 92/163] app: save first and last color of the blend tool gradient...
- Date: Mon, 26 Oct 2015 02:25:57 +0000 (UTC)
commit cf6c415358f5afb681567ac437740bbd4e0ce61e
Author: Jehan <jehan girinstud io>
Date: Wed Sep 30 17:10:10 2015 +0200
app: save first and last color of the blend tool gradient...
in the recently used colors palette.
app/core/gimpdrawable-blend.c | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/app/core/gimpdrawable-blend.c b/app/core/gimpdrawable-blend.c
index 45ef958..189ce63 100644
--- a/app/core/gimpdrawable-blend.c
+++ b/app/core/gimpdrawable-blend.c
@@ -34,6 +34,7 @@
#include "gegl/gimp-gegl-utils.h"
#include "gimp.h"
+#include "gimp-palettes.h"
#include "gimp-utils.h"
#include "gimpchannel.h"
#include "gimpcontext.h"
@@ -96,6 +97,7 @@ gimp_drawable_blend (GimpDrawable *drawable,
{
GimpImage *image;
GeglBuffer *buffer;
+ GimpRGB color;
gint x, y, width, height;
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));
@@ -111,6 +113,12 @@ gimp_drawable_blend (GimpDrawable *drawable,
gimp_set_busy (image->gimp);
+ /* Let's save the first and last color of a gradient. */
+ gimp_gradient_get_color_at (gradient, context, NULL, 0.0, FALSE, &color);
+ gimp_palettes_add_color_history (context->gimp, &color);
+ gimp_gradient_get_color_at (gradient, context, NULL, 1.0, FALSE, &color);
+ gimp_palettes_add_color_history (context->gimp, &color);
+
/* Always create an alpha temp buf (for generality) */
buffer = gegl_buffer_new (GEGL_RECTANGLE (x, y, width, height),
gimp_drawable_get_format_with_alpha (drawable));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]