X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fballoon.cc;h=d323121b3e1f1e5bde93b465a6dfb9e1d328664a;hb=32a34dcef0c0041c6d62677487a380b5c8b85712;hp=c4efb46b687c17ac4cafb93cabef601915f9584a;hpb=f41973ff763d5972a85995b6d40c864281ec6714;p=lilypond.git diff --git a/lily/balloon.cc b/lily/balloon.cc index c4efb46b68..d323121b3e 100644 --- a/lily/balloon.cc +++ b/lily/balloon.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--2012 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 @@ -51,7 +51,7 @@ Balloon_interface::print (SCM smob) Grob *p = me->get_parent (X_AXIS); Offset off (me->relative_coordinate (p, X_AXIS), - me->relative_coordinate (p, Y_AXIS)); + me->relative_coordinate (p, Y_AXIS)); return internal_balloon_print (me, p, off); } @@ -65,24 +65,23 @@ Balloon_interface::print_spanner (SCM smob) if (orig) { - Direction spanner_placement = robust_scm2dir (me->get_property ("spanner-placement"), LEFT); + Direction spanner_placement = robust_scm2dir (me->get_property ("spanner-placement"), LEFT); Spanner *wanted = (spanner_placement != RIGHT) - ? orig->broken_intos_[0] - : orig->broken_intos_.back (); + ? orig->broken_intos_[0] + : orig->broken_intos_.back (); if (me != wanted) return SCM_EOL; } - Spanner *p = dynamic_cast (me->get_parent (Y_AXIS)); if (!p) return SCM_EOL; Offset off (me->relative_coordinate (me->get_bound (LEFT), X_AXIS), - me->relative_coordinate (p, Y_AXIS)); + me->relative_coordinate (p, Y_AXIS)); return internal_balloon_print (me, p, off); } @@ -90,7 +89,7 @@ SCM Balloon_interface::internal_balloon_print (Grob *me, Grob *p, Offset off) { Box b (p->extent (p, X_AXIS), - p->extent (p, Y_AXIS)); + p->extent (p, Y_AXIS)); Real padding = robust_scm2double (me->get_property ("padding"), .1); b.widen (padding, padding); @@ -101,13 +100,12 @@ Balloon_interface::internal_balloon_print (Grob *me, Grob *p, Offset off) SCM bt = me->get_property ("text"); SCM chain = Font_interface::text_font_alist_chain (me); - SCM stencil = Text_interface::interpret_markup (me->layout ()->self_scm (), - chain, bt); - + chain, bt); Stencil *text_stil = unsmob_stencil (stencil); Offset z1; + for (int i = X_AXIS; i < NO_AXES; i++) { Axis a ((Axis)i); @@ -128,14 +126,14 @@ Balloon_interface::internal_balloon_print (Grob *me, Grob *p, Offset off) } ADD_INTERFACE (Balloon_interface, - "A collection of routines to put text balloons around an" - " object.", - - /* properties */ - "annotation-balloon " - "annotation-line " - "padding " - "spanner-placement " - "text " - ); + "A collection of routines to put text balloons around an" + " object.", + + /* properties */ + "annotation-balloon " + "annotation-line " + "padding " + "spanner-placement " + "text " + );