at_yasu's blog

ロード的なことを

eps のメモ書き

EPS についての覚え書き

  • Encapsulated PostScript の略
  • 逆ポーランド表記
  • 線の太さの指定
[number] setlinewidth
  • 書き出した線を閉じる
closepath
  • 線を引く
stroke
  • 始点位置の移動
x y moveto
  • 直線を引く(絶対的なポイントの指定)
x y lineto
  • 直線を引く(相対的なポイントの指定)
x y rlineto
  • 曲線(ベジェ曲線)を引く(絶対的なポイントの指定)
x1 y1 x2 y2 x3 y3 curveto
  • 曲線(ベジェ曲線)を引く(相対的なポイントの指定)
x1 y1 x2 y2 x3 y3 rcurveto
  • curveto, rcurveto 命令の点について
    1. x1 y1 始点に近い方のコントロールポイント
    2. x2 y2 終点に近い方のコントロールポイント
    3. x3 y3 終点
  • 直線、曲線共に始点は、直前に実行した命令の終点になる


サンプル。EPSの内容と表示結果。


%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: 0 0 80 24
4 4 moveto 72 0 rlineto 0 16 rlineto -70 0 rlineto closepath 1 setlinewidth stroke
8 8 moveto
15 12 45 20 60 14 rcurveto
40 8 35 0 8 8   curveto
closepath 1 setlinewidth stroke
%%EOF


マクロとかあるみたいだけど、まだチンプンカンプンな状態。

参考サイト