]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tuplet-bracket.cc
*** empty log message ***
[lilypond.git] / lily / tuplet-bracket.cc
index f96551bc6f7b4942bf1def8706929fe684bab0d2..1f313e84a93482ccb492b92d37438b2f58b58481 100644 (file)
@@ -160,20 +160,20 @@ Tuplet_bracket::print (SCM smob)
   Direction dir = get_grob_direction (me);
 
   Grob * lgr = get_x_bound_grob (columns[0], dir);
-  Grob * rgr = get_x_bound_grob (columns.top (), dir);  
-  Real x0 = lgr->extent (commonx,X_AXIS)[LEFT];
-  Real x1 = rgr->extent (commonx,X_AXIS)[RIGHT];
-
+  Grob * rgr = get_x_bound_grob (columns.top (), dir);
+  
+  Real x0 = robust_relative_extent (lgr, commonx, X_AXIS)[LEFT];
+  Real x1 = robust_relative_extent (rgr, commonx, X_AXIS)[RIGHT];
   Real w = x1 -x0;
   
   SCM number = me->get_property ("text");
 
-  Output_def *pap = me->get_paper ();
+  Output_def *pap = me->get_layout ();
   Stencil num;
  if (scm_is_string (number) && number_visibility)
     {
       SCM properties = Font_interface::text_font_alist_chain (me);
-      SCM snum = Text_item::interpret_markup (pap->self_scm (), properties, number);
+      SCM snum = Text_interface::interpret_markup (pap->self_scm (), properties, number);
       num = *unsmob_stencil (snum);
       num.align_to (X_AXIS, CENTER);
       num.translate_axis (w/2, X_AXIS);
@@ -360,9 +360,8 @@ Tuplet_bracket::calc_position_and_height (Grob*me,Real *offset, Real * dy)
   
   Grob * lgr = get_x_bound_grob (columns[0], dir);
   Grob * rgr = get_x_bound_grob (columns.top (), dir);  
-  Real x0 = lgr->extent (commonx,X_AXIS)[LEFT];
-  Real x1 = rgr->extent (commonx,X_AXIS)[RIGHT];
-
+  Real x0 = robust_relative_extent (lgr, commonx, X_AXIS)[LEFT];
+  Real x1 = robust_relative_extent (rgr, commonx, X_AXIS)[RIGHT];
 
   /*
     Slope.
@@ -473,12 +472,12 @@ Tuplet_bracket::after_line_breaking (SCM smob)
     {
       SCM ps =  par_beam->get_property ("positions"); 
 
-      Real lp = scm_to_double (ly_car (ps));
-      Real rp = scm_to_double (ly_cdr (ps));
+      Real lp = scm_to_double (scm_car (ps));
+      Real rp = scm_to_double (scm_cdr (ps));
 
       /*
        duh. magic.
-<       */
+       */
       offset = lp + dir * (0.5 + scm_to_double (me->get_property ("padding")));
       dy = rp- lp;
     }
@@ -515,9 +514,9 @@ Direction
 Tuplet_bracket::get_default_dir (Grob*me)
 {
   Drul_array<int> dirs (0,0);  
-  for (SCM s = me->get_property ("note-columns"); ly_c_pair_p (s); s = ly_cdr (s))
+  for (SCM s = me->get_property ("note-columns"); scm_is_pair (s); s = scm_cdr (s))
     {
-      Grob * nc = unsmob_grob (ly_car (s));
+      Grob * nc = unsmob_grob (scm_car (s));
       Direction d = Note_column::dir (nc);
       if (d)
        dirs[d]++;