[gegl] buffer: use gegl_color_get_pixel in gegl_buffer_set_color
- From: Ãyvind KolÃs <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] buffer: use gegl_color_get_pixel in gegl_buffer_set_color
- Date: Thu, 15 Mar 2012 22:35:35 +0000 (UTC)
commit f3301771e8327a5af52a05c33ac2cc24588f329f
Author: Ãyvind KolÃs <pippin gimp org>
Date: Thu Mar 15 22:34:46 2012 +0000
buffer: use gegl_color_get_pixel in gegl_buffer_set_color
gegl/buffer/gegl-buffer-access.c | 4 +---
gegl/property-types/gegl-color.c | 4 ++--
gegl/property-types/gegl-color.h | 11 ++++-------
3 files changed, 7 insertions(+), 12 deletions(-)
---
diff --git a/gegl/buffer/gegl-buffer-access.c b/gegl/buffer/gegl-buffer-access.c
index a1f5600..7ef486a 100644
--- a/gegl/buffer/gegl-buffer-access.c
+++ b/gegl/buffer/gegl-buffer-access.c
@@ -1226,9 +1226,7 @@ void gegl_buffer_set_color (GeglBuffer *dst,
g_return_if_fail (GEGL_IS_BUFFER (dst));
g_return_if_fail (color);
- gegl_color_get_rgba4f (color, rgbaf);
- babl_process (babl_fish (babl_format ("RGBA float"), dst->format),
- rgbaf, buf, 1);
+ gegl_color_get_pixel (color, dst->format, rgbaf);
if (!dst_rect)
{
diff --git a/gegl/property-types/gegl-color.c b/gegl/property-types/gegl-color.c
index be8aee9..c47607c 100644
--- a/gegl/property-types/gegl-color.c
+++ b/gegl/property-types/gegl-color.c
@@ -259,7 +259,7 @@ gegl_color_float4 (GeglColor *self)
#endif
void gegl_color_set_pixel (GeglColor *color,
- Babl *format,
+ const Babl *format,
const void *pixel)
{
g_return_if_fail (GEGL_IS_COLOR (color));
@@ -272,7 +272,7 @@ void gegl_color_set_pixel (GeglColor *color,
}
void gegl_color_get_pixel (GeglColor *color,
- Babl *format,
+ const Babl *format,
void *pixel)
{
g_return_if_fail (GEGL_IS_COLOR (color));
diff --git a/gegl/property-types/gegl-color.h b/gegl/property-types/gegl-color.h
index adaf1ae..87082e4 100644
--- a/gegl/property-types/gegl-color.h
+++ b/gegl/property-types/gegl-color.h
@@ -112,25 +112,22 @@ void gegl_color_set_rgba (GeglColor *color,
* gegl_color_set_pixel:
* @color: a #GeglColor
* @format: a babl pixel format
- * @pixelx: pointer to a pixel
+ * @pixel: pointer to a pixel
*
* Set a GeglColor from a pointer to a pixel and it's babl format.
*/
void gegl_color_set_pixel (GeglColor *color,
- Babl *format,
+ const Babl *format,
const void *pixel);
/**
* gegl_color_get_pixel:
* @color: a #GeglColor
- * @red: red value
- * @green: green value
- * @blue: blue value
- * @alpha: alpha value
+ * @pixel: pointer to a pixel
*
* Store the color in a pixel in the given format.
*/
void gegl_color_get_pixel (GeglColor *color,
- Babl *format,
+ const Babl *format,
void *pixel);
/***
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]