Real thickness = get_thickness (me);
Real beam_translation = scm_to_int (beam_count) < 4
- ? (2*staff_space + line - thickness) / 2.0
- : (3*staff_space + line - thickness) / 3.0;
+ ? (2 * staff_space + line - thickness) / 2.0
+ : (3 * staff_space + line - thickness) / 3.0;
return scm_make_real (beam_translation);
}
int best_count = 0;
int best_start = 0;
for (int i = lslice[-left_dir];
- (i - lslice[left_dir])* left_dir <= 0; i+= left_dir)
+ (i - lslice[left_dir]) * left_dir <= 0; i += left_dir)
{
int count = 0;
for (SCM s = scm_car (right_beaming); scm_is_pair (s); s = scm_cdr (s))
last_int.set_empty ();
SCM last_beaming = SCM_EOL;
Direction last_dir = CENTER;
- for (int i = 0; i< stems.size (); i++)
+ for (int i = 0; i < stems.size (); i++)
{
Grob *this_stem = stems[i];
SCM this_beaming = this_stem->get_property ("beaming");
new_slice.add_point (new_beam_pos);
scm_set_car_x (s, scm_int2num (new_beam_pos));
}
-
}
while (flip (&d) != LEFT);
Stencil the_beam;
Real lt = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
- for (int i = 0; i<= stems.size (); i++)
+ for (int i = 0; i <= stems.size (); i++)
{
Grob *st = (i < stems.size ()) ? stems[i] : 0;
SCM this_beaming = st ? st->get_property ("beaming") : SCM_EOL;
Real xposn = st ? st->relative_coordinate (xcommon, X_AXIS) : 0.0;
- Real stem_width = st ? robust_scm2double (st->get_property ("thickness"), 1.0) *lt : 0;
+ Real stem_width = st ? robust_scm2double (st->get_property ("thickness"), 1.0) * lt : 0;
Direction stem_dir = st ? to_dir (st->get_property ("direction")) : CENTER;
/*
We do the space left of ST, with lfliebertjes pointing to the
}
if (st)
- w += stem_width/ 2;
+ w += stem_width / 2;
Real blot = me->get_layout ()->get_dimension (ly_symbol2scm ("blotdiameter"));
Stencil whole = Lookup::beam (slope, w, thick, blot);
return the_beam.smobbed_copy ();
}
-
Direction
Beam::get_default_dir (Grob *me)
{
Link_array<Grob> stems
= extract_grob_array (me, ly_symbol2scm ("stems"));
- for (int i = 0; i <stems.size (); i++)
+ for (int i = 0; i < stems.size (); i++)
{
Grob *s = stems[i];
this routine should take into account the stemlength scoring
of a possible knee/nonknee beam.
-
*/
void
Beam::consider_auto_knees (Grob *me)
Interval head_extents = head_extents_array[j++];
- Direction d = (head_extents.center () < max_gap.center ()) ?
- UP : DOWN;
+ Direction d = (head_extents.center () < max_gap.center ())
+ ? UP : DOWN;
stem->set_property ("direction", scm_int2num (d));
/*
"position" is relative to the staff.
*/
- scale_drul (&pos, 1/ Staff_symbol_referencer::staff_space (me));
+ scale_drul (&pos, 1 / Staff_symbol_referencer::staff_space (me));
me->set_property ("positions", ly_interval2scm (pos));
}
pos = Drul_array<Real> (y, (y + dy));
- scale_drul (&pos, 1/ Staff_symbol_referencer::staff_space (me));
+ scale_drul (&pos, 1 / Staff_symbol_referencer::staff_space (me));
me->set_property ("positions", ly_interval2scm (pos));
return SCM_UNSPECIFIED;
if (gap)
stem_y += thick * 0.5 * get_grob_direction (s);
- Stem::set_stemend (s, 2* stem_y / staff_space);
+ Stem::set_stemend (s, 2 * stem_y / staff_space);
}
}
return f;
}
-
int
Beam::visible_stem_count (Grob *me)
{
< rad
|| (rest->extent (common_y, Y_AXIS)[-d] + staff_space * shift) * -d
< rad)
- shift = ceil (fabs (shift)) *sign (shift);
+ shift = ceil (fabs (shift)) * sign (shift);
return scm_make_real (staff_space * shift);
}