summaryrefslogtreecommitdiff
path: root/src/Fl_Pixmap.cxx
diff options
context:
space:
mode:
authorMichael R Sweet <michael.r.sweet@gmail.com>2005-02-05 20:28:31 +0000
committerMichael R Sweet <michael.r.sweet@gmail.com>2005-02-05 20:28:31 +0000
commit89c0329b719735ed3237508b66ca4d7662782a42 (patch)
treec3ba7eb5ba5f9edb0fc15babe683b647908721bd /src/Fl_Pixmap.cxx
parent0deaeaa80c40531d59ca39e17e7f718430efcb4f (diff)
Fix FLUID text color (STR #662)
src/Fl_Double_Window.cxx: - Save/restore colors. src/Fl_Pixmap.cxx: - Save/restore colors. src/fl_draw_image_mac.cxx: - Save/restore colors. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4018 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Pixmap.cxx')
-rw-r--r--src/Fl_Pixmap.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/Fl_Pixmap.cxx b/src/Fl_Pixmap.cxx
index 6b768d8f9..47115dc5a 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.33 2004/09/24 16:00:10 easysw Exp $"
+// "$Id$"
//
// Pixmap drawing code for the Fast Light Tool Kit (FLTK).
//
@@ -121,7 +121,9 @@ void Fl_Pixmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
src.top = cy; src.bottom = cy+H;
dst.left = X; dst.right = X+W;
dst.top = Y; dst.bottom = Y+H;
- RGBColor rgb;
+ RGBColor rgb, oldfg, oldbg;
+ GetForeColor(&oldfg);
+ GetBackColor(&oldbg);
rgb.red = 0xffff; rgb.green = 0xffff; rgb.blue = 0xffff;
RGBBackColor(&rgb);
rgb.red = 0x0000; rgb.green = 0x0000; rgb.blue = 0x0000;
@@ -130,6 +132,8 @@ void Fl_Pixmap::draw(int XP, int YP, int WP, int HP, int cx, int cy) {
GetPortBitMapForCopyBits((GrafPtr)mask),
GetPortBitMapForCopyBits(GetWindowPort(fl_window)),
&src, &src, &dst);
+ RGBBackColor(&oldbg);
+ RGBForeColor(&oldfg);
} else {
fl_copy_offscreen(X, Y, W, H, (Fl_Offscreen)id, cx, cy);
}
@@ -479,5 +483,5 @@ void Fl_Pixmap::desaturate() {
}
//
-// End of "$Id: Fl_Pixmap.cxx,v 1.9.2.4.2.33 2004/09/24 16:00:10 easysw Exp $".
+// End of "$Id$".
//