/*
This file is part of LilyPond, the GNU music typesetter.
- Copyright (C) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ Copyright (C) 1997--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
Jan Nieuwenhuizen <janneke@gnu.org>
LilyPond is free software: you can redistribute it and/or modify
#include "beam.hh"
+#include "axis-group-interface.hh"
#include "align-interface.hh"
#include "beam-scoring-problem.hh"
#include "beaming-pattern.hh"
|| abs (vertical_count) >= neighbor_seg.max_connect_);
if (!event)
- // Then this edge of the current segment is irrelevent because it will
+ // Then this edge of the current segment is irrelevant because it will
// be connected with the next segment in the event_dir direction.
+ // If we skip the left edge here, the right edge of
+ // the previous segment has already been skipped since
+ // the conditions are symmetric
continue;
current.vertical_count_ = vertical_count;
&& me->get_bound (event_dir)->break_status_dir ())
{
current.horizontal_[event_dir]
- = (robust_relative_extent (me->get_bound (event_dir),
- commonx, X_AXIS)[RIGHT]
+ = (Axis_group_interface::generic_bound_extent (me->get_bound (event_dir),
+ commonx, X_AXIS)[RIGHT]
+ event_dir * break_overshoot[event_dir]);
}
else
Grob *fvs = first_normal_stem (me);
Grob *lvs = last_normal_stem (me);
- Interval x_span = robust_scm2interval (me->get_property ("X-positions"), Interval (0,0));
+ Interval x_span = robust_scm2interval (me->get_property ("X-positions"), Interval (0, 0));
Direction feather_dir = to_dir (me->get_property ("grow-direction"));
for (vsize i = 0; i < stems.size (); i++)
|| !Beam::normal_stem_count (beam))
return scm_from_double (0.0);
+ Grob *common_y = rest->common_refpoint (beam, Y_AXIS);
+
Drul_array<Real> pos (robust_scm2drul (beam->get_property ("positions"),
Drul_array<Real> (0, 0)));
+ Direction dir = LEFT;
+ do
+ pos[dir] += beam->relative_coordinate (common_y, Y_AXIS);
+ while (flip (&dir) != LEFT);
+
Real staff_space = Staff_symbol_referencer::staff_space (rest);
scale_drul (&pos, staff_space);
+ (beam_count - 1) * beam_translation;
Real beam_y = stem_y - d * height_of_my_beams;
- Grob *common_y = rest->common_refpoint (beam, Y_AXIS);
-
Interval rest_extent = rest->extent (rest, Y_AXIS);
rest_extent.translate (offset + rest->get_parent (Y_AXIS)->relative_coordinate (common_y, Y_AXIS));
return scm_from_double (amount);
Grob *beam = unsmob_grob (stem->get_object ("beam"));
if (!beam
- || !Beam::normal_stem_count (beam))
+ || !Beam::normal_stem_count (beam)
+ || !is_direction (beam->get_property_data ("direction")))
return scm_from_double (amount);
Real ss = Staff_symbol_referencer::staff_space (me);
Grob *left;
Grob *right;
- if (idx == (vsize)-1 || my_stems.size () == 1)
+ if (idx == (vsize) - 1 || my_stems.size () == 1)
return scm_from_double (amount);
else if (idx == 0)
left = right = my_stems[1];
return scm_from_double (amount);
}
-
bool
Beam::is_knee (Grob *me)
{