2009/11/13

PostScript clip, charpath

10.1-ClippintPath.ps 10.1-ClippintPath-2.ps

10.1-ClippintPath.ps

% --- procedures -----------------------
/inc {
    3 mul
} def
/trianglepath {
    newpath
    0 0 moveto
    144 inc 0 lineto
    72 inc 200 inc lineto
    closepath
} def

/verticals {
    newpath
    0 9 144 inc {
        0 moveto
        0 216 inc rlineto
    } for
    stroke
} def

/horizontals {
    newpath
    0 10 200 inc {
        0 exch moveto
        144 inc 0 rlineto
    } for
    stroke
} def

% --- main -----------------------------
100 100 translate
gsave
trianglepath clip
3 setlinewidth
verticals
horizontals
grestore
verticals
horizontals

showpage

 

10.1-ClippintPath-2.ps

% --- variables ------------------------
/line-height 90 def
/font-size 95 def
/Times-BoldItalic findfont font-size scalefont setfont

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

/rays {
    0 .3 300 {
        gsave
        rotate
        0 0 moveto
        512 -750 lineto
        stroke
        grestore
    } for
} def

% --- main -----------------------------
30 400 translate
.5 setlinewidth

newpath
0 0 moveto

(Kumamoto) true charpath
newline
(Programming) true charpath
newline
(Freaks) true charpath
clip

newpath
-120 -20 translate
rays

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 件のコメント:

コメントを投稿