bool equally_long = false;
Grob *par_beam = parallel_beam (me, columns, &equally_long);
- bool bracket_visibility = ! (par_beam && equally_long); // Flag, print/don't print tuplet bracket.
+ bool bracket_visibility = !(par_beam && equally_long); // Flag, print/don't print tuplet bracket.
/*
FIXME: The type of this prop is sucky.
*/
SCM bracket_vis_prop = me->get_property ("bracket-visibility");
- bool bracket_prop = to_boolean (bracket_vis_prop); // Flag, user has set bracket-visibility prop.
+ bool bracket_prop = ly_scm2bool (bracket_vis_prop); // Flag, user has set bracket-visibility prop.
bool bracket = (bracket_vis_prop == ly_symbol2scm ("if-no-beam"));
- if (bracket_prop)
- bracket_visibility = true;
+ if (scm_is_bool (bracket_vis_prop))
+ bracket_visibility = bracket_prop;
else if (bracket)
bracket_visibility = !par_beam;
the bracket, but still let the number be displayed.
Only do this if the user has not explicitly specified bracket-visibility = #t.
*/
- if (!bracket_prop
+ if (!to_boolean (bracket_vis_prop)
&& (robust_scm2moment (me->get_bound (LEFT)->get_column ()->get_property ("when"), Moment (0))
== robust_scm2moment (me->get_bound (RIGHT)->get_column ()->get_property ("when"), Moment (0))))
bracket_visibility = false;
Don't print the bracket when it would be smaller than the number.
...Unless the user has coded bracket-visibility = #t, that is.
*/
- Real gap = 0.0;
+ Real gap = 0.;
if (bracket_visibility && number_grob)
{
Interval ext = number_grob->extent (number_grob, X_AXIS);
/*
use first -> last note for slope, and then correct for disturbing
- notes in between.
-*/
+ notes in between. */
void
Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy)
{
Interval staff;
Grob *st = Staff_symbol_referencer::get_staff_symbol (me);
- /*
- staff-padding doesn't work correctly on cross-staff tuplets
- because it only considers one staff symbol. Until this works,
- disable it.
- */
+ /* staff-padding doesn't work correctly on cross-staff tuplets
+ because it only considers one staff symbol. Until this works,
+ disable it. */
if (st && !to_boolean (me->get_property ("cross-staff")))
{
Real pad = robust_scm2double (me->get_property ("staff-padding"), -1.0);
Real x1 = robust_relative_extent (rgr, commonx, X_AXIS)[RIGHT];
bool follow_beam = par_beam
&& get_grob_direction (par_beam) == dir
- && ! to_boolean (par_beam->get_property ("knee"));
+ && !to_boolean (par_beam->get_property ("knee"));
vector<Offset> points;
if (columns.size ()
}
/*
- This is a slight hack. We compute two encompass points from the
+ This is a slight hack. We compute two encompass points from the
bbox of the smaller tuplets.
We assume that the smaller bracket is 1.0 space high.