Author: AlbrechtS
Date: 2009-04-27 08:50:29 -0700 (Mon, 27 Apr 2009)
New Revision: 6783
Log:
Fluid printing used wrong colors under Windows (STR #2195)
Modified:
branches/branch-1.1/CHANGES
branches/branch-1.1/fluid/fluid.cxx
Modified: branches/branch-1.1/CHANGES
===================================================================
--- branches/branch-1.1/CHANGES 2009-04-24 19:16:29 UTC (rev 6782)
+++ branches/branch-1.1/CHANGES 2009-04-27 15:50:29 UTC (rev 6783)
@@ -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)
Modified: branches/branch-1.1/fluid/fluid.cxx
===================================================================
--- branches/branch-1.1/fluid/fluid.cxx 2009-04-24 19:16:29 UTC (rev 6782)
+++ branches/branch-1.1/fluid/fluid.cxx 2009-04-27 15:50:29 UTC (rev 6783)
@@ -1016,6 +1016,14 @@
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<w*h; i++, p+=3) {
+ uchar temp = p[0]; p[0] = p[2]; p[2] = temp;
+ }
+ }
+
// Figure out the window size, first at 100 PPI and then scaled
// down if that is too big...
ww = w * xdpi / 100;
_______________________________________________
fltk-commit mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-commit