X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=ps%2Flilyponddefs.ps;h=f7974111c6008853de7b0bd483130a650393e2de;hb=97a0169312a260933246ab224e4f8b0969871dd5;hp=a1a0d94f90c4f46cf9cd61b65eff0b13a51124b7;hpb=339ea28cd7e4f8a1c1ca7c1d4dfe803a3f4c03e6;p=lilypond.git diff --git a/ps/lilyponddefs.ps b/ps/lilyponddefs.ps index a1a0d94f90..f7974111c6 100644 --- a/ps/lilyponddefs.ps +++ b/ps/lilyponddefs.ps @@ -1,68 +1,29 @@ -%!PS-Adobe-1.0: lilyponddefs - -% hmm -/setgray { 1 add } bind def - -/stafflinethickness mudelapaperstaffline def -/staffheight mudelapaperstaffheight def +%!PS-Adobe-2.0: lilyponddefs.ps +% +% Functions for direct PostScript output -/xoffset 30 def -/yoffset 700 def +% /setgray { 1 add } bind def -/placebox -{ - /object exch def - gsave - %exch translate - translate - 0 0 moveto - object - grestore +/set-ps-scale-to-lily-scale { + lily-output-units output-scale mul dup scale } bind def -% -% FIXME. translate to middle of box. -% -/draw_box % breapth width depth height -{ - /h exch def - /d exch def - /w exch def - /b exch def +/init-paper { gsave - - 0 setlinewidth - b neg d neg rmoveto - b w add 0 rlineto - 0 d h add rlineto - b w add neg 0 rlineto - closepath % 0 d h add neg rlineto - fill - + clippath pathbbox newpath + /paper-height exch def + /paper-width exch def pop pop pop + % FIXME + /top-margin 2 def + paper-width line-width sub 2 div /left-margin exch def grestore } bind def -/start_line -{ - gsave - xoffset yoffset translate +/init-lilypond-parameters { + staff-line-thickness setlinewidth + staff-height init-paper } bind def -/stop_line -{ - /object exch def - 0 0 moveto pathbbox exch pop sub exch pop - object - grestore - yoffset add /yoffset exch def - % urg... - yoffset mudelapaperstaffheight 8 mul sub /yoffset exch def -} bind def - -/turnOnExperimentalFeatures { } bind def - -stafflinethickness setlinewidth -% see if we're there... -% 10 setlinewidth 0 0 moveto 400 800 lineto stroke +% end lilyponddefs.ps