Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.postscript > #1925

Re: Showing text across a back disc

Newsgroups comp.lang.postscript
From Peter Billam <peter@www.pjb.com.au>
Subject Re: Showing text across a back disc
References <slrnlqskju.4c0.peter@box8.pjb.com.au> <4ec9a04f-f1ae-41e5-ab3c-9c76b184da74@googlegroups.com>
Message-ID <slrnlqt51s.5b6.peter@box8.pjb.com.au> (permalink)
Date 2014-06-28 10:09 +0000
Organization Unlimited download news at news.astraweb.com

Show all headers | View raw


On 2014-06-28, luser- -droog <mijoryx@yahoo.com> wrote:
> On Saturday, June 28, 2014 12:28:31 AM UTC-5, Peter Billam wrote:
>>   300 300 translate
>>   /Helvetica-BoldOblique findfont 40 scalefont setfont
>>   -150 0 moveto (Hello black disc) show
>>   gsave newpath
>>     0 10 80 0 360 arc clip fill
>>     1 setgray
>>     -150 0 moveto (Hello black disc) show
>>   grestore
>> the text has to be printed twice, and the movetos must be identical.
>> Is there a more elegant way ?
>
> This wouldn't be portable, but I think ghostscript lets you adjust
> the rasterop. So you could draw the text just once by using an XOR op.

Interesting... Didn't know about that... I'd want to be portable,
though.  I spent some time trying to extract the outline path of
the text (so I could do that, then the 0 360 arc, then eofill);
couldn't find a way, though.

> Staying portable, you can enforce that the movetos be identical by
> stashing the point on the stack.
>  300 300 translate 
>   /Helvetica-BoldOblique findfont 40 scalefont setfont 
>   -150 0 moveto currentpoint (Hello black disc) show  % cp
>   gsave newpath  % cp
>     0 10 80 0 360 arc clip fill  % cp
>     1 setgray  % cp
>     moveto (Hello black disc) show 
>   grestore 

true; or could
  /tmpsub { -150 0 moveto (Hello black disc) show } def
but these tricks still print twice.
(Which is unimportant in this example, of course :-))

Thanks,  regards,  Peter

-- 
Peter Billam    www.pjb.com.au    www.pjb.com.au/comp/contact.html

Back to comp.lang.postscript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Showing text across a back disc Peter Billam <peter@www.pjb.com.au> - 2014-06-28 05:28 +0000
  Re: Showing text across a back disc luser- -droog <mijoryx@yahoo.com> - 2014-06-28 00:24 -0700
    Re: Showing text across a back disc Peter Billam <peter@www.pjb.com.au> - 2014-06-28 10:09 +0000
  Re: Showing text across a back disc pt <masked@hotmail.com> - 2014-06-28 11:28 +0100
    Re: Showing text across a back disc Peter Billam <peter@www.pjb.com.au> - 2014-06-28 11:53 +0000
  Re: Showing text across a back disc jdaw1 <jdawiseman@gmail.com> - 2014-06-28 13:53 -0700

csiph-web