diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-01-01 13:11:29 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2002-01-01 13:11:29 +0000 |
| commit | f9770db21fabc7785627092c52afb0d88f43089f (patch) | |
| tree | 7b48f59252190d4c24b8b67cee8ccac66ca4f987 /src/Fl_Pixmap.cxx | |
| parent | 988bc9d95f1a4f5b06262fe9b4de9466ab2950f5 (diff) | |
Use rint() for some more rounding of vertices.
Add fl_parse_color() to X11 version, too, and use it instead of XParseColor
in the image handling code.
Move the default color stuff in the plastic scheme to the MacOS
get_system_colors(), and apply the background color to the tile image.
More fixes for test makefile.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@1901 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Pixmap.cxx')
| -rw-r--r-- | src/Fl_Pixmap.cxx | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx index e7fbd9b4f..7146c5e36 100644 --- a/src/Fl_Pixmap.cxx +++ b/src/Fl_Pixmap.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.12 2001/12/21 20:45:43 easysw Exp $" +// "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.13 2002/01/01 13:11:29 easysw Exp $" // // Pixmap drawing code for the Fast Light Tool Kit (FLTK). // @@ -365,16 +365,7 @@ void Fl_Pixmap::color_average(Fl_Color c, float i) { while (*p && !isspace(*p)) p++; } -#if defined(WIN32) || defined(__APPLE__) if (fl_parse_color(p, r, g, b)) { -#else - XColor x; - if (XParseColor(fl_display, fl_colormap, p, &x)) { - r = x.red>>8; - g = x.green>>8; - b = x.blue>>8; -#endif - r = (ia * r + ir) >> 8; g = (ia * g + ig) >> 8; b = (ia * b + ib) >> 8; @@ -460,16 +451,7 @@ void Fl_Pixmap::desaturate() { while (*p && !isspace(*p)) p++; } -#if defined(WIN32) || defined(__APPLE__) if (fl_parse_color(p, r, g, b)) { -#else - XColor x; - if (XParseColor(fl_display, fl_colormap, p, &x)) { - r = x.red>>8; - g = x.green>>8; - b = x.blue>>8; -#endif - g = (r * 31 + g * 61 + b * 8) / 100; if (chars_per_pixel > 1) sprintf(line, "%c%c c #%02X%02X%02X", data()[i + 1][0], @@ -485,5 +467,5 @@ void Fl_Pixmap::desaturate() { } // -// End of "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.12 2001/12/21 20:45:43 easysw Exp $". +// End of "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.13 2002/01/01 13:11:29 easysw Exp $". // |
