8 def draw_brace( expr height_sharp, width_sharp) =
9 save pendir, height, width, thin, thick;
11 height# := height_sharp;
12 width# := width_sharp;
14 beginchar(code, width#, height#/2, height#/2);
17 define_pixels (height, width);
18 thin = 2 stafflinethickness;
19 thick = .5 staff_space;
28 pendir = unitvector(x3 - x1, y3/6 - y1);
29 penangle = angle pendir - 90;
30 penpos3(thin, penangle);
31 penpos2(thick, angle(z3 -z1) -90 );
32 penpos1(2/3 thin, penangle);
35 fill z2r .. simple_serif (z3r, z3l, 90)
36 .. z2l .. simple_serif (z1l, z1r, 90) ..cycle;
38 addto currentpicture also currentpicture yscaled -1;
43 for x := 1 step 1 until 160:
44 % note: define_pixels (x) multiplies x by hppp,
45 % we must never get bigger than infinity
46 draw_brace (min (x * pt#, infinity/hppp - 1), staff_space#);