]> git.donarmstrong.com Git - lilypond.git/blobdiff - ps/lilyponddefs.ps
* ly/performer-init.ly: add CueVoice to MIDI too.
[lilypond.git] / ps / lilyponddefs.ps
index b5386d2818118c1272e9859a101d88987df9a087..536e7c36f4b60bec810658da486a2142424f7ea5 100644 (file)
-%!PS-Adobe-1.0: lilyponddefs
+%!PS-Adobe-2.0: lilyponddefs.ps
+% TODO:
+%  * junk all magic, start-line/stop-line just: placebox @ x.y
+%
+% Functions for direct PostScript output
 
-% hmm
-/setgray { 1 add } bind def
+% /setgray { 1 add } bind def
 
-/xoffset 30 def
-/yoffset 700 def
-/staffrulethickness 1 def
-/staffheight 20 def
+% To let gs load fonts from builddir, do:
+% export GS_LIB=$(pwd)/mf/out:/usr/share/texmf/fonts/type1/bluesky/cm
 
-/placebox
-{
-       /object exch def
-       gsave
-       %exch translate
-       translate
-       0 0 moveto
-       object
-       grestore
-} bind def
 
-/settext % '(' text ')'
-{
-       gsave
-       % urg
-       /Times-Roman findfont 12 scalefont setfont
-       show
-       grestore
+/set-ps-scale-to-lily-scale {
+       lily-output-units output-scale mul
+       lily-output-units output-scale mul scale
 } bind def
 
-/setfinger % '(' text ')'
-{
-       gsave
-       % urg
-       /feta-nummer5 findfont 12 scalefont setfont
-       show
-       grestore
-} bind def
 
-/setitalic % '(' text ')'
-{
+/init-paper {
        gsave
-       % urg
-       /Times-Italic findfont 12 scalefont setfont
-       show
+       clippath pathbbox newpath
+       /vsize exch def
+       /hsize exch def pop pop pop
+       % FIXME
+       /top-margin 2 def
+       hsize line-width sub 2 div /left-margin exch def
        grestore
 } bind def
 
-/vrule % width height depth
-{
-       gsave
-       3 -1 roll setlinewidth
-       neg 0 exch moveto
-       0 exch lineto stroke
-       grestore
-} bind def
-
-/draw_stem % kern width height depth
-{
-       gsave
-       4 -1 roll neg 0 translate
-       vrule
-       grestore
-} bind def
-
-/widthbar % height width
-{
-       gsave
-       setlinewidth
-       2 div dup neg 0 exch moveto
-       0 exch lineto stroke
-       2 div
-       grestore
-} bind def
-
-/thickbar % height
-{
-       stafflinethickness 2 mul widthbar
-} bind def
-
-/thinbar % height
-{
-       stafflinethickness 1.6 mul widthbar
-} bind def
-
-/maatstreep % height
-{
-       thinbar
-} bind def
 
-/fatdoublebar
-{
-       thickbar
-} bind def
-
-/finishbar
-{
-       thickbar
-} bind def
-
-/generalmeter % num den
-{
-       pop pop
-} bind def
-
-/pianobrace % '(' char ')'
-{
+/place-box {
+       /object exch def
        gsave
-       /feta-braces20 findfont 12 scalefont setfont%
-       show
+       % exch translate
+       translate
+       0 0 moveto
+       object
        grestore
 } bind def
 
-/doublebar
-{
-       thinbar
-} bind def
 
-/repeatbar
-{
-       thickbar
+% start-system
+/start-system {
+    gsave
 } bind def
 
-/repeatbarstartrepeat
-{
-       thickbar
+/start-page {
+    gsave
+    0
+    vsize translate
 } bind def
 
-/startrepeat
-{
-       thickbar
-} bind def
 
-/stoprepeat
-{
-       thickbar
+/stop-system {
+       /the-line exch def
+       the-line stroke grestore
 } bind def
 
-/start_line
-{ 
-       gsave
-       xoffset yoffset translate
-} 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 staffheight 8 mul sub /yoffset exch def
+/end-lilypond-output {
+%      showpage
 } bind def
 
-/unknown { (U) show} bind def
-/empty {(E) show} bind def
-
-/turnOnExperimentalFeatures { } bind def
 
-/rulesym % thick length
-{
-       gsave
-       exch setlinewidth
-       0 lineto stroke
-       grestore
+/init-lilypond-parameters {
+       staff-line-thickness setlinewidth
+       staff-height init-paper
 } bind def
 
-(lily.ps) findlibfile 
-{
-       exch pop //systemdict /run get exec
-} 
-{ 
-       /undefinedfilename signalerror 
-} ifelse
-
-stafflinethickness setlinewidth
 
-% see if we're there...
-% 10 setlinewidth 0 0 moveto 400 800 lineto stroke
+% end lilyponddefs.ps