]> git.donarmstrong.com Git - lilypond.git/blobdiff - tex/lily-ps-defs.tex
patch::: 1.1.2.jcn1: geile ps vixen enzode
[lilypond.git] / tex / lily-ps-defs.tex
index 92d9825afe4b35a6b99f419ec5cb10b6cb7e688d..99a7e13c2cc83c882feb389c0f39d6d01b4421d6 100644 (file)
@@ -3,11 +3,6 @@
 % transformed into \par 
 %
 
-%
-% Should put in a lily-ps.ps header?
-%
-%
-
 %
 % header info (macros/defs, etc) should go into a \special{! ... }, 
 % note the ! sign.  See dvips.info for details.
 % ``compiles'' operatorname binding in the body of foo, making
 % the code faster, and more reliable (less flexible)
 
-
 % transplant a TeX dimension into the PS output.
 \def\PSsetTeXdimen#1{\expandafter\special{! /#1 (\the\csname #1\endcsname) deftexdimen}}
 
-\def\turnOnPostScript{
-\def\embeddedps##1{%
-        % This sets CTM so that you get to the currentpoint
-        % by executing a 0 0 moveto
-        \special{ps: @beginspecial @setspecial ##1 @endspecial}       
-}
-
-%
-% width, slope, height 
-%
-\special{! % round cappings
-1 setlinecap
-/draw_beam
-{
-        2 div /beam_thick exch def
-        /beam_slope exch def
-        /beam_wd exch def
-        beam_slope beam_wd mul /beam_ht exch def
-        0 beam_thick neg moveto 
-        beam_wd beam_ht rlineto 
-        0 beam_thick 2 mul rlineto
-        0 beam_thick lineto
-        closepath fill
-} bind def
+\def\turnOnPostScript{%
+\special{!
 % PS helper: convert (0.2pt) to the token 0.2
-/settexdimen {  /thestring exch def
+/settexdimen
+{
+       /thestring exch def
         thestring 0 thestring length 2 sub
         getinterval
         token
-        pop exch pop 
-def
+        pop exch pop 
+def
 %
-/deftexdimen {
+/deftexdimen
+{
         settexdimen
         def     
 } def
 }
-
-
 \PSsetTeXdimen{staffrulethickness}
 \PSsetTeXdimen{staffheight}
-\special{! %
-/draw_decresc
-        {
-                staffrulethickness setlinewidth
-                /cresc_cont exch def
-                /cresc_ht exch def
-                /cresc_wd exch def
+% urg, no dvips.info over here...
+%\special{! \input lily.ps }
+\special{!
+(lily.ps) findlibfile 
+{
+       exch pop //systemdict /run get exec
+} 
+{ 
+       /undefinedfilename signalerror 
+} ifelse
+}
 %
-                cresc_wd cresc_cont moveto
-                0 cresc_ht lineto
-                stroke
-                cresc_wd cresc_cont neg moveto
-                0 cresc_ht neg lineto
-                stroke
-        }
-        bind def
-        /draw_cresc
-        {
-                /cresc_cont exch def
-                /cresc_ht exch def
-                /cresc_wd exch def
+\def\embeddedps##1{%
+        % This sets CTM so that you get to the currentpoint
+        % by executing a 0 0 moveto
+        \special{ps: @beginspecial @setspecial ##1 @endspecial}       
+}
 %
-                0 cresc_cont moveto
-                cresc_wd cresc_ht lineto
-                stroke
-                0 cresc_cont neg moveto
-                cresc_wd cresc_ht neg lineto
-                stroke
-        }
-        bind def
- /lily_distance {
-        1 copy mul exch 1 copy mul add sqrt
- } bind def
- staffheight 2 div
- /slurhtlimit exch def
- /slurratio 0.3333 def
- %
- %  (b*ratio)/(1 + b / htlimit)
- /getslurcontrol 
- { 
-        slurhtlimit 90 div /slur_alpha exch def
-        slurratio 60 div slur_alpha div  /slur_beta  exch def
-        slur_beta mul 1 atan slur_alpha mul
- } bind def
- staffrulethickness 1.5 mul  /slur_thick exch def
- /draw_slur
- {
-        staffrulethickness setlinewidth
-        0 0 moveto
-        /slur_dir exch def
-        /slur_dy exch def
-        /slur_dx exch def
-        slur_dy slur_dx lily_distance /slur_b  exch def
-        slur_b getslurcontrol 
-        slur_dir mul /slur_ht exch def
-        slur_b getslurcontrol /slur_indent exch def       
 %
-        slur_dy slur_dx atan rotate
-        slur_indent slur_ht
-        slur_b slur_indent sub slur_ht
-        slur_b 0
-        rcurveto        
- %
-        slur_indent neg slur_ht slur_dir slur_thick mul  sub
-        slur_indent slur_b sub slur_ht slur_dir slur_thick mul  sub
-        slur_b neg  0
-        rcurveto
- %
-        gsave
-                fill
-        grestore
-        stroke
- } bind def}}
-
-
-
+%\PSsetTeXdimen{staffrulethickness}
+%\PSsetTeXdimen{staffheight}
+}
 
-\def\turnOnExperimentalFeatures{
-% draw a slur in embedded postscript
+\def\turnOnExperimentalFeatures{%
 \special{ps:
 }}
+