query & patch re: bug 1179


Subject: query & patch re: bug 1179
From: Patrick Lam (plam@plam.lcs.mit.edu)
Date: Wed Apr 04 2001 - 08:37:10 CDT


As I commented in bug 1179, I can only reproduce the black-only printing
bug for Black&White mode, not Greyscale, which seems to work perfectly.

Here's a patch for B&W mode.

pat

Index: src/af/xap/unix/xap_UnixPSGraphics.cpp
===================================================================
RCS file: /cvsroot/abi/src/af/xap/unix/xap_UnixPSGraphics.cpp,v
retrieving revision 1.65
diff -u -r1.65 xap_UnixPSGraphics.cpp
--- src/af/xap/unix/xap_UnixPSGraphics.cpp 2001/03/18 03:49:28 1.65
+++ src/af/xap/unix/xap_UnixPSGraphics.cpp 2001/04/04 13:37:47
@@ -1285,6 +1285,9 @@
        case GR_Graphics::GR_COLORSPACE_BW:
                // Black & White is a special case of the Gray color space where
                // all colors are 0 (black) and all absence of color is 1 (white)
+ if (m_currentColor.m_red + m_currentColor.m_grn + m_currentColor.m_blu > 3*250) // yay, arbitrary threshold!
+ g_snprintf(buf,sizeof(buf),"1 setgray\n");
+ else
                g_snprintf(buf,sizeof(buf),"0 setgray\n");
                break;
        default:



This archive was generated by hypermail 2b25 : Wed Apr 04 2001 - 08:40:30 CDT