Article View: comp.lang.postscript
Article #1465Re: The One Page Processor, a PostScript word processor.
From: rodgers
Date: Fri, 08 Dec 1989 09:29
Date: Fri, 08 Dec 1989 09:29
58 lines
3088 bytes
3088 bytes
In article <1502@adobe.UUCP>, gelphman@adobe.COM (David Gelphman) writes:
> In article <1989Nov29.131039.22368@sgzh.uucp> Bruno Pape, P.O. Box 368, Thomaston CT, 06787, USA writes:
>>Have at it. If your running UNIX here is a shell script you could use.
>>
>
>>%
>>% Checks to see if on a color PostScript device.
>>% A real lousy test. A product name with Color, color, or
>>% COLOR in it means a color device? I hope.
>>%
>>
> This approach of testing for color is STRONGLY discouraged.
> The best way to test for extensions or functionality is to look
> directly for the feature for which you are interested. In this
> case, 'setrgbcolor' is a standard part of the language and has
> been in all implementations including the original Apple LaserWriter
> printer. If used on a black and white output device, the rgb color is mapped
> into the NTSC gray equivalent. Applications which wish to apply rgb
> color to line art and text can do so by using setrgbcolor on all PostScript
> output devices.
> The 'setcmykcolor' operator today exists only in color output devices
> but one can expect it to exist in future b&w devices. If you need to use
> this operator then it is a simple matter to test for the functionality
> and emulate it if it isn't available.
This is OK as far as it goes but sometimes what you want to know is
whether what you are printing will come out in colour or whether it
will be black and white. In the original code procedures red, green,
etc were defined which set the colour on a colour device but did
nothing on a monochrome device. They did not set a gray value. Note
that the output could even be in black on a colour device if a black
only ribbon is loaded. That is why the processcolors operator is
there and that is what the original poster should have used:
/processcolors where {
pop
processcolors 1 gt {
def_colours
}{
no_colours
} ifelse
}{
no_colours
} ifelse
Hopefully processcolors will be available on all future colour devices
and it is a reasonable assumption that if its not available then the
device is monochrome.
As an aside, why do American products not support the correct spelling
of colour as well as the American one? It make life very confusing
for those of us who can spell. Perhaps I should define
/setrgbcolour { setrgbcolor } bind def % :-)
---
Mark Rodgers Computer Services Section
rodgers@wcc.govt.nz Wellington City Council
Telephone (04) 733-130 P.O.Box 2199, Wellington, New Zealand
Technical Details
Message-ID:
<1194.258027c6@csc.wcc.govt.nz>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!usc!samsung!munnari.oz.au!comp.vuw.ac.nz!kosmos!csc!rodgersReferences:
<1989Nov29.131039.22368@sgzh.uucp> <1502@adobe.UUCP>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!usc!samsung!munnari.oz.au!comp.vuw.ac.nz!kosmos!csc!rodgers From: rodgers@csc.wcc.govt.nz Newsgroups: comp.lang.postscript Subject: Re: The One Page Processor, a PostScript word processor. Message-ID: <1194.258027c6@csc.wcc.govt.nz> Date: 8 Dec 89 09:29:42 GMT References: <1989Nov29.131039.22368@sgzh.uucp> <1502@adobe.UUCP> Organization: Wellington City Council Lines: 58