]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.5.25
authorfred <fred>
Wed, 27 Mar 2002 02:04:29 +0000 (02:04 +0000)
committerfred <fred>
Wed, 27 Mar 2002 02:04:29 +0000 (02:04 +0000)
lily/fingering-engraver.cc
lily/script-column.cc
lily/stem.cc
lily/translator-def.cc

index afdd5482bd1d9961daa8a030688565aa4fd53bcf..ec516bb2afde65830b24b5ce241bdc64dad155ef 100644 (file)
@@ -129,7 +129,7 @@ Fingering_engraver::process_music ()
        {
          /*
            chuck out reqs that have no pitch.  We put them over the note by default.
-       */
+         */
          up_reqs_.push (pitch_sorted_reqs [i]);
          pitch_sorted_reqs.del (i);
        }
index e5ecb8796091d0a391e58e49a35306706fc9a10e..7d8cdc7467f6495360e64f4976cfe3411e90b17d 100644 (file)
@@ -8,7 +8,7 @@
  */
 #include "script-column.hh"
 #include "side-position-interface.hh"
-
+#include "warn.hh"
 #include "group-interface.hh"
 
 void
@@ -46,8 +46,15 @@ Script_column::before_line_breaking (SCM smob)
                                     
   for (int i=0; i < staff_sided.size (); i++)
     {
-      arrs[Side_position_interface::get_direction (staff_sided[i])]
-       .push (staff_sided[i]);
+      Direction d = Side_position_interface::get_direction (staff_sided[i]);
+      if (!d)
+       {
+         programming_error ( "No direction for script?");
+         d = DOWN;
+         staff_sided[i]->set_grob_property ("direction", gh_int2scm (d));
+       }
+      
+      arrs[d].push (staff_sided[i]);
     }
 
   Direction d = DOWN;
index 90949fc766f0274c72ecf5345fc1abab6fc402d3..8502c7581c558ccf8c1ffa2e97900cacb980135c 100644 (file)
@@ -586,15 +586,18 @@ Stem::brew_molecule (SCM smob)
   Real y1 = Staff_symbol_referencer::position_f (first_head (me));
   Real y2 = stem_end_position (me);
   
-  Interval stem_y (y1,y2);
-  stem_y.unite (Interval (y2,y1));
+  Interval stem_y (y1 <? y2,y2 >? y1);
+
 
   // dy?
-  Real dy = Staff_symbol_referencer::staff_space (me)/2.0;
+  Real dy = Staff_symbol_referencer::staff_space (me) * 0.5;
     
   if (Grob *hed = support_head (me))
     {
-      Interval head_height = hed->extent (hed,Y_AXIS);
+      /*
+       must not take ledgers into account.
+       */
+      Interval head_height = Note_head::head_extent (hed,Y_AXIS);
       Real y_attach = Note_head::stem_attachment_coordinate ( hed, Y_AXIS);
 
       y_attach = head_height.linear_combination (y_attach);
index 9c8ffb0d3a5b4954e4f2ea11da2a3f0e75dd3fee..6d90f320be6655b6d14a033227ec542300c0c8ec 100644 (file)
@@ -12,7 +12,6 @@
 #include "translator-group.hh"
 #include "warn.hh"
 #include "music-output-def.hh"
-
 #include "ly-smobs.icc"
 
 int
@@ -41,17 +40,6 @@ Translator_def::mark_smob (SCM smob)
   return me->type_name_;
 }
 
-SCM push_sym;
-SCM assign_sym;
-
-static void
-foo_init ()
-{
-  push_sym = scm_permanent_object (ly_symbol2scm ("push"));
-  assign_sym = scm_permanent_object (ly_symbol2scm ("assign"));
-}
-
-ADD_SCM_INIT_FUNC (transdef, foo_init);
 
 Translator_def::Translator_def ()
 {
@@ -138,14 +126,14 @@ Translator_def::add_last_element (SCM s)
 void
 Translator_def::add_push_property (SCM props, SCM syms,  SCM vals)
 {
-  this->property_ops_ = gh_cons (scm_list_n (push_sym, props, syms, vals, SCM_UNDEFINED),
+  this->property_ops_ = gh_cons (scm_list_n (ly_symbol2scm ("push"), props, syms, vals, SCM_UNDEFINED),
                                 this->property_ops_);
 }
 
 void
 Translator_def::add_pop_property (SCM props, SCM syms)
 {
-  this->property_ops_ = gh_cons (scm_list_n (push_sym, props, syms, SCM_UNDEFINED),
+  this->property_ops_ = gh_cons (scm_list_n (ly_symbol2scm ("push"), props, syms, SCM_UNDEFINED),
                                 this->property_ops_);
 }
 
@@ -248,6 +236,10 @@ Translator_def::instantiate (Music_output_def* md)
   tg->output_def_l_ = md;
   tg->definition_ = self_scm ();
   tg->type_str_ = ly_scm2string (type_name_);
+
+  /*
+    TODO: ugh. we're reversing CONSISTS_NAME_LIST_ here
+   */
   SCM l1 = trans_list (consists_name_list_, tg);
   SCM l2 =trans_list (end_consists_name_list_,tg);
   l1 = scm_reverse_x (l1, l2);
@@ -268,14 +260,14 @@ Translator_def::apply_property_operations (Translator_group*tg)
       SCM type = ly_car (entry);
       entry = ly_cdr (entry); 
       
-      if (type == push_sym)
+      if (type == ly_symbol2scm ("push"))
        {
          SCM val = ly_cddr (entry);
          val = gh_pair_p (val) ? ly_car (val) : SCM_UNDEFINED;
 
          apply_pushpop_property (tg, ly_car (entry), ly_cadr (entry), val);
        }
-      else if (type == assign_sym)
+      else if (type == ly_symbol2scm ("assign"))
        {
          tg->internal_set_property (ly_car (entry), ly_cadr (entry));
        }
@@ -299,7 +291,7 @@ Translator_def::make_scm ()
 void
 Translator_def::add_property_assign (SCM nm, SCM val)
 {
-  this->property_ops_ = gh_cons (scm_list_n (assign_sym, scm_string_to_symbol (nm), val, SCM_UNDEFINED),
+  this->property_ops_ = gh_cons (scm_list_n (ly_symbol2scm ("assign"), scm_string_to_symbol (nm), val, SCM_UNDEFINED),
                                 this->property_ops_);
 }