summaryrefslogtreecommitdiff
path: root/src
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
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')
-rw-r--r--src/Fl_Double_Window.cxx10
-rw-r--r--src/Fl_Pixmap.cxx10
-rw-r--r--src/fl_draw_image_mac.cxx4
3 files changed, 16 insertions, 8 deletions
diff --git a/src/Fl_Double_Window.cxx b/src/Fl_Double_Window.cxx
index 7537c64b4..9d10d8d02 100644
--- a/src/Fl_Double_Window.cxx
+++ b/src/Fl_Double_Window.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: Fl_Double_Window.cxx,v 1.12.2.4.2.14 2004/12/27 19:16:42 matthiaswm Exp $"
+// "$Id$"
//
// Double-buffered window code for the Fast Light Tool Kit (FLTK).
//
@@ -115,12 +115,16 @@ void fl_copy_offscreen(int x,int y,int w,int h,GWorldPtr gWorld,int srcx,int src
Rect dst;
GrafPtr dstPort; GetPort(&dstPort);
dst.top = y; dst.left = x; dst.bottom = y+h; dst.right = x+w;
- RGBColor rgb;
+ RGBColor rgb, oldbg, oldfg;
+ GetForeColor(&oldfg);
+ GetBackColor(&oldbg);
rgb.red = 0xffff; rgb.green = 0xffff; rgb.blue = 0xffff;
RGBBackColor( &rgb );
rgb.red = 0x0000; rgb.green = 0x0000; rgb.blue = 0x0000;
RGBForeColor( &rgb );
CopyBits(GetPortBitMapForCopyBits(gWorld), GetPortBitMapForCopyBits(dstPort), &src, &dst, srcCopy, 0L);
+ RGBBackColor(&oldbg);
+ RGBForeColor(&oldfg);
}
void fl_delete_offscreen(GWorldPtr gWorld) {
@@ -353,5 +357,5 @@ Fl_Double_Window::~Fl_Double_Window() {
}
//
-// End of "$Id: Fl_Double_Window.cxx,v 1.12.2.4.2.14 2004/12/27 19:16:42 matthiaswm Exp $".
+// End of "$Id$".
//
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$".
//
diff --git a/src/fl_draw_image_mac.cxx b/src/fl_draw_image_mac.cxx
index 8034c8d7e..be4427324 100644
--- a/src/fl_draw_image_mac.cxx
+++ b/src/fl_draw_image_mac.cxx
@@ -1,5 +1,5 @@
//
-// "$Id: fl_draw_image_mac.cxx,v 1.1.2.11 2004/09/10 00:07:52 matthiaswm Exp $"
+// "$Id$"
//
// MacOS image drawing code for the Fast Light Tool Kit (FLTK).
//
@@ -264,5 +264,5 @@ void fl_rectf(int x, int y, int w, int h, uchar r, uchar g, uchar b) {
}
//
-// End of "$Id: fl_draw_image_mac.cxx,v 1.1.2.11 2004/09/10 00:07:52 matthiaswm Exp $".
+// End of "$Id$".
//