diff options
| -rw-r--r-- | FL/Fl_Device.H | 10 | ||||
| -rw-r--r-- | src/fl_color.cxx | 4 | ||||
| -rw-r--r-- | src/fl_color_mac.cxx | 4 | ||||
| -rw-r--r-- | src/fl_color_win32.cxx | 4 |
4 files changed, 14 insertions, 8 deletions
diff --git a/FL/Fl_Device.H b/FL/Fl_Device.H index 71062213e..6b19b914d 100644 --- a/FL/Fl_Device.H +++ b/FL/Fl_Device.H @@ -193,9 +193,9 @@ protected: /** \brief see fl_font(Fl_Font face, Fl_Fontsize size). */ virtual void font(Fl_Font face, Fl_Fontsize size) {}; /** \brief see fl_color(Fl_Color c). */ - virtual void color(Fl_Color c); + virtual void color(Fl_Color c) {}; /** \brief see fl_color(uchar r, uchar g, uchar b). */ - virtual void color(uchar r, uchar g, uchar b); + virtual void color(uchar r, uchar g, uchar b) {}; /** \brief see fl_point(int x, int y). */ virtual void point(int x, int y); /** \brief see fl_loop(int x0, int y0, int x1, int y1, int x2, int y2). */ @@ -298,6 +298,8 @@ public: /** \brief The constructor. */ Fl_Quartz_Graphics_Driver() { type_ = device_type; }; static const char *device_type; + void color(Fl_Color c); + void color(uchar r, uchar g, uchar b); void draw(const char* str, int n, int x, int y); void draw(int angle, const char *str, int n, int x, int y); void rtl_draw(const char* str, int n, int x, int y); @@ -322,6 +324,8 @@ public: /** \brief The constructor. */ Fl_GDI_Graphics_Driver() { type_ = device_type; }; static const char *device_type; + void color(Fl_Color c); + void color(uchar r, uchar g, uchar b); void draw(const char* str, int n, int x, int y); void draw(int angle, const char *str, int n, int x, int y); void rtl_draw(const char* str, int n, int x, int y); @@ -346,6 +350,8 @@ public: /** \brief The constructor. */ Fl_Xlib_Graphics_Driver() { type_ = device_type; }; static const char *device_type; + void color(Fl_Color c); + void color(uchar r, uchar g, uchar b); void draw(const char* str, int n, int x, int y); void draw(int angle, const char *str, int n, int x, int y); void rtl_draw(const char* str, int n, int x, int y); diff --git a/src/fl_color.cxx b/src/fl_color.cxx index e897ac8c0..bac31d189 100644 --- a/src/fl_color.cxx +++ b/src/fl_color.cxx @@ -127,7 +127,7 @@ Fl_XColor fl_xmap[1][256]; /** Current color for drawing operations */ Fl_Color fl_color_; -void Fl_Graphics_Driver::color(Fl_Color i) { +void Fl_Xlib_Graphics_Driver::color(Fl_Color i) { if (i & 0xffffff00) { unsigned rgb = (unsigned)i; fl_color((uchar)(rgb >> 24), (uchar)(rgb >> 16), (uchar)(rgb >> 8)); @@ -138,7 +138,7 @@ void Fl_Graphics_Driver::color(Fl_Color i) { } } -void Fl_Graphics_Driver::color(uchar r,uchar g,uchar b) { +void Fl_Xlib_Graphics_Driver::color(uchar r,uchar g,uchar b) { fl_color_ = fl_rgb_color(r, g, b); if(!fl_gc) return; // don't get a default gc if current window is not yet created/valid XSetForeground(fl_display, fl_gc, fl_xpixel(r,g,b)); diff --git a/src/fl_color_mac.cxx b/src/fl_color_mac.cxx index 881d6a03b..77d7daabe 100644 --- a/src/fl_color_mac.cxx +++ b/src/fl_color_mac.cxx @@ -49,7 +49,7 @@ Fl_XMap* fl_current_xmap; Fl_Color fl_color_; -void Fl_Graphics_Driver::color(Fl_Color i) { +void Fl_Quartz_Graphics_Driver::color(Fl_Color i) { fl_color_ = i; int index; uchar r, g, b; @@ -74,7 +74,7 @@ void Fl_Graphics_Driver::color(Fl_Color i) { CGContextSetRGBStrokeColor(fl_gc, fr, fg, fb, 1.0f); } -void Fl_Graphics_Driver::color(uchar r, uchar g, uchar b) { +void Fl_Quartz_Graphics_Driver::color(uchar r, uchar g, uchar b) { fl_color_ = fl_rgb_color(r, g, b); float fr = r/255.0f; float fg = g/255.0f; diff --git a/src/fl_color_win32.cxx b/src/fl_color_win32.cxx index 656649ecb..945466ce7 100644 --- a/src/fl_color_win32.cxx +++ b/src/fl_color_win32.cxx @@ -94,7 +94,7 @@ static void set_xmap(Fl_XMap& xmap, COLORREF c) { Fl_Color fl_color_; -void Fl_Graphics_Driver::color(Fl_Color i) { +void Fl_GDI_Graphics_Driver::color(Fl_Color i) { if (i & 0xffffff00) { unsigned rgb = (unsigned)i; fl_color((uchar)(rgb >> 24), (uchar)(rgb >> 16), (uchar)(rgb >> 8)); @@ -118,7 +118,7 @@ void Fl_Graphics_Driver::color(Fl_Color i) { } } -void Fl_Graphics_Driver::color(uchar r, uchar g, uchar b) { +void Fl_GDI_Graphics_Driver::color(uchar r, uchar g, uchar b) { static Fl_XMap xmap; COLORREF c = RGB(r,g,b); fl_color_ = fl_rgb_color(r, g, b); |
