]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tuplet-number.cc
unsmob_pitch -> Pitch::unsmob and related
[lilypond.git] / lily / tuplet-number.cc
index ad27ac958c910b91e4e307616fc0ce6c52b681b6..e208df15f2382bc6ee22a18101be0f23903d5724 100644 (file)
@@ -166,7 +166,7 @@ Tuplet_number::knee_position_against_beam (Grob *me_grob, Grob *ref_stem)
 
   Grob *beam = Stem::get_beam (ref_stem);
 
-  if (!beam || !to_boolean (beam->get_property ("knee")))
+  if (!beam || !Beam::is_knee (beam))
     return false;
 
   Grob *commonx = Tuplet_bracket::get_common_x (tuplet);
@@ -223,7 +223,7 @@ Tuplet_number::print (SCM smob)
     }
 
   SCM stc_scm = Text_interface::print (smob);
-  Stencil *stc = unsmob_stencil (stc_scm);
+  Stencil *stc = Stencil::unsmob (stc_scm);
 
   stc->align_to (X_AXIS, CENTER);
   stc->align_to (Y_AXIS, CENTER);
@@ -362,10 +362,6 @@ Tuplet_number::calc_y_offset (SCM smob)
   if (!ref_stem || !knee_position_against_beam (me, ref_stem))
     return to_bracket;
 
-  Grob *beam = Stem::get_beam (ref_stem);
-  if (!beam || !to_boolean (beam->get_property ("knee")))
-    return to_bracket;
-
   /*
     First, we calculate the Y-offset of the tuplet number as if it
     is positioned at the reference stem.
@@ -388,6 +384,7 @@ Tuplet_number::calc_y_offset (SCM smob)
   */
   if (to_boolean (ref_stem->get_property ("french-beaming")))
     {
+      Grob *beam = Stem::get_beam (ref_stem);
       Real beam_translation = Beam::get_beam_translation (beam);
       SCM beaming = ref_stem->get_property ("beaming");
       y_offset += ref_stem_dir
@@ -453,7 +450,7 @@ Tuplet_number::calc_y_offset (SCM smob)
   Interval colliding_acc_ext_y;
 
   for (vsize i = 0; i < heads.size (); i++)
-    if (Grob *acc = unsmob_grob (heads[i]->get_object ("accidental-grob")))
+    if (Grob *acc = Grob::unsmob (heads[i]->get_object ("accidental-grob")))
       {
         commony = commony->common_refpoint (acc, Y_AXIS);
         Interval acc_ext_y = acc->extent (commony, Y_AXIS);
@@ -487,8 +484,8 @@ MAKE_SCHEME_CALLBACK (Tuplet_number, calc_cross_staff, 1)
 SCM
 Tuplet_number::calc_cross_staff (SCM smob)
 {
-  Grob *me = unsmob_grob (smob);
-  return unsmob_grob (me->get_object ("bracket"))->get_property ("cross-staff");
+  Grob *me = Grob::unsmob (smob);
+  return Grob::unsmob (me->get_object ("bracket"))->get_property ("cross-staff");
 }
 
 ADD_INTERFACE (Tuplet_number,