Article View: comp.lang.postscript
Article #7616Re: Help! What am I doing wrong here?
From: Patrick Naughton
Date: Thu, 17 Nov 1988 04:42
Date: Thu, 17 Nov 1988 04:42
40 lines
1926 bytes
1926 bytes
In article <4181@teklds.TEK.COM> tims@teklds.TEK.COM (Tim Stoehr) writes:
>I'm having a problem with my first use of the 'image' operator.
>72 72 scale
>20 20 1 [20 0 0 20 0 0] {<fffff fffff fffff fffff
>fffff f800f fbfff fbfff fbfff fbfff f81ff fbfff
>fbfff fbfff fbfff fbfff fffff fffff fffff fffff>}
>image
>showpage
>
>I expected a black upside-down 'F' to be generated, instead I got random
>garbage. Any distribution of blanks in the hex string made no difference.
>What am I doing wrong?
You are describing your string incorrectly. Read page 24 of the Red Book.
"A string may be described in hex... by bracketing a sequence of hex
characters... Each pair of hex digits defines one character of the
string. ... Spaces, tabs, and newlines are ignored."
if you want some bits in the upper nibble (left half for depth 1) of a byte
you need to specify the lower nibble as zero.
Your example: f81ff fbfff
translates to: f8 1f ff bf ff
not as expected: f8 1f f0 fb ff f0
Here's your upside down F:
%!
72 72 scale
20 20 1 [20 0 0 20 0 0]
{ <fffff0 fffff0 fffff0 fffff0 fffff0 f800f0 fbfff0 fbfff0 fbfff0 fbfff0
f81ff0 fbfff0 fbfff0 fbfff0 fbfff0 fbfff0 fffff0 fffff0 fffff0 fffff0>
} image
showpage
-Patrick
______________________________________________________________________
Patrick J. Naughton ARPA: naughton@Sun.COM
Window Systems Group UUCP: ...!sun!naughton
Sun Microsystems, Inc. AT&T: (415) 336 - 1080
Technical Details
Message-ID:
<78010@sun.uucp>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!sundc!pitstop!sun!wind!naughtonReferences:
<4181@teklds.TEK.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!seismo!sundc!pitstop!sun!wind!naughton From: naughton%wind@Sun.COM (Patrick Naughton) Newsgroups: comp.lang.postscript Subject: Re: Help! What am I doing wrong here? Message-ID: <78010@sun.uucp> Date: 17 Nov 88 04:42:31 GMT References: <4181@teklds.TEK.COM> Sender: news@sun.uucp Reply-To: naughton@sun.UUCP (Patrick Naughton) Organization: Sun Microsystems, Mountain View Lines: 40