X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fottava-bracket.cc;h=0639fee71991bc6ae8673df800bc817da7d103ca;hb=2348fa9c19d9884469911f17dac9ad1f93b13363;hp=3aced1d37f26c614e304c9c1d55b67c25a89725e;hpb=bb8a0a5387af94dd2702877256334b160575a730;p=lilypond.git diff --git a/lily/ottava-bracket.cc b/lily/ottava-bracket.cc index 3aced1d37f..0639fee719 100644 --- a/lily/ottava-bracket.cc +++ b/lily/ottava-bracket.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2004--2011 Han-Wen Nienhuys + Copyright (C) 2004--2014 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -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;