Article View: comp.lang.postscript
Article #2568Re: PS Center Text???
From: Mitch Wright
Date: Thu, 19 Jul 1990 15:14
Date: Thu, 19 Jul 1990 15:14
27 lines
1117 bytes
1117 bytes
/*
* gross@umiami.miami.edu (JD144) writes:
*
*/
> Well, does anyone out there have a PS centering procedure? Something
> that can take a text string and center it on the page?
% Center String between 2 points
% Call as: (string) Left_Point Right_Point Y_position center
%
/center {
/ypos exch def
add 2 div exch
dup stringwidth pop
/sw exch def
exch sw 2 div
neg add ypos moveto
} def
--
..mitch
mitch@hq.af.mil (Mitch Wright) | The Pentagon, 1B1046 | (202) 695-0262
The two most common things in the universe are hydrogen and stupidity,
but not necessarily in that order.
Technical Details
Message-ID:
<MITCH.90Jul19111455@hq.af.mil>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!usc!ucsd!pacbell.com!ames!dftsrv!hq!mitchReferences:
<6558.26a0b0a2@umiami.miami.edu> <2280@dino.cs.iastate.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!snorkelwacker!usc!ucsd!pacbell.com!ames!dftsrv!hq!mitch From: mitch@hq.af.mil (Mitch Wright) Newsgroups: comp.lang.postscript Subject: Re: PS Center Text??? Message-ID: <MITCH.90Jul19111455@hq.af.mil> Date: 19 Jul 90 15:14:55 GMT References: <6558.26a0b0a2@umiami.miami.edu> <2280@dino.cs.iastate.edu> Sender: mitch@hq.af.mil Organization: Air Force HQ, The Pentagon Lines: 27 In-reply-to: hascall@cs.iastate.edu's message of 18 Jul 90 03:11:02 GMT