diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-04-11 10:46:19 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-04-11 10:46:19 +0000 |
| commit | ef36be385e5bedc22f5e1da11b5eca4a55d3c0b5 (patch) | |
| tree | 4b8ba90bd67e80284d77f4cccdf697706cad9cb9 /src/fl_set_gray.cxx | |
| parent | a9b5c825a4b86454fc1aedccb07dd91713ee8873 (diff) | |
Redefine FL_ color values to use the color cube.
Add FL_BACKGROUND_COLOR, FL_BACKGROUND2_COLOR, and FL_FOREGROUND_COLOR,
and use them instead of FL_GRAY, FL_WHITE, and FL_BLACK, respectively.
(FL_GRAY defined to FL_BACKGROUND_COLOR for back-compatibility)
Add fl_rgb_color(uchar g) inline method to map 8-bit grayscale to
24-bit RGB color.
Doco updates for all of this...
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2072 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_set_gray.cxx')
| -rw-r--r-- | src/fl_set_gray.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/fl_set_gray.cxx b/src/fl_set_gray.cxx index a41671d80..f68cb8cab 100644 --- a/src/fl_set_gray.cxx +++ b/src/fl_set_gray.cxx @@ -1,5 +1,5 @@ // -// "$Id: fl_set_gray.cxx,v 1.5.2.3.2.1 2002/01/01 15:11:32 easysw Exp $" +// "$Id: fl_set_gray.cxx,v 1.5.2.3.2.2 2002/04/11 10:46:19 easysw Exp $" // // Background (gray) color routines for the Fast Light Tool Kit (FLTK). // @@ -41,22 +41,22 @@ void Fl::background(uchar r, uchar g, uchar b) { } static void set_others() { - uchar r,g,b; Fl::get_color(FL_BLACK,r,g,b); - uchar r1,g1,b1; Fl::get_color(FL_WHITE,r1,g1,b1); + uchar r,g,b; Fl::get_color(FL_FOREGROUND_COLOR,r,g,b); + uchar r1,g1,b1; Fl::get_color(FL_BACKGROUND2_COLOR,r1,g1,b1); Fl::set_color(FL_INACTIVE_COLOR,(2*r+r1)/3, (2*g+g1)/3, (2*b+b1)/3); Fl::set_color(FL_SELECTION_COLOR,(2*r1+r)/3, (2*g1+g)/3, (2*b1+b)/3); } void Fl::foreground(uchar r, uchar g, uchar b) { - Fl::set_color(FL_BLACK,r,g,b); + Fl::set_color(FL_FOREGROUND_COLOR,r,g,b); set_others(); } void Fl::background2(uchar r, uchar g, uchar b) { - Fl::set_color(FL_WHITE,r,g,b); + Fl::set_color(FL_BACKGROUND2_COLOR,r,g,b); set_others(); } // -// End of "$Id: fl_set_gray.cxx,v 1.5.2.3.2.1 2002/01/01 15:11:32 easysw Exp $". +// End of "$Id: fl_set_gray.cxx,v 1.5.2.3.2.2 2002/04/11 10:46:19 easysw Exp $". // |
