Commit c36721cc authored by Richard Hughes's avatar Richard Hughes

trivial: add gcm_color_init_XYZ() and gcm_color_init_RGB() for future code

parent 9408d577
......@@ -33,6 +33,44 @@
#include <gcm-color.h>
/**
* gcm_color_init_XYZ:
* @dest: the destination color
* @X: component value
* @Y: component value
* @Z: component value
*
* Initialises a color value.
**/
void
gcm_color_init_XYZ (GcmColorXYZ *dest, gdouble X, gdouble Y, gdouble Z)
{
g_return_if_fail (dest != NULL);
dest->X = X;
dest->Y = Y;
dest->Z = Z;
}
/**
* gcm_color_init_RGB:
* @dest: the destination color
* @R: component value
* @G: component value
* @B: component value
*
* Initialises a color value.
**/
void
gcm_color_init_RGB (GcmColorRGB *dest, gdouble R, gdouble G, gdouble B)
{
g_return_if_fail (dest != NULL);
dest->R = R;
dest->G = G;
dest->B = B;
}
/**
* gcm_color_copy_XYZ:
* @src: the source color
......
......@@ -58,6 +58,14 @@ typedef struct {
gdouble B;
} GcmColorRGB;
void gcm_color_init_XYZ (GcmColorXYZ *dest,
gdouble X,
gdouble Y,
gdouble Z);
void gcm_color_init_RGB (GcmColorRGB *dest,
gdouble R,
gdouble G,
gdouble B);
void gcm_color_copy_XYZ (const GcmColorXYZ *src,
GcmColorXYZ *dest);
void gcm_color_copy_RGB (const GcmColorRGB *src,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment