[gegl] GeglColor: remove gegl_color_get_rgba4f



commit 8c4f835f2f617e150a8ee0bbe53de54243e2dc54
Author: Ãyvind KolÃs <pippin gimp org>
Date:   Mon Apr 2 16:15:16 2012 +0100

    GeglColor: remove gegl_color_get_rgba4f
    
    gegl_color_get_pixel with babl_format ("RGBA float"), serves the same purpose.

 gegl/property-types/gegl-color.c      |   11 -----------
 gegl/property-types/gegl-color.h      |   11 -----------
 operations/common/checkerboard.c      |    4 ++--
 operations/common/color-to-alpha.c    |    2 +-
 operations/common/color.c             |    2 +-
 operations/common/grid.c              |    2 +-
 operations/common/vignette.c          |    4 ++--
 operations/external/path.c            |    2 +-
 operations/external/text.c            |    2 +-
 operations/workshop/linear-gradient.c |    4 ++--
 operations/workshop/radial-gradient.c |    4 ++--
 11 files changed, 13 insertions(+), 35 deletions(-)
---
diff --git a/gegl/property-types/gegl-color.c b/gegl/property-types/gegl-color.c
index 9c69880..77f2518 100644
--- a/gegl/property-types/gegl-color.c
+++ b/gegl/property-types/gegl-color.c
@@ -285,17 +285,6 @@ void         gegl_color_get_pixel              (GeglColor   *color,
 }
 
 void
-gegl_color_get_rgba4f (GeglColor   *color,
-                       gfloat      *rgba)
-{
-  gint i;
-  g_return_if_fail (GEGL_IS_COLOR (color));
-
-  for (i=0; i< 4; i++)
-    rgba[i] = color->priv->rgba_color[i];
-}
-
-void
 gegl_color_set_rgba (GeglColor *self,
                      gdouble    r,
                      gdouble    g,
diff --git a/gegl/property-types/gegl-color.h b/gegl/property-types/gegl-color.h
index 1271071..9ccd94a 100644
--- a/gegl/property-types/gegl-color.h
+++ b/gegl/property-types/gegl-color.h
@@ -83,17 +83,6 @@ void         gegl_color_get_rgba               (GeglColor   *color,
                                                 gdouble     *alpha);
 
 /**
- * gegl_color_get_rgba4f:
- * @color: a #GeglColor
- * @buf: pointer to a buffer for a single "RGBA float" pixel.
- *
- * Retrieves the current set color as linear light non premultipled RGBA data,
- * and stores it at the memory location in @buf
- */
-void         gegl_color_get_rgba4f             (GeglColor   *color,
-                                                gfloat      *buf);
-
-/**
  * gegl_color_set_rgba:
  * @color: a #GeglColor
  * @red: red value
diff --git a/operations/common/checkerboard.c b/operations/common/checkerboard.c
index 8131fe8..de3089f 100644
--- a/operations/common/checkerboard.c
+++ b/operations/common/checkerboard.c
@@ -68,8 +68,8 @@ process (GeglOperation       *operation,
   gint        x = roi->x; /* initial x                   */
   gint        y = roi->y; /*           and y coordinates */
 
-  gegl_color_get_rgba4f (o->color1, color1);
-  gegl_color_get_rgba4f (o->color2, color2);
+  gegl_color_get_pixel (o->color1, babl_format ("RGBA float"), color1);
+  gegl_color_get_pixel (o->color2, babl_format ("RGBA float"), color2);
 
   while (n_pixels--)
     {
diff --git a/operations/common/color-to-alpha.c b/operations/common/color-to-alpha.c
index 6b1bcea..dbbf656 100644
--- a/operations/common/color-to-alpha.c
+++ b/operations/common/color-to-alpha.c
@@ -139,7 +139,7 @@ process (GeglOperation       *operation,
   gegl_buffer_get (input, result, 1.0, format, src_buf,
                    GEGL_AUTO_ROWSTRIDE, GEGL_ABYSS_NONE);
 
-  gegl_color_get_rgba4f (o->color, color);
+  gegl_color_get_pixel (o->color, babl_format ("RGBA float"), color);
 
   for (x = 0; x < result->width * result->height; x++)
     color_to_alpha (color, src_buf, 4 * x);
diff --git a/operations/common/color.c b/operations/common/color.c
index 61fd7f4..f5d756c 100644
--- a/operations/common/color.c
+++ b/operations/common/color.c
@@ -53,7 +53,7 @@ gegl_color_op_process (GeglOperation       *operation,
   gfloat     *out_pixel = out_buf;
   gfloat      color[4];
 
-  gegl_color_get_rgba4f (o->value, color);
+  gegl_color_get_pixel (o->value, babl_format ("RGBA float"), color);
 
   while (n_pixels--)
     {
diff --git a/operations/common/grid.c b/operations/common/grid.c
index 835587e..c5590ab 100644
--- a/operations/common/grid.c
+++ b/operations/common/grid.c
@@ -68,7 +68,7 @@ process (GeglOperation       *operation,
   gint        x = roi->x; /* initial x         */
   gint        y = roi->y; /* and y coordinates */
 
-  gegl_color_get_rgba4f (o->line_color, line_color);
+  gegl_color_get_pixel (o->line_color, babl_format ("RGBA float"), line_color);
 
   while (n_pixels--)
     {
diff --git a/operations/common/vignette.c b/operations/common/vignette.c
index a53facc..da78293 100644
--- a/operations/common/vignette.c
+++ b/operations/common/vignette.c
@@ -176,7 +176,7 @@ cl_process (GeglOperation       *operation,
   if (scale > 1.0)
     length /= scale;
 
-  gegl_color_get_rgba4f (o->color, color);
+  gegl_color_get_pixel (o->color, babl_format ("RGBA float"), color);
 
   for (x=0; x<3; x++)   /* premultiply */
     color[x] *= color[3];
@@ -277,7 +277,7 @@ process (GeglOperation       *operation,
   if (scale > 1.0)
     length /= scale;
 
-  gegl_color_get_rgba4f (o->color, color);
+  gegl_color_get_pixel (o->color, babl_format ("RGBA float"), color);
 
   for (x=0; x<3; x++)   /* premultiply */
     color[x] *= color[3];
diff --git a/operations/external/path.c b/operations/external/path.c
index 608b962..c8ed820 100644
--- a/operations/external/path.c
+++ b/operations/external/path.c
@@ -232,7 +232,7 @@ gegl_path_stamp (GeglBuffer *buffer,
   roi.width = ceil (x+radius) - floor (x-radius);
   roi.height = ceil (y+radius) - floor (y-radius);
 
-  gegl_color_get_rgba4f (color, col);
+  gegl_color_get_pixel (color, babl_format ("RGBA float"), col);
 
   /* bail out if we wouldn't leave a mark on the buffer */
   if (!gegl_rectangle_intersect (&temp, &roi, clip_rect))
diff --git a/operations/external/text.c b/operations/external/text.c
index bb7ac84..b9b17f2 100644
--- a/operations/external/text.c
+++ b/operations/external/text.c
@@ -123,7 +123,7 @@ static void text_layout_text (GeglChant *self,
   attrs = pango_attr_list_new ();
   if (attrs)
   {
-    gegl_color_get_rgba4f (o->color, color);
+    gegl_color_get_pixel (o->color, babl_format ("RGBA float"), color);
     attr = pango_attr_foreground_new ((guint16) (color[0] * 65535),
                                       (guint16) (color[1] * 65535),
                                       (guint16) (color[2] * 65535));
diff --git a/operations/workshop/linear-gradient.c b/operations/workshop/linear-gradient.c
index bb86153..3e17870 100644
--- a/operations/workshop/linear-gradient.c
+++ b/operations/workshop/linear-gradient.c
@@ -73,8 +73,8 @@ process (GeglOperation       *operation,
 
   gfloat length = dist (o->x1, o->y1, o->x2, o->y2);
 
-  gegl_color_get_rgba4f (o->color1, color1);
-  gegl_color_get_rgba4f (o->color2, color2);
+  gegl_color_get_pixel (o->color1, babl_format ("RGBA float"), color1);
+  gegl_color_get_pixel (o->color2, babl_format ("RGBA float"), color2);
 
 
   x= roi->x;
diff --git a/operations/workshop/radial-gradient.c b/operations/workshop/radial-gradient.c
index 5bea108..99c32a3 100644
--- a/operations/workshop/radial-gradient.c
+++ b/operations/workshop/radial-gradient.c
@@ -71,8 +71,8 @@ process (GeglOperation       *operation,
   gint        x, y;
   gfloat length = dist (o->x1, o->y1, o->x2, o->y2);
 
-  gegl_color_get_rgba4f (o->color1, color1);
-  gegl_color_get_rgba4f (o->color2, color2);
+  gegl_color_get_pixel (o->color1, babl_format ("RGBA float"), color1);
+  gegl_color_get_pixel (o->color2, babl_format ("RGBA float"), color2);
 
   x= roi->x;
   y= roi->y;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]