🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #6190

Re: 0 0 moveto (+) show: how to center the (+)?

#6190
From: Peter Davis
Date: Mon, 03 Jun 1991 14:03
18 lines
1064 bytes
In article <9106020627.AA01346@einstein.physics.buffalo.edu>, xiaofei@EINSTEIN.PHYSICS.BUFFALO.EDU (X. F. Wang) writes...
>I need something
> 
>x y moveto 
>( symbol ) show
> 
>in drawing agraph. The probem is the symbol is not centered at
>currentpoint [The lower left corner is at currentpoint]. How do I
>symbol centered at currentpoint ?

Something like this should work:

x y moveto
(symbol) dup true charpath flattenpath pathbbox
/y2 exch def /x2 exch def /y1 exch def /x1 exch def
newpath
x2 x1 sub 2 div neg y2 y1 sub 2 div neg rmoveto show
Technical Details
Message-ID: <1991Jun3.140858.14120@engage.pko.dec.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!elroy.jpl.nasa.gov!decwrl!pa.dec.com!nntpd.lkg.dec.com!engage!3d.enet.dec.com!davis

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!elroy.jpl.nasa.gov!decwrl!pa.dec.com!nntpd.lkg.dec.com!engage!3d.enet.dec.com!davis
From: davis@3d.enet.dec.com (Peter Davis)
Newsgroups: comp.lang.postscript
Subject: Re: 0 0 moveto (+) show: how to center the (+)?
Message-ID: <1991Jun3.140858.14120@engage.pko.dec.com>
Date: 3 Jun 91 14:03:58 GMT
Sender: newsdaemon@engage.pko.dec.com (USENET News Daemon)
Organization: Digital Equipment Corporation
Lines: 18