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
This commit is contained in:
Michael R Sweet 2005-02-05 20:28:31 +00:00
parent 0deaeaa80c
commit 89c0329b71
3 changed files with 16 additions and 8 deletions

View File

@ -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$".
//

View File

@ -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$".
//

View File

@ -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$".
//