From 8dce21315cf84112743c70f9daf4a50f16f4ade4 Mon Sep 17 00:00:00 2001 From: Albrecht Schlosser Date: Mon, 27 Apr 2009 15:50:29 +0000 Subject: [PATCH] Fluid printing used wrong colors under Windows (STR #2195) git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@6783 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 1 + fluid/fluid.cxx | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/CHANGES b/CHANGES index 855235998..ba3eacd1d 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,6 @@ CHANGES IN FLTK 1.1.10 + - Fluid printing used wrong colors under Windows (STR #2195) - Fixed bad system menu hadling in OS X (STR #2153) - Fixed File Input mouse pointer dragging (STR #2181) - Updated the bundled libpng to v1.2.35 (released 18 Feb. 2009) diff --git a/fluid/fluid.cxx b/fluid/fluid.cxx index 54465015a..53f61d2e3 100644 --- a/fluid/fluid.cxx +++ b/fluid/fluid.cxx @@ -1016,6 +1016,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