X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=inline;f=ps%2Flilyponddefs.ps;h=ad0d89a61bc1f9140dc63ea56cd67516f1fa5f24;hb=34141471a3a50d637a22d19da0c8645bae59fdc2;hp=6f2666422e0427eccacd54241dbfdbc18726f4aa;hpb=d960ed4a0412af65d03a876152dce51fa35d766c;p=lilypond.git diff --git a/ps/lilyponddefs.ps b/ps/lilyponddefs.ps index 6f2666422e..ad0d89a61b 100644 --- a/ps/lilyponddefs.ps +++ b/ps/lilyponddefs.ps @@ -1,87 +1,31 @@ -%!PS-Adobe-1.0: lilyponddefs - -% hmm -/setgray { 1 add } bind def - -/stafflinethickness mudelapaperstaffline def -/staffheight mudelapaperstaffheight def - -/xoffset 30 def -/yoffset 700 def - -/placebox -{ - /object exch def - gsave - %exch translate - translate - 0 0 moveto - object - grestore -} bind def - +%!PS-Adobe-2.0: lilyponddefs.ps +% TODO: +% * junk all magic, start-line/stop-line just: placebox @ x.y % -% FIXME. translate to middle of box. -% - -/draw_box % breapth width depth height -{ - /h exch def - /d exch def - /w exch def - /b exch def - 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 - - grestore -} bind def +% Functions for direct PostScript output -/start_line -{ - gsave - xoffset yoffset translate -} bind def +% /setgray { 1 add } 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 +/set-ps-scale-to-lily-scale { + lily-output-units output-scale mul dup scale } bind def -/unknown { (U) setbold } bind def -/empty { (E) setbold } bind def -/turnOnExperimentalFeatures { } bind def - -/rulesym % thick length -{ +/init-paper { gsave - exch setlinewidth - 0 lineto stroke + 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 -(lily.ps) findlibfile -{ - exch pop //systemdict /run get exec -} -{ - /undefinedfilename signalerror -} ifelse +/init-lilypond-parameters { + staff-line-thickness setlinewidth + staff-height init-paper +} bind def -stafflinethickness setlinewidth -% see if we're there... -% 10 setlinewidth 0 0 moveto 400 800 lineto stroke +% end lilyponddefs.ps