]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.5.2
authorfred <fred>
Wed, 27 Mar 2002 01:20:30 +0000 (01:20 +0000)
committerfred <fred>
Wed, 27 Mar 2002 01:20:30 +0000 (01:20 +0000)
ps/music-drawing-routines.ps
tex/lily-ps-defs.tex

index 86b39dff6b754c49f764d3bfe3d2e3285fea34c0..8a64dcf6eb0936c05bb69a951e4c4f4aecbc64ea 100644 (file)
@@ -2,10 +2,11 @@
 %
 % Functions for direct and embedded PostScript
 
+/blot-diameter { lilypondpaperblotdiameter } bind def
 
-% FIXME: set with individual symbols
-% round cappings 
-1 setlinecap
+/set_tex_dimen {
+       cvr def     
+} bind def
 
 /euclidean_length  
 { 
        %% FIXME: hardcoded
        currentdict /testing known {
                %% real thin lines for testing
-               /l 0.005 def
+               /blot 0.005 def
        }{
-               /l 0.05 def
+               /blot blot-diameter def
        } ifelse
 
        0 setlinecap
-       l setlinewidth
+       blot setlinewidth
        1 setlinejoin
 
-       l 2 div sub /h exch def
-       l 2 div sub /d exch def
+       blot 2 div sub /h exch def
+       blot 2 div sub /d exch def
 
        %% UGH huh?
        %% Where does this correction come from?
        %% Why don't we need this in x direction?
-       h l 2 div sub /h exch def
-       d l 2 div sub /d exch def
+       h blot 2 div sub /h exch def
+       d blot 2 div sub /d exch def
 
-       l 2 div sub /w exch def
-       l 2 div sub /b exch def
+       blot 2 div sub /w exch def
+       blot 2 div sub /b exch def
 
        b neg d neg moveto
        b w add 0 rlineto
        %% FIXME: hardcoded
        currentdict /testing known {
                %% real thin lines for testing
-               /l 0.01 def
+               /blot 0.005 def
        }{
-               /l 0.1 def
+               /blot blot-diameter def
        } ifelse
-       l 2 div setlinewidth
+       blot setlinewidth
 
        0 setlinecap
        1 setlinejoin
 
-       l sub /t exch def
-       l sub /w exch def
+       blot 2 mul sub /t exch def
+       blot 2 mul sub /w exch def
        w mul /h exch def
 
-       l 2 div t 2 div neg moveto
+       blot t 2 div neg moveto
        w h rlineto
        0 t rlineto
        w neg h neg rlineto
 
 /draw_repeat_slash % width slope thick
 {
-  /beamthick exch def
-  /slope exch def
-  /width exch def
-  beamthick beamthick slope div euclidean_length
-    /xwid exch def 
-  0 0 moveto
-  xwid 0  rlineto
-  width slope width mul rlineto
-  xwid neg 0 rlineto
-%  width neg width angle sin mul neg rlineto
-  closepath fill
+       1 setlinecap
+       1 setlinejoin
+
+       /beamthick exch def
+       /slope exch def
+       /width exch def
+       beamthick beamthick slope div euclidean_length
+         /xwid exch def 
+       0 0 moveto
+       xwid 0  rlineto
+       width slope width mul rlineto
+       xwid neg 0 rlineto
+      %  width neg width angle sin mul neg rlineto
+       closepath fill
 } bind def
 
 /draw_hairpin % width start_h end_h thick
 {
-  setlinewidth
-  /end_h exch def 
-  /start_h exch def
-  /wid exch def
-  0 start_h moveto
-  wid end_h lineto
-  stroke
-  0 start_h neg moveto
-  wid end_h neg lineto
-  stroke
+       1 setlinecap
+       1 setlinejoin
+
+       setlinewidth
+       /end_h exch def 
+       /start_h exch def
+       /wid exch def
+       0 start_h moveto
+       wid end_h lineto
+       stroke
+       0 start_h neg moveto
+       wid end_h neg lineto
+       stroke
 } bind def
 
 /draw_tuplet % height gap dx dy thick dir 
 { 
-       /dir exch def 
-       setlinewidth 
        1 setlinecap 
        1 setlinejoin 
+
+       /dir exch def 
+       setlinewidth 
        /tuplet_dy exch def 
        /tuplet_dx exch def 
        /tuplet_gapx exch def 
 
 /draw_volta % h w thick vert_start vert_end 
 { 
+       1 setlinecap 
+       1 setlinejoin 
+
        /vert_end exch def 
        /vert_start exch def 
        setlinewidth 
        /volta_w exch def 
        /volta_h exch def 
-       1 setlinecap 
-       1 setlinejoin 
        vert_start 0 eq { 
                0 0 moveto 
                0 volta_h lineto 
index c1ff2b18ed2c70ed1740f6d872570b045a4a586b..ab5ad6b4345fa92dd222b8859a09e66a07f77345 100644 (file)
@@ -20,6 +20,7 @@
                         ##1 @endspecial}%
         }
 }
-
+\def\PSsetTeXdimen#1{\expandafter\special{! /#1 (\csname #1\endcsname) set_tex_dimen}}
+\PSsetTeXdimen{lilypondpaperblotdiameter}
 \def\turnOnExperimentalFeatures{}