mirror of https://github.com/GNOME/gimp.git
Some more gtkdocs.
2003-10-14 Dave Neary <bolsh@gimp.org> * libgimpcolor/gimpcolorspace.c: Some more gtkdocs.
This commit is contained in:
parent
0eb7e92a15
commit
4cfb8d3dcd
|
@ -1,3 +1,7 @@
|
|||
2003-10-14 Dave Neary <bolsh@gimp.org>
|
||||
|
||||
* libgimpcolor/gimpcolorspace.c: Some more gtkdocs.
|
||||
|
||||
2003-10-14 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/composite/gimp-composite.h: don't use gtk-doc style comments
|
||||
|
|
|
@ -182,7 +182,7 @@ gimp_hsv_to_rgb (const GimpHSV *hsv,
|
|||
* @rgb: A color value in the RGB colorspace
|
||||
* @hsl: The value converted to HSL
|
||||
*
|
||||
* Convert an RGB color value to a HSL (Hue, Saturation, Luminosity) color
|
||||
* Convert an RGB color value to a HSL (Hue, Saturation, Lightness) color
|
||||
* value.
|
||||
**/
|
||||
void
|
||||
|
@ -401,6 +401,21 @@ gimp_cmyk_to_rgb (const GimpCMYK *cmyk,
|
|||
* be defined as 0 in situations where only unsigned numbers are desired.
|
||||
*****************************************************************************/
|
||||
|
||||
/**
|
||||
* gimp_rgb_to_hwb:
|
||||
* @rgb: A color value in the RGB colorspace
|
||||
* @hue: The hue value of the above color, in the range 0 to 6
|
||||
* @whiteness: The whiteness value of the above color, in the range 0 to 1
|
||||
* @blackness: The blackness value of the above color, in the range 0 to 1
|
||||
*
|
||||
* Theoretically, hue 0 (pure red) is identical to hue 6 in these transforms.
|
||||
* Pure red always maps to 6 in this implementation. Therefore UNDEFINED can
|
||||
* be defined as 0 in situations where only unsigned numbers are desired.
|
||||
*
|
||||
* RGB are each on [0, 1]. Whiteness and Blackness are returned in the
|
||||
* range [0, 1] and H is returned in the range [0, 6]. If W == 1 - B, H is
|
||||
* undefined.
|
||||
**/
|
||||
void
|
||||
gimp_rgb_to_hwb (const GimpRGB *rgb,
|
||||
gdouble *hue,
|
||||
|
@ -435,6 +450,16 @@ gimp_rgb_to_hwb (const GimpRGB *rgb,
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_hwb_to_rgb:
|
||||
* @hue: A hue value, in the range 0 to 6
|
||||
* @whiteness: A whiteness value, in the range 0 to 1
|
||||
* @blackness: A blackness value, in the range 0 to 1
|
||||
* @rgb: The above color converted to the RGB colorspace
|
||||
*
|
||||
* H is defined in the range [0, 6] or UNDEFINED, B and W are both in the
|
||||
* range [0, 1]. The returned RGB values are all in the range [0, 1].
|
||||
**/
|
||||
void
|
||||
gimp_hwb_to_rgb (gdouble hue,
|
||||
gdouble whiteness,
|
||||
|
@ -491,6 +516,19 @@ gimp_hwb_to_rgb (gdouble hue,
|
|||
|
||||
/* gint functions */
|
||||
|
||||
/**
|
||||
* gimp_rgb_to_hsv_int:
|
||||
* @red: The red channel value, returns the Hue channel
|
||||
* @green: The green channel value, returns the Saturation channel
|
||||
* @blue: The blue channel value, returns the Value channel
|
||||
*
|
||||
* The arguments are pointers to int representing channel values in the
|
||||
* RGB colorspace, and the values pointed to are all in the range [0, 255].
|
||||
*
|
||||
* The function changes the arguments to point to the HSV value corresponding,
|
||||
* with the returned values in the following
|
||||
* ranges: H [0, 360], S [0, 255], V [0, 255].
|
||||
**/
|
||||
void
|
||||
gimp_rgb_to_hsv_int (gint *red,
|
||||
gint *green,
|
||||
|
@ -545,6 +583,18 @@ gimp_rgb_to_hsv_int (gint *red,
|
|||
*blue = ROUND (v);
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_hsv_to_rgb_int:
|
||||
* @hue: The hue channel, returns the red channel
|
||||
* @saturation: The saturation channel, returns the green channel
|
||||
* @value: The value channel, returns the blue channel
|
||||
*
|
||||
* The arguments are pointers to int, with the values pointed to in the
|
||||
* following ranges: H [0, 360], S [0, 255], V [0, 255].
|
||||
*
|
||||
* The function changes the arguments to point to the RGB value
|
||||
* corresponding, with the returned values all in the range [0, 255].
|
||||
**/
|
||||
void
|
||||
gimp_hsv_to_rgb_int (gint *hue,
|
||||
gint *saturation,
|
||||
|
@ -619,6 +669,19 @@ gimp_hsv_to_rgb_int (gint *hue,
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_rgb_to_hls_int:
|
||||
* @red: Red channel, returns Hue channel
|
||||
* @green: Green channel, returns Lightness channel
|
||||
* @blue: Blue channel, returns Saturation channel
|
||||
*
|
||||
* The arguments are pointers to int representing channel values in the
|
||||
* RGB colorspace, and the values pointed to are all in the range [0, 255].
|
||||
*
|
||||
* The function changes the arguments to point to the corresponding HLS
|
||||
* value with the values pointed to in the following ranges: H [0, 360],
|
||||
* L [0, 255], S [0, 255].
|
||||
**/
|
||||
void
|
||||
gimp_rgb_to_hls_int (gint *red,
|
||||
gint *green,
|
||||
|
@ -680,6 +743,17 @@ gimp_rgb_to_hls_int (gint *red,
|
|||
*blue = ROUND (s);
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_rgb_to_l_int:
|
||||
* @red: Red channel
|
||||
* @green: Green channel
|
||||
* @blue: Blue channel
|
||||
*
|
||||
* Calculates the luminance value of an RGB triplet with the formula
|
||||
* L = (max(R, G, B) + min (R, G, B)) / 2
|
||||
*
|
||||
* Return value: Luminance vaue corresponding to the input RGB value
|
||||
**/
|
||||
gint
|
||||
gimp_rgb_to_l_int (gint red,
|
||||
gint green,
|
||||
|
@ -725,6 +799,18 @@ gimp_hls_value (gdouble n1,
|
|||
return ROUND (value * 255.0);
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_hls_to_rgb_int:
|
||||
* @hue: Hue channel, returns Red channel
|
||||
* @lightness: Lightness channel, returns Green channel
|
||||
* @saturation: Saturation channel, returns Blue channel
|
||||
*
|
||||
* The arguments are pointers to int, with the values pointed to in the
|
||||
* following ranges: H [0, 360], L [0, 255], S [0, 255].
|
||||
*
|
||||
* The function changes the arguments to point to the RGB value
|
||||
* corresponding, with the returned values all in the range [0, 255].
|
||||
**/
|
||||
void
|
||||
gimp_hls_to_rgb_int (gint *hue,
|
||||
gint *lightness,
|
||||
|
|
Loading…
Reference in New Issue