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_get_system_colors.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_get_system_colors.cxx')
| -rw-r--r-- | src/Fl_get_system_colors.cxx | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/Fl_get_system_colors.cxx b/src/Fl_get_system_colors.cxx index 5c0ce8329..8f216af88 100644 --- a/src/Fl_get_system_colors.cxx +++ b/src/Fl_get_system_colors.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.6 2002/01/07 18:47:27 easysw Exp $" +// "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.7 2002/04/11 10:46:19 easysw Exp $" // // System color support for the Fast Light Tool Kit (FLTK). // @@ -53,12 +53,13 @@ void Fl::background(uchar r, uchar g, uchar b) { } 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); } void Fl::background2(uchar r, uchar g, uchar b) { - Fl::set_color(FL_WHITE,r,g,b); - Fl::set_color(FL_BLACK,get_color(fl_contrast(FL_BLACK,FL_WHITE))); + Fl::set_color(FL_BACKGROUND2_COLOR,r,g,b); + Fl::set_color(FL_FOREGROUND_COLOR, + get_color(fl_contrast(FL_FOREGROUND_COLOR,FL_BACKGROUND2_COLOR))); } // these are set by Fl::args() and override any system colors: @@ -304,5 +305,5 @@ int Fl::reload_scheme() { // -// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.6 2002/01/07 18:47:27 easysw Exp $". +// End of "$Id: Fl_get_system_colors.cxx,v 1.6.2.7.2.7 2002/04/11 10:46:19 easysw Exp $". // |
