]> git.donarmstrong.com Git - lilypond.git/blobdiff - ps/music-drawing-routines.ps
stem-begin-position is not a length
[lilypond.git] / ps / music-drawing-routines.ps
index ccaf6b3dcc55195fcfe5fc0172f3300801108653..06c13648738254d3b5f60438eed59655a1c92a94 100644 (file)
 }
 bind def
 
+% llx lly urx ury page
+/mark_page_link
+{
+    /page exch def
+    /ury exch def
+    /urx exch def
+    /lly exch def
+    /llx exch def
+    [
+        /Rect [ llx lly urx ury ]
+        /Border [ 0 0 0 ]
+        /Page page
+        /Subtype /Link
+    /ANN
+    pdfmark
+}
+bind def
+
 % from adobe tech note 5002.
 /BeginEPSF { %def
     /b4_Inc_state save def % Save state for cleanup
@@ -77,16 +95,25 @@ bind def
 
 /draw_round_box % width height x y blot
 {
-       setlinewidth % w h x y
-       0 setlinecap
-       1 setlinejoin
+        dup
+       0.0 gt {
+               setlinewidth % w h x y
+               0 setlinecap
+               1 setlinejoin
 
-       rmoveto % w h
-       currentpoint % w h x1 y1
-       4 2 roll % x1 y1 w h
-       4 copy
-       rectfill
-       rectstroke
+               rmoveto % w h
+               currentpoint % w h x1 y1
+               4 2 roll % x1 y1 w h
+               4 copy
+               rectfill
+               rectstroke
+       } {
+               pop % w h x y
+               rmoveto % w h
+               currentpoint % w h x1 y1
+               4 2 roll % x1 y1 w h
+               rectfill
+       } ifelse
 } bind def
 
 /draw_polygon % fill? x(n) y(n) x(n-1) y(n-1) ... x(0) y(0) n blot