/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 2005--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 2005--2014 Han-Wen Nienhuys <hanwen@xs4all.nl>
LilyPond is free software: you can redistribute it and/or modify
SCM
Figured_bass_continuation::center_on_figures (SCM grob)
{
- Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (grob));
+ Spanner *me = dynamic_cast<Spanner *> (Grob::unsmob (grob));
extract_grob_set (me, "figures", figures);
if (figures.empty ())
return scm_from_double (0.0);
SCM
Figured_bass_continuation::print (SCM grob)
{
- Spanner *me = dynamic_cast<Spanner *> (unsmob_grob (grob));
+ Spanner *me = dynamic_cast<Spanner *> (Grob::unsmob (grob));
Real thick
= me->layout ()->get_dimension (ly_symbol2scm ("line-thickness"))
* robust_scm2double (me->get_property ("thickness"), 1);
Interval spanned;
- Direction d = LEFT;
+
Grob *common = me->get_bound (LEFT)->common_refpoint (me->get_bound (RIGHT),
X_AXIS);
- do
+ for (LEFT_and_RIGHT (d))
{
Item *bound = me->get_bound (d);
Direction extdir
= robust_relative_extent (bound, common, X_AXIS)[extdir]
- me->relative_coordinate (common, X_AXIS);
}
- while (flip (&d) != LEFT);
spanned.widen (- robust_scm2double (me->get_property ("padding"), 0.2));
Stencil extender;