Article View: comp.lang.postscript
Article #3320Re: characters in perspective
From: Woody Baker Eagle Signal
Date: Thu, 11 Oct 1990 04:39
Date: Thu, 11 Oct 1990 04:39
65 lines
2028 bytes
2028 bytes
In article <21116@well.sf.ca.us>, shiva@well.sf.ca.us (Kenneth Porter) writes:
>
>
> I've also seen Don use a trick in which he replots an image
> with a one-pixel clipping path. He iterates the clip over the
>
> Woody, do you remember what Don calls this hack?
>
Pixel line remapping.
Here is a hastily typed in example from one of Don's laserwriter corners
%
% hastily typed in from Don Lancaster's Laserwriter Secrets Corner
% #21
%
/pixellineremap
{
0 1 pixelprocheight 300 mul 72 div cvi
{
/scanlinenumber exch def
save /snap1 exch def
mappingproc newpath 0 scanlinenumber 72 mul 300 div moveto
pixelprocwidth 0 rlineto 0 72 300 div rlineto
pixelprocwidth neg 0 rlineto closepath clip newpath
pixelproc clear snap 1 restore
}for
}def
%
% mapping function changes for each application.
% this one does perspective sort of "star wars" logo
%
/mappingproc
{
pixelprocwidth 2 div 0 translate tiltfactor
pixelprocheight mul dup scanlinenumber add div
dup scale pixelprocwidth 2 div neg 0 translate
} def
%
% demo...remove before use
%
/Helvetica-Bold findfont [40 0 0 40 0 0] makefont setfont
/pixelproc
{
5 5 moveto 0 134 rlineto 222 0 rlineto 0 -134 rlineto
closepath stroke
20 15 moveto (FREE FONT) show 20 57 moveto
(FREE FONT) show
20 99 moveto (FREE FONT) show
} def
/pixelprocheight 140 def
/pixelprocwidth 230 def
/tiltfactor 8 def % the smaller the flatter
100 200 translate pixellineremap
showpage
I hope there are no typo's
Cheers
Woody
Technical Details
Message-ID:
<1625@chinacat.Unicom.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!chinacat!woodyReferences:
<1990Oct5.155219.442@morrow.stanford.edu> <1610@chinacat.Unicom.COM> <21116@well.sf.ca.us>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!cs.utexas.edu!chinacat!woody From: woody@chinacat.Unicom.COM (Woody Baker @ Eagle Signal) Newsgroups: comp.lang.postscript Subject: Re: characters in perspective Summary: pixelineremapping Message-ID: <1625@chinacat.Unicom.COM> Date: 11 Oct 90 04:39:34 GMT References: <1990Oct5.155219.442@morrow.stanford.edu> <1610@chinacat.Unicom.COM> <21116@well.sf.ca.us> Organization: a guest of Unicom Systems Development, Austin Lines: 65