]> git.donarmstrong.com Git - lilypond.git/commitdiff
* lily/beam.cc: use length-fraction too.
authorHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 16 Oct 2005 14:28:39 +0000 (14:28 +0000)
committerHan-Wen Nienhuys <hanwen@xs4all.nl>
Sun, 16 Oct 2005 14:28:39 +0000 (14:28 +0000)
* lily/beam.cc: remove flag-width-function

* lily/stem.cc (calc_length): multiply with length_fraction. Makes
for easier grace tweaks.

* lily/beam.cc: remove dir-function.

* lily/note-head.cc (calc_stem_attachment): new function.
(internal_print): use callback to get glyph-name.

* lily/stem.cc (calc_stem_end_position): new function.
(calc_length): new function.
document details for stem.
remove Stem::get_direction()

* lily/stem.cc (height): idem.

* lily/beam.cc (calc_direction): use pseudo-property for beam
direction callback.
(calc_positions): use callback

* lily/stem.cc (calc_stem_end_position): use callback.
(calc_positioning_done): idem.
(calc_direction): idem.
(calc_stem_end_position): idem
(calc_stem_info): idem.

input/les-nereides.ly
lily/beam.cc
lily/fingering-engraver.cc
lily/note-head.cc
lily/span-bar.cc
lily/stem.cc

index 12f2cb7ee2e5e9a34af494015f999eb46b83b4ab..66ca19752db83b2340e96d89aebf2b3cd737b28c 100644 (file)
@@ -56,7 +56,7 @@ treble = \new Voice \relative c''{
     cis''''4^\markup { \small \italic "m.g." }\arpeggio~
     \grace {
         cis8
-       \override Stem #'direction = #CENTER
+       \revert Stem #'direction
        
        a16[-5_( fis dis]
        #(set-octavation 0)
index 839930d899199fac88a14e09c4e18f983172cc35..c0e2ff28e98e8cc1ba085d623f85653df48e7461 100644 (file)
@@ -1390,6 +1390,5 @@ ADD_INTERFACE (Beam,
               "positions "
               "quant-score "
               "shorten "
-              "space-function "
               "thickness "
               );
index 6fa52ea3bc6df3111f97ce4fabf9f574168a0e7e..715179e41e327cdb3d5b8fe8f935a86254d5c266 100644 (file)
@@ -106,7 +106,7 @@ Fingering_engraver::make_script (Direction d, Music *r, int i)
 
   fingering->set_property ("script-priority", scm_from_int (priority));
 
-  if (!is_direction (fingering->get_property ("direction")))
+  if (!is_direction (fingering->get_property_data (ly_symbol2scm ("direction"))))
     {
       if (d)
        fingering->set_property ("direction", scm_from_int (d));
index eff41c8339736b9a8e360a6801562ccd74208344..76ce69b7065642d9738729baa8b6989ab83fdc05 100644 (file)
@@ -152,7 +152,6 @@ ADD_INTERFACE (Note_head, "note-head-interface",
 
               /* properties */
               "note-names "
-              "glyph-name-procedure "
               "accidental-grob "
               "stem-attachment "
               "style "
index 4c2fcaba64f35045d3e6fd4223c6580e986aca59..e3954f494ffd86a1c00530071a1d2a267b778e3c 100644 (file)
@@ -109,18 +109,22 @@ Span_bar::print (SCM smobbed_me)
 
 MAKE_SCHEME_CALLBACK (Span_bar, width_callback, 2);
 SCM
-Span_bar::width_callback (SCM element_smob, SCM scm_axis)
+Span_bar::width_callback (SCM smob, SCM scm_axis)
 {
-  Grob *se = unsmob_grob (element_smob);
+  Grob *me = unsmob_grob (smob);
   (void) scm_axis;
 
   assert ((Axis) scm_to_int (scm_axis) == X_AXIS);
-  String gl = ly_scm2string (se->get_property ("glyph-name"));
+  SCM gn = me->get_property ("glyph-name");
+  if (!me->is_live ())
+    return ly_interval2scm (Interval ());
+  
+  String gl = ly_scm2string (gn);
 
   /*
     urg.
   */
-  Stencil m = Bar_line::compound_barline (se, gl, 40 PT, false);
+  Stencil m = Bar_line::compound_barline (me, gl, 40 PT, false);
 
   return ly_interval2scm (m.extent (X_AXIS));
 }
index 296a5f00caab48e15a09b316e5317fe88afe6667..cb41fa15fb82d7afef325fe060e5bfa6fa4a696a 100644 (file)
@@ -375,6 +375,13 @@ Stem::calc_positioning_done (SCM smob)
   Real thick = thickness (me);
 
   Grob *hed = support_head (me);
+  if (!dir)
+    {
+      programming_error ("Stem dir must be up or down.");
+      dir = UP;
+      set_grob_direction (me, dir);
+    }
+  
   Real w = hed->extent (hed, X_AXIS)[dir];
   for (int i = 0; i < heads.size (); i++)
     heads[i]->translate_axis (w - heads[i]->extent (heads[i], X_AXIS)[dir],