From 5a8e28d30b0b69d870e68b4d461a1914728a2cbe Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Mon, 27 Apr 2009 15:51:21 +0000 Subject: Fluid printing used wrong colors under Windows (STR #2195) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@6784 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 1 + fluid/fluid.cxx | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGES b/CHANGES index e00ac7b8f..4cddc8a63 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,6 @@ CHANGES IN FLTK 1.3.0 + - Fluid printing used wrong colors under Windows (STR #2195) - Updated documentation for Fl_Input_ - Fixed fl_draw_image to obey the alpha channel, hoping that this has no adverse effect on existing software (OS X only) diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index 575541dbe..fb48bcd33 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -1018,6 +1018,14 @@ void print_menu_cb(Fl_Widget *, void *) { win = (Fl_Window *)(windows[winpage]->o); pixels = windows[winpage]->read_image(w, h); + // Swap colors: FLTK uses R-G-B --> Windows GDI uses B-G-R + + { uchar *p = pixels; + for (int i=0; i