CVS: ----------------------------------------------------------------------
CVS: Enter Log.  Lines beginning with `CVS:' are removed automatically
CVS: 
CVS: Committing in .
CVS: 
CVS: Modified Files:
CVS:    xap/unix/xap_UnixPSGraphics.cpp 
CVS: ----------------------------------------------------------------------
Fix for bug 1179 from Patrick Lam.

Greyscale printing works fine for me too. Thanks Pat. 1179 was a bad bug.

Cheers

Martin

On Wed, 4 Apr 2001, Patrick Lam wrote:

> 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:
> 
> 
> 


Reply via email to