% (c) 2001--2006 Juergen Reuter <reuter@ipd.uka.de>
%
-fet_begingroup ("clefs")
+fet_begingroup ("clefs");
%
% character aligment:
% `f', etc. The shape of each clef character defines a vertical
% position that is assumed to represent this pitch. For the treble
% clef, it is the vertical position of the center of the spiral
-% ending that represents the 'g' pitch. For the bass clef, it is
+% ending that represents the `g' pitch. For the bass clef, it is
% the center between the two fat dots that define the vertical
-% position of the 'f' pitch. For the alto clef, it is the vertical
-% center of the clef that is aligned with the 'c' pitch. For each
+% position of the `f' pitch. For the alto clef, it is the vertical
+% center of the clef that is aligned with the `c' pitch. For each
% clef character, this center should be vertically aligned with the
% point (0, 0). The horizontal alignment of each clef character
% should be such that the vertical line through the point (0, 0)
fet_beginchar ("petrucci f clef", "petrucci.f");
if test = 1:
- draw_staff (-1,3, 0.0);
+ draw_staff (-1, 3, 0.0);
fi;
- draw_petrucci_f_clef ((0,0), 1.0);
+ draw_petrucci_f_clef ((0, 0), 1.0);
fet_endchar;
fet_beginchar ("petrucci f clef", "petrucci.f_change");
- draw_petrucci_f_clef ((0,0), .8);
+ draw_petrucci_f_clef ((0, 0), .8);
fet_endchar;
if test = 1:
draw_staff (-1, 3, 0.0);
fi;
- draw_mensural_f_clef ((0,0), 1.0);
+ draw_mensural_f_clef ((0, 0), 1.0);
fet_endchar;
lft z10 = (xoffs + 0.20 reduced_il, yoffs + 0.60 reduced_il);
paths1 := z1{-1, 2}
- .. z2
- .. z3
- .. z4
- .. z5
- .. z6
- .. z7
- .. z8
- .. z9
- .. z10;
+ .. z2
+ .. z3
+ .. z4
+ .. z5
+ .. z6
+ .. z7
+ .. z8
+ .. z9
+ .. z10;
save dirs, s;
pair dirs[];
& subpath (0, times1 - s / 4) of sub_outlines1
-- cycle;
+
% we approximate `draw paths2'
for i = 1 step s until (length paths2 - s):
dirs[i + 20] := direction (i - 1) of paths2;
endfor;
- fill get_subpath (ellipse, -dirs21, dirs21, z21)
- for i = (1 + s) step s until (length paths2 - s):
- .. get_subpoint (ellipse, dirs[i + 20],
- point (i - 1) of paths2)
- endfor
- .. get_subpath (ellipse, up, z26 - z25, z25)
- -- get_subpath (ellipse, z26 - z25, z25 - z26, z26)
- -- get_subpoint (ellipse, z25 - z26, z25)
- -- get_subpoint (ellipse, down, z25)
- for i = (length paths2 - s) step -s until (t4 + 1):
- .. get_subpoint (ellipse, -dirs[i + 20],
- point (i - 1) of paths2)
- endfor
- .. get_subpoint (ellipse, -direction t4 of paths2,
- point t4 of paths2)
- -- get_subpoint (ellipse, -direction t3 of paths2,
- point t3 of paths2)
- for i = (floor (t3 / s) * s + 1) step -s until (t2 + 1):
- .. get_subpoint (ellipse, -dirs[i + 20],
- point (i - 1) of paths2)
- endfor
- .. get_subpoint (ellipse, -direction t2 of paths2,
- point t2 of paths2)
- -- get_subpoint (ellipse, -direction t1 of paths2,
- point t1 of paths2)
- for i = (floor (t1 / s) * s + 1) step -s until (1 + s):
- .. get_subpoint (ellipse, -dirs[i + 20],
- point (i - 1) of paths2)
- endfor
+ sub_outlines21 := get_subpath (ellipse, -dirs21, dirs21, z21)
+ for i = (1 + s) step s until (length paths2 - s):
+ .. get_subpoint (ellipse, dirs[i + 20],
+ point (i - 1) of paths2)
+ endfor
+ .. get_subpath (ellipse, up, z26 - z25, z25);
+ sub_outlines22 := get_subpath (ellipse, z26 - z25, z25 - z26, z26)
+ -- get_subpoint (ellipse, z25 - z26, z25);
+ sub_outlines23 := get_subpoint (ellipse, down, z25)
+ for i = (length paths2 - s) step -s until (t4 + 1):
+ .. get_subpoint (ellipse, -dirs[i + 20],
+ point (i - 1) of paths2)
+ endfor
+ .. get_subpoint (ellipse, -direction t4 of paths2,
+ point t4 of paths2);
+ sub_outlines24 := get_subpoint (ellipse, -direction t3 of paths2,
+ point t3 of paths2)
+ for i = (floor (t3 / s) * s + 1) step -s until (t2 + 1):
+ .. get_subpoint (ellipse, -dirs[i + 20],
+ point (i - 1) of paths2)
+ endfor
+ .. get_subpoint (ellipse, -direction t2 of paths2,
+ point t2 of paths2);
+ sub_outlines25 := get_subpoint (ellipse, -direction t1 of paths2,
+ point t1 of paths2)
+ for i = (floor (t1 / s) * s + 1) step -s until (1 + s):
+ .. get_subpoint (ellipse, -dirs[i + 20],
+ point (i - 1) of paths2)
+ endfor;
+
+ (times2223, times2322) = sub_outlines22 intersectiontimes sub_outlines23;
+ (times2324, times2423) = sub_outlines23 intersectiontimes sub_outlines24;
+ (times2425, times2524) = sub_outlines24 intersectiontimes sub_outlines25;
+
+ fill sub_outlines21
+ -- subpath (0, times2223) of sub_outlines22
+ -- subpath (times2322, times2324) of sub_outlines23
+ -- subpath (times2423, times2425) of sub_outlines24
+ -- subpath (times2524, infinity) of sub_outlines25
.. cycle;
labels (1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
fet_endchar;
-fet_endgroup ("clefs")
+fet_endgroup ("clefs");