]> git.donarmstrong.com Git - lilypond.git/blob - mf/feta-haak.mf
release: 0.1.55
[lilypond.git] / mf / feta-haak.mf
1 input feta-macros;
2 input feta-params;
3
4 save code;
5 code :=0;
6
7
8 def draw_bracket( expr height_sharp, width_sharp) = 
9         save alpha, height, p, width, thin, thick;
10         height# := height_sharp;
11         width#  := width_sharp;
12
13         beginchar(incr code, width#, height#/2, height#/2);
14  
15         define_pixels (height, width);
16         thin = 2 stafflinethickness;
17         thick = .5 interline;
18         
19         pickup pencircle scaled thin;
20         lft x1 = 0;
21         top y1 = height/2 + thick + thin;
22
23         x2 = x1;
24         z2 = (x1, 0);
25         rt x3 = thick;
26         y3 = y2;
27
28         x4 = x3;
29         bot y4 = y1 - thick + thin/2;
30
31         alpha = 50;
32         z5 = z1 + (width, 3/4interline);
33
34         % need silly z6?
35         % strange turning path when invoked via MakeTeXTFM...?
36         % mf "\\mode:=ljfour; mag:=1; scrollmode; input feta-brackets16"
37         z6 = z5 - (0, thin/16);
38
39         filldraw z5{dir(180+alpha)}..{left}z1--z2--z3..{up}z4{right}
40                 ..{dir(alpha)}z6..cycle;
41
42         labels(1,2,3,4,5,6);
43         addto currentpicture also currentpicture yscaled -1;
44 endchar;
45 enddef;
46
47
48 % for h :=  staffsize# step 1 pt# until (2 * staffsize#):
49 for h :=  staffsize# step 1 pt# until (7 * staffsize#):
50         draw_bracket(h, 2interline# );
51 endfor
52