2009/11/13

PostScript kshow

9.1-DifferentShows-kshow.ps

% --- variables ------------------------
/TM 832 def % Tom
/BM -12 def % Bottom
/LM 0 def % Left
/RM 612 def % Right
/line-height 28 def
/font-size-1 30 def
/font-size-2 250 def
/message (KPF) def

% --- procedures ------------------------
/newline {
    currentpoint line-height sub
    exch pop LM
    exch moveto
} def

/nllfNec {
    currentpoint pop RM gt {
        newline
    } if
} def

/done? {
    currentpoint exch pop
    BM lt
} def

/fillpage {
    /strg exch def
    {
        { pop pop nllfNec } strg kshow
        ( ) show
        done? {
            exit
        } if
    } loop
} def

% --- main -----------------------------
/Times-Bold findfont font-size-1 scalefont setfont
LM TM moveto
.7 setgray
message fillpage

/Times-Roman findfont font-size-2 scalefont setfont

RM LM sub
message stringwidth pop sub
2 div
400 moveto

0 setgray
message show

showpage

 

PostScript(R) Language Tutorial and Cookbook (APL)

PostScript(R) Language Tutorial and Cookbook (APL)

posted with amazlet at 09.10.07

Adobe Systems Inc.
Addison-Wesley Professional
売り上げランキング: 235737

おすすめ度の平均: 5.0

5 まず最初に読むべき入門書
5 効率の良いPostScript書くなら…

Amazon.co.jp で詳細を見る

0 件のコメント:

コメントを投稿