lilypond-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

repeat dots fix


From: Rune Zedeler
Subject: repeat dots fix
Date: Tue, 20 Nov 2001 02:02:53 +0100

Fixes repeat dots on staves with alterated staff-space (neccesary for
implementing tabs).


--- mf/feta-puntje.mf~  Thu Mar  8 11:50:22 2001
+++ mf/feta-puntje.mf   Tue Nov 20 01:53:22 2001
@@ -10,18 +10,4 @@
        set_char_box(0, dot_diam#, dot_diam#/2, dot_diam#/2);
 fet_endchar;
 
-fet_beginchar("repeat dots", "repeatcolon", "repeatcolon")
-       pickup pencircle scaled dot_diam;
-       draw (dot_diam/2, staff_space/2);
-       addto currentpicture also currentpicture yscaled -1;
-       set_char_box(0, dot_diam#, staff_space#/2, staff_space#/2);
-fet_endchar;
-
-fet_beginchar("even repeat dots", "evenrepeatcolon", "evenrepeatcolon")
-       pickup pencircle scaled dot_diam;
-       draw (dot_diam/2, staff_space);
-       addto currentpicture also currentpicture yscaled -1;
-       set_char_box(0, dot_diam#, staff_space#, staff_space#);
-fet_endchar;
-
 fet_endgroup("dots");

--- lily/bar.cc~        Mon Apr 23 00:27:16 2001
+++ lily/bar.cc Tue Nov 20 01:51:25 2001
@@ -53,6 +53,8 @@
   Real fatline = gh_scm2double (me->get_grob_property
("thick-thickness"));
 
   Real staffline = me->paper_l ()->get_var ("stafflinethickness");
+  Real staffspace = me->paper_l ()->get_var ("staffspace")
+    * Staff_symbol_referencer::staff_space (me);
 
   kern *= staffline;
   thinkern *= staffline;
@@ -61,10 +63,13 @@
   
   Molecule thin = simple_barline (me, hair, h);
   Molecule thick = simple_barline (me, fatline, h);
-  Molecule colon = Font_interface::get_default_font (me)->find_by_name
(
-    Staff_symbol_referencer::line_count (me) & 1 == 1 ?
-    "dots-repeatcolon" : "dots-evenrepeatcolon"
-  );
+  Molecule colon;
+  Molecule dot = Font_interface::get_default_font (me)->find_by_name
("dots-dot");
+  Real dist = (2-(Staff_symbol_referencer::line_count (me) &
1))*staffspace;
+  dot.translate_axis(dist/2,Y_AXIS);
+  colon.add_molecule(dot);
+  dot.translate_axis(-dist,Y_AXIS);
+  colon.add_molecule(dot);
 
   Molecule m;


-Rune



reply via email to

[Prev in Thread] Current Thread [Next in Thread]