[gimp/goat-invasion] app: use gimp_gegl_color_new() instead of gegl_color_set_rgba()
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/goat-invasion] app: use gimp_gegl_color_new() instead of gegl_color_set_rgba()
- Date: Sun, 15 Apr 2012 22:54:25 +0000 (UTC)
commit b294dfaf1b92e6066869d4ca674ac50c0038259c
Author: Michael Natterer <mitch gimp org>
Date: Mon Apr 16 00:53:50 2012 +0200
app: use gimp_gegl_color_new() instead of gegl_color_set_rgba()
app/core/gimpchannel.c | 25 +++----------------------
app/gegl/gimp-gegl-config-proxy.c | 9 +++------
2 files changed, 6 insertions(+), 28 deletions(-)
---
diff --git a/app/core/gimpchannel.c b/app/core/gimpchannel.c
index 02b35dc..03dd8ca 100644
--- a/app/core/gimpchannel.c
+++ b/app/core/gimpchannel.c
@@ -882,12 +882,7 @@ gimp_channel_get_node (GimpItem *item)
source = gimp_drawable_get_source_node (drawable);
gegl_node_add_child (node, source);
- color = gegl_color_new (NULL);
- gegl_color_set_rgba (color,
- channel->color.r,
- channel->color.g,
- channel->color.b,
- channel->color.a);
+ color = gimp_gegl_color_new (&channel->color);
g_warn_if_fail (channel->color_node == NULL);
@@ -1759,14 +1754,7 @@ gimp_channel_set_color (GimpChannel *channel,
if (channel->color_node)
{
- GeglColor *gegl_color;
-
- gegl_color = gegl_color_new (NULL);
- gegl_color_set_rgba (gegl_color,
- channel->color.r,
- channel->color.g,
- channel->color.b,
- channel->color.a);
+ GeglColor *gegl_color = gimp_gegl_color_new (&channel->color);
gegl_node_set (channel->color_node,
"value", gegl_color,
@@ -1825,14 +1813,7 @@ gimp_channel_set_opacity (GimpChannel *channel,
if (channel->color_node)
{
- GeglColor *gegl_color;
-
- gegl_color = gegl_color_new (NULL);
- gegl_color_set_rgba (gegl_color,
- channel->color.r,
- channel->color.g,
- channel->color.b,
- channel->color.a);
+ GeglColor *gegl_color = gimp_gegl_color_new (&channel->color);
gegl_node_set (channel->color_node,
"value", gegl_color,
diff --git a/app/gegl/gimp-gegl-config-proxy.c b/app/gegl/gimp-gegl-config-proxy.c
index b9321d6..0cdf4c8 100644
--- a/app/gegl/gimp-gegl-config-proxy.c
+++ b/app/gegl/gimp-gegl-config-proxy.c
@@ -31,6 +31,7 @@
#include "core/gimpparamspecs-duplicate.h"
#include "gimp-gegl-config-proxy.h"
+#include "gimp-gegl-utils.h"
static GHashTable *config_types = NULL;
@@ -278,17 +279,13 @@ gimp_gegl_config_proxy_sync (GimpObject *proxy,
if (GIMP_IS_PARAM_SPEC_RGB (gimp_pspec))
{
- GeglColor *gegl_color = gegl_color_new (NULL);
GimpRGB gimp_color;
+ GeglColor *gegl_color;
gimp_value_get_rgb (&value, &gimp_color);
g_value_unset (&value);
- gegl_color_set_rgba (gegl_color,
- gimp_color.r,
- gimp_color.g,
- gimp_color.b,
- gimp_color.a);
+ gegl_color = gimp_gegl_color_new (&gimp_color);
g_value_init (&value, gegl_pspec->value_type);
g_value_take_object (&value, gegl_color);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]