X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fottava-bracket.cc;h=f70a30b404e1125ed6ee252c1a820f581b8d52d6;hb=f7d264fa89c39f8d86e9ba5eb991ee904ce3d0be;hp=38040342ca645c9ac75501ed3ab9774c31be282b;hpb=08560a1b8076630c4fc6cb9b902614d8b74fd6fc;p=lilypond.git
diff --git a/lily/ottava-bracket.cc b/lily/ottava-bracket.cc
index 38040342ca..f70a30b404 100644
--- a/lily/ottava-bracket.cc
+++ b/lily/ottava-bracket.cc
@@ -17,6 +17,7 @@
along with LilyPond. If not, see .
*/
+#include "axis-group-interface.hh"
#include "text-interface.hh"
#include "spanner.hh"
#include "font-interface.hh"
@@ -55,8 +56,7 @@ Ottava_bracket::print (SCM smob)
Output_def *layout = me->layout ();
Drul_array broken;
- Direction d = LEFT;
- do
+ for (LEFT_and_RIGHT (d))
{
Item *b = me->get_bound (d);
broken[d] = (b->break_status_dir () != CENTER);
@@ -74,7 +74,6 @@ Ottava_bracket::print (SCM smob)
}
}
}
- while (flip (&d) != LEFT);
SCM properties = Font_interface::text_font_alist_chain (me);
SCM markup = me->get_property ("text");
@@ -90,7 +89,7 @@ Ottava_bracket::print (SCM smob)
TODO: we should check if there are ledgers, and modify length of
the spanner to that.
*/
- do
+ for (LEFT_and_RIGHT (d))
{
Item *b = me->get_bound (d);
@@ -114,14 +113,13 @@ Ottava_bracket::print (SCM smob)
if (broken[d])
{
- span_points[d] = b->extent (common, X_AXIS)[RIGHT];
+ span_points[d] = Axis_group_interface::generic_bound_extent (b, common, X_AXIS)[RIGHT];
shorten[d] = 0.;
}
else
span_points[d] = ext[d];
}
- while (flip (&d) != LEFT);
/*
0.3 is ~ italic correction.
@@ -143,13 +141,12 @@ Ottava_bracket::print (SCM smob)
Drul_array flare = robust_scm2interval (me->get_property ("bracket-flare"),
Interval (0, 0));
- do
+ for (LEFT_and_RIGHT (d))
{
edge_height[d] *= -get_grob_direction (me);
if (broken[d])
edge_height[d] = 0.0;
}
- while (flip (&d) != LEFT);
Stencil b;
Interval empty;