summaryrefslogtreecommitdiff
path: root/src/fl_color.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2011-02-06 12:32:23 +0000
committerManolo Gouy <Manolo>2011-02-06 12:32:23 +0000
commit6a5feafe23e6e37009312aa40b63d19ad9cff886 (patch)
treea5d1d7b429cec1ae3f21647e9777a5bc66c0b8c3 /src/fl_color.cxx
parent5e7232e776d3325ecc1a336453a3f846a1872ff1 (diff)
Replaced global variable fl_color_ by a private member of the Fl_Graphics_Driver class,
and a public getter to it: Fl_Graphics_Driver::color(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8384 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/fl_color.cxx')
-rw-r--r--src/fl_color.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/fl_color.cxx b/src/fl_color.cxx
index bac31d189..04a56f0a4 100644
--- a/src/fl_color.cxx
+++ b/src/fl_color.cxx
@@ -124,22 +124,19 @@ Fl_XColor fl_xmap[1][256];
# define fl_overlay 0
# endif
-/** Current color for drawing operations */
-Fl_Color fl_color_;
-
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));
} else {
- fl_color_ = i;
+ Fl_Graphics_Driver::color(i);
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(i));
}
}
void Fl_Xlib_Graphics_Driver::color(uchar r,uchar g,uchar b) {
- fl_color_ = fl_rgb_color(r, g, b);
+ Fl_Graphics_Driver::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));
}