]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tuplet-bracket.cc
Run grand replace for 2015.
[lilypond.git] / lily / tuplet-bracket.cc
index 66bc6db4a4c4bf1f4aa6ca1525de7392b051c43c..c926966e9c05afa81c7a989312c0d54a8c4fb4ad 100644 (file)
@@ -1,7 +1,7 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1997--2014 Jan Nieuwenhuizen <janneke@gnu.org>
+  Copyright (C) 1997--2015 Jan Nieuwenhuizen <janneke@gnu.org>
   Han-Wen Nienhuys <hanwen@xs4all.nl>
 
   LilyPond is free software: you can redistribute it and/or modify
@@ -77,7 +77,7 @@ flatten_number_pair_property (Grob *me, Direction xdir, SCM sym)
 {
   Drul_array<Real> zero (0, 0);
   Drul_array<Real> pair
-    = robust_scm2drul (me->internal_get_property (sym), zero);
+    = robust_scm2drul (me->get_property (sym), zero);
   pair[xdir] = 0.0;
 
   me->set_property (sym, ly_interval2scm (pair));
@@ -133,7 +133,7 @@ MAKE_SCHEME_CALLBACK (Tuplet_bracket, calc_connect_to_neighbors, 1);
 SCM
 Tuplet_bracket::calc_connect_to_neighbors (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
 
   Direction dir = get_grob_direction (me);
   Drul_array<Item *> bounds (get_x_bound_item (me, LEFT, dir),
@@ -184,7 +184,7 @@ MAKE_SCHEME_CALLBACK (Tuplet_bracket, calc_x_positions, 1)
 SCM
 Tuplet_bracket::calc_x_positions (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
   extract_grob_set (me, "note-columns", columns);
 
   Grob *commonx = get_common_x (me);
@@ -255,7 +255,7 @@ MAKE_SCHEME_CALLBACK (Tuplet_bracket, print, 1);
 SCM
 Tuplet_bracket::print (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
   Stencil mol;
 
   extract_grob_set (me, "note-columns", columns);
@@ -438,20 +438,19 @@ Tuplet_bracket::make_bracket (Grob *me, // for line properties.
     }
 
   Stencil m;
-  for (LEFT_and_RIGHT (d))
-    {
-      if (!gap.is_empty ())
-        m.add_stencil (Line_interface::line (me, straight_corners[d],
-                                             gap_corners[d]));
-
+  if (!gap.is_empty ())
+    for (LEFT_and_RIGHT (d))
       m.add_stencil (Line_interface::line (me, straight_corners[d],
-                                           flare_corners[d]));
-    }
-
-  if (gap.is_empty ())
+                                           gap_corners[d]));
+  else
     m.add_stencil (Line_interface::line (me, straight_corners[LEFT],
                                          straight_corners[RIGHT]));
 
+  if (scm_is_number (me->get_property ("dash-fraction")))
+    me->set_property ("dash-fraction", scm_from_double (1.0));
+  for (LEFT_and_RIGHT (d))
+    m.add_stencil (Line_interface::line (me, straight_corners[d],
+                                         flare_corners[d]));
   return m;
 }
 
@@ -652,7 +651,7 @@ Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy)
 
           // assume that if a script is avoiding slurs, it should not get placed
           // under a tuplet bracket
-          if (Grob::unsmob (scripts[i]->get_object ("slur")))
+          if (Grob::is_smob (scripts[i]->get_object ("slur")))
             continue;
 
           Interval script_x (scripts[i]->extent (commonx, X_AXIS));
@@ -711,7 +710,7 @@ MAKE_SCHEME_CALLBACK (Tuplet_bracket, calc_positions, 1);
 SCM
 Tuplet_bracket::calc_positions (SCM smob)
 {
-  Spanner *me = unsmob_spanner (smob);
+  Spanner *me = Spanner::unsmob (smob);
 
   Real dy = 0.0;
   Real offset = 0.0;