[gnome-color-manager] trivial: add gcm_color_set_Yxy()
- From: Richard Hughes <rhughes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-color-manager] trivial: add gcm_color_set_Yxy()
- Date: Wed, 13 Oct 2010 14:30:33 +0000 (UTC)
commit ddc3e0cfe755ec0472ca00a28d06cb712e75b4c9
Author: Richard Hughes <richard hughsie com>
Date: Wed Oct 13 16:22:23 2010 +0100
trivial: add gcm_color_set_Yxy()
libcolor-glib/gcm-color.c | 19 +++++++++++++++++++
libcolor-glib/gcm-color.h | 4 ++++
2 files changed, 23 insertions(+), 0 deletions(-)
---
diff --git a/libcolor-glib/gcm-color.c b/libcolor-glib/gcm-color.c
index 18e7871..9a040ad 100644
--- a/libcolor-glib/gcm-color.c
+++ b/libcolor-glib/gcm-color.c
@@ -183,6 +183,25 @@ gcm_color_set_RGB (GcmColorRGB *dest, gdouble R, gdouble G, gdouble B)
}
/**
+ * gcm_color_set_Yxy:
+ * @dest: the destination color
+ * @Y: component value
+ * @x: component value
+ * @y: component value
+ *
+ * Initialises a color value.
+ **/
+void
+gcm_color_set_Yxy (GcmColorYxy *dest, gdouble Y, gdouble x, gdouble y)
+{
+ g_return_if_fail (dest != NULL);
+
+ dest->Y = Y;
+ dest->x = x;
+ dest->y = y;
+}
+
+/**
* gcm_color_copy_XYZ:
* @src: the source color
* @dest: the destination color
diff --git a/libcolor-glib/gcm-color.h b/libcolor-glib/gcm-color.h
index 1dd8a22..db1c36d 100644
--- a/libcolor-glib/gcm-color.h
+++ b/libcolor-glib/gcm-color.h
@@ -87,6 +87,10 @@ void gcm_color_set_RGB (GcmColorRGB *dest,
gdouble R,
gdouble G,
gdouble B);
+void gcm_color_set_Yxy (GcmColorYxy *dest,
+ gdouble Y,
+ gdouble x,
+ gdouble y);
void gcm_color_copy_XYZ (const GcmColorXYZ *src,
GcmColorXYZ *dest);
void gcm_color_copy_Yxy (const GcmColorYxy *src,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]