Kieren MacMillan wrote:

> Is anyone PS-savvy enough to tell me how to draw scalable (independently in X 
> and Y) parentheses using \postscript?

Kieren,

At the moment, for some reason, a glacier could outrun 
my computer. So unfortunately, my solution is quick, 
dirty, cumbersome, inelegant and inaccurate. Not my
usual style to be sure. However, it should be enough to 
get you thinking. So, please don't put this in the LSR!

Hope this helps.

- Mark

\version "2.12.1"

leftPar = \markup {
  \postscript 
  #(let ((width 0.25)
         (height 1)
         (edge-thickness 0.1)
         (center-thickness 0.2))
   (ly:format
"/w ~a def /h ~a def /t0 ~a def /t1 ~a def /x1 t1 t0 sub def
/y1 1 3 div h mul def /y2 2 3 div h mul def
currentpoint translate t0 setlinewidth 1 setlinecap 1 setlinejoin
w 0 moveto 0 y1 0 y2 w h curveto x1 y2 x1 y1 w 0 curveto
gsave fill grestore stroke
" width height edge-thickness center-thickness))
}
rightPar = \markup {
  \postscript 
  #(let ((width 0.25)
         (height 1)
         (edge-thickness 0.1)
         (center-thickness 0.2))
   (ly:format
"/w ~a def /h ~a def /t0 ~a def /t1 ~a def /x1 w t1 t0 sub sub def
/y1 1 3 div h mul def /y2 2 3 div h mul def
currentpoint translate t0 setlinewidth 1 setlinecap 1 setlinejoin
0 0 moveto w y1 w y2 0 h curveto x1 y2 x1 y1 0 0 curveto
gsave fill grestore stroke
" width height edge-thickness center-thickness))
}

\markup \line { \leftPar \rightPar }



      


_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
http://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to