]> git.donarmstrong.com Git - lilypond.git/blobdiff - mf/parmesan-clefs.mf
Merge branch 'master' into jneeman
[lilypond.git] / mf / parmesan-clefs.mf
index ece1b5014c45a384551a5dedd6a8b845b56c9356..3181eaa935a16c1e5467d46f717ec7fe785038d0 100644 (file)
@@ -6,7 +6,7 @@
 % (c) 2001--2006 Juergen Reuter <reuter@ipd.uka.de>
 %
 
-fet_begingroup ("clefs")
+fet_begingroup ("clefs");
 
 %
 % character aligment:
@@ -16,10 +16,10 @@ fet_begingroup ("clefs")
 %   `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)
@@ -1095,14 +1095,14 @@ enddef;
 
 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;
 
 
@@ -1206,7 +1206,7 @@ fet_beginchar ("mensural f clef", "mensural.f");
        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;
 
 
@@ -1260,15 +1260,15 @@ def draw_petrucci_g_clef (expr exact_center, reduction) =
        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[];
@@ -1385,40 +1385,51 @@ def draw_petrucci_g_clef (expr exact_center, reduction) =
             & 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);
@@ -1686,4 +1697,4 @@ fet_beginchar ("Hufnagel do/fa clef", "hufnagel.do.fa_change");
 fet_endchar;
 
 
-fet_endgroup ("clefs")
+fet_endgroup ("clefs");