]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/slur-scoring.cc
Issue 3687 (part 2): Amend docs to use \compressMMRests
[lilypond.git] / lily / slur-scoring.cc
index 47bb40611c483018713bae43ec380b3ed1cd9461..85e917f96fe34a77e53d4cd84e911021f6029f92 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1996--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 1996--2015 Han-Wen Nienhuys <hanwen@xs4all.nl>
   Jan Nieuwenhuizen <janneke@gnu.org>
 
   LilyPond is free software: you can redistribute it and/or modify
@@ -42,7 +42,6 @@
 #include "staff-symbol-referencer.hh"
 #include "staff-symbol.hh"
 #include "stem.hh"
-#include "time-signature.hh"
 #include "warn.hh"
 
 /*
@@ -107,7 +106,7 @@ Slur_score_state::slur_direction () const
 Encompass_info
 Slur_score_state::get_encompass_info (Grob *col) const
 {
-  Grob *stem = unsmob_grob (col->get_object ("stem"));
+  Grob *stem = Grob::unsmob (col->get_object ("stem"));
   Encompass_info ei;
 
   if (!stem)
@@ -226,8 +225,8 @@ Slur_score_state::fill (Grob *me)
 
   Slur::replace_breakable_encompass_objects (me);
   staff_space_ = Staff_symbol_referencer::staff_space (me);
-  Real lt = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
-  thickness_ = robust_scm2double (me->get_property ("thickness"), 1.0) * lt;
+  line_thickness_ = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"));
+  thickness_ = robust_scm2double (me->get_property ("thickness"), 1.0) * line_thickness_;
 
   dir_ = slur_direction ();
   parameters_.fill (me);
@@ -282,11 +281,12 @@ Slur_score_state::fill (Grob *me)
                                          end_ys[RIGHT],
                                          end_ys[LEFT]);
       Real encompass_place = extra_encompass_infos_[i].extents_[Y_AXIS][dir_];
-      if (extra_encompass_infos_[i].type_ == ly_symbol2scm ("inside")
+      if (scm_is_eq (extra_encompass_infos_[i].type_,
+                     ly_symbol2scm ("inside"))
           && minmax (dir_, encompass_place, y_place) == encompass_place
           && (!extra_encompass_infos_[i].grob_->internal_has_interface (ly_symbol2scm ("key-signature-interface"))
               && !Clef::has_interface (extra_encompass_infos_[i].grob_)
-              && !Time_signature::has_interface (extra_encompass_infos_[i].grob_)))
+              && !extra_encompass_infos_[i].grob_->internal_has_interface (ly_symbol2scm ("time-signature-interface"))))
         {
           for (LEFT_and_RIGHT (d))
             additional_ys[d] = minmax (dir_,
@@ -331,7 +331,7 @@ MAKE_SCHEME_CALLBACK (Slur, calc_control_points, 1)
 SCM
 Slur::calc_control_points (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
 
   Slur_score_state state;
   state.fill (me);
@@ -639,7 +639,8 @@ Slur_score_state::generate_avoid_offsets () const
           z[Y_AXIS] += dir_ * parameters_.free_slur_distance_;
           avoid.push_back (z);
         }
-      else if (extra_encompasses[i]->get_property ("avoid-slur") == ly_symbol2scm ("inside"))
+      else if (scm_is_eq (extra_encompasses[i]->get_property ("avoid-slur"),
+                          ly_symbol2scm ("inside")))
         {
           Grob *g = extra_encompasses [i];
           Interval xe = g->extent (common_[X_AXIS], X_AXIS);