summaryrefslogtreecommitdiff
path: root/src/fl_color.cxx
diff options
context:
space:
mode:
authorAaron M. Ucko <ucko@debian.org>2010-11-10 18:47:56 -0500
committerAaron M. Ucko <ucko@debian.org>2010-11-10 18:47:56 -0500
commitbca4cadccd3dc3f056235ecb8d264abd5a3123ab (patch)
tree313466d8f58fc0c173f25301f7917a756ea56b08 /src/fl_color.cxx
parent95f5ee2210b7b1999eba0156d24566225eedf700 (diff)
Imported Upstream version 1.3~r7794
Diffstat (limited to 'src/fl_color.cxx')
-rw-r--r--src/fl_color.cxx23
1 files changed, 14 insertions, 9 deletions
diff --git a/src/fl_color.cxx b/src/fl_color.cxx
index 5946976..c55c61d 100644
--- a/src/fl_color.cxx
+++ b/src/fl_color.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_color.cxx 7617 2010-05-27 17:20:18Z manolo $"
+// "$Id: fl_color.cxx 7770 2010-10-29 22:14:59Z engelsman $"
//
// Color functions for the Fast Light Tool Kit (FLTK).
//
@@ -202,7 +202,7 @@ static inline uchar realcolor(uchar color, uchar mask) {
}
return result;
# else
- return (color&mask) | (~mask)&(mask>>1);
+ return (color&mask) | ( (~mask)&(mask>>1) );
# endif
}
@@ -361,14 +361,12 @@ void Fl::set_color(Fl_Color i, unsigned c) {
#endif // end of X-specific code
/**
- Returns the RGB value(s) for the given FLTK color index. The
- first form returns the RGB values packed in a 32-bit unsigned
+ Returns the RGB value(s) for the given FLTK color index.
+
+ This form returns the RGB values packed in a 32-bit unsigned
integer with the red value in the upper 8 bits, the green value
in the next 8 bits, and the blue value in bits 8-15. The lower
8 bits will always be 0.
-
- The second form returns the red, green, and blue values
- separately in referenced variables.
*/
unsigned Fl::get_color(Fl_Color i) {
if (i & 0xffffff00) return (i);
@@ -383,7 +381,14 @@ void Fl::set_color(Fl_Color i, uchar red, uchar green, uchar blue) {
Fl::set_color((Fl_Color)(i & 255),
((unsigned)red<<24)+((unsigned)green<<16)+((unsigned)blue<<8));
}
-/** See unsigned get_color(Fl_Color c) */
+/**
+ Returns the RGB value(s) for the given FLTK color index.
+
+ This form returns the red, green, and blue values
+ separately in referenced variables.
+
+ See also unsigned get_color(Fl_Color c)
+ */
void Fl::get_color(Fl_Color i, uchar &red, uchar &green, uchar &blue) {
unsigned c;
@@ -465,5 +470,5 @@ Fl_Color fl_contrast(Fl_Color fg, Fl_Color bg) {
@}
*/
//
-// End of "$Id: fl_color.cxx 7617 2010-05-27 17:20:18Z manolo $".
+// End of "$Id: fl_color.cxx 7770 2010-10-29 22:14:59Z engelsman $".
//