diff options
Diffstat (limited to 'src/Fl_get_system_colors.cxx')
| -rw-r--r-- | src/Fl_get_system_colors.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Fl_get_system_colors.cxx b/src/Fl_get_system_colors.cxx index 9264ab214..04abde77f 100644 --- a/src/Fl_get_system_colors.cxx +++ b/src/Fl_get_system_colors.cxx @@ -49,7 +49,8 @@ void Fl::background(uchar r, uchar g, uchar b) { double powg = log(g/255.0)/log((FL_GRAY-FL_GRAY_RAMP)/(FL_NUM_GRAY-1.0)); if (!b) b = 1; else if (b==255) b = 254; double powb = log(b/255.0)/log((FL_GRAY-FL_GRAY_RAMP)/(FL_NUM_GRAY-1.0)); - for (int i = 0; i < FL_NUM_GRAY; i++) { + int i; + for (i = 0; i < FL_NUM_GRAY; i++) { double gray = i/(FL_NUM_GRAY-1.0); Fl::set_color(fl_gray_ramp(i), uchar(pow(gray,powr)*255+.5), |
