Drul_array<Grob*> stems (Note_column::get_stem (cols[0]),
Note_column::get_stem (cols.back ()));
Drul_array<Grob*> stems (Note_column::get_stem (cols[0]),
Note_column::get_stem (cols.back ()));
-
- x_span[d]
- = robust_relative_extent (bounds[d], commonx, X_AXIS) [LEFT]
- - padding;
+
+ Real coord = bounds[d]->relative_coordinate(commonx, X_AXIS);
+ if (to_boolean (me->get_property ("full-length-to-extent")))
+ coord = robust_relative_extent(bounds[d], commonx, X_AXIS)[LEFT];
+
+ coord = max (coord, x_span[LEFT]);
+
+ x_span[d] = coord - padding;
bracket_visibility = ly_scm2bool (bracket);
else if (bracket == ly_symbol2scm ("if-no-beam"))
bracket_visibility = !par_beam;
bracket_visibility = ly_scm2bool (bracket);
else if (bracket == ly_symbol2scm ("if-no-beam"))
bracket_visibility = !par_beam;
+ /* if the tuplet does not span any time, i.e. a single-note tuplet, hide
+ the bracket, but still let the number be displayed */
+ if (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;
+ }
Interval x_span (points[LEFT][X_AXIS], points[RIGHT][X_AXIS]);
Drul_array<Real> positions (points[LEFT][Y_AXIS], points[RIGHT][Y_AXIS]);
Interval x_span (points[LEFT][X_AXIS], points[RIGHT][X_AXIS]);
Drul_array<Real> positions (points[LEFT][Y_AXIS], points[RIGHT][Y_AXIS]);
- if (Grob *st = Staff_symbol_referencer::get_staff_symbol (me))
+ 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. */
+ if (st && !to_boolean (me->get_property ("cross-staff")))
bool equally_long = false;
Grob *par_beam = parallel_beam (me, columns, &equally_long);
bool equally_long = false;
Grob *par_beam = parallel_beam (me, columns, &equally_long);
Item *lgr = get_x_bound_item (me, LEFT, dir);
Item *rgr = get_x_bound_item (me, RIGHT, dir);
Real x0 = robust_relative_extent (lgr, commonx, X_AXIS)[LEFT];
Real x1 = robust_relative_extent (rgr, commonx, X_AXIS)[RIGHT];
bool follow_beam = par_beam
Item *lgr = get_x_bound_item (me, LEFT, dir);
Item *rgr = get_x_bound_item (me, RIGHT, dir);
Real x0 = robust_relative_extent (lgr, commonx, X_AXIS)[LEFT];
Real x1 = robust_relative_extent (rgr, commonx, X_AXIS)[RIGHT];
bool follow_beam = par_beam
Drul_array<Grob *> stems (Note_column::get_stem (columns[0]),
Note_column::get_stem (columns.back ()));
Drul_array<Grob *> stems (Note_column::get_stem (columns[0]),
Note_column::get_stem (columns.back ()));
Real ss = 0.5 * Staff_symbol_referencer::staff_space (me);
Real lp = ss * robust_scm2double (stems[LEFT]->get_property ("stem-end-position"), 0.0)
Real ss = 0.5 * Staff_symbol_referencer::staff_space (me);
Real lp = ss * robust_scm2double (stems[LEFT]->get_property ("stem-end-position"), 0.0)
get_bounds (me, &left_col, &right_col);
if (left_col && right_col)
{
get_bounds (me, &left_col, &right_col);
if (left_col && right_col)
{
- Interval rv = right_col->extent (commony, Y_AXIS);
- Interval lv = left_col->extent (commony, Y_AXIS);
+ Interval rv = Note_column::cross_staff_extent (right_col, commony);
+ Interval lv = Note_column::cross_staff_extent (left_col, commony);
- /*
- Don't print if it doesn't span time.
- */
- if (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)))
- {
- me->suicide ();
- return SCM_EOL;
- }
-
Grob *me = unsmob_grob (smob);
Grob *staff_symbol = 0;
extract_grob_set (me, "note-columns", cols);
Grob *me = unsmob_grob (smob);
Grob *staff_symbol = 0;
extract_grob_set (me, "note-columns", cols);
Grob *stem_staff = Staff_symbol_referencer::get_staff_symbol (stem);
if (staff_symbol && (stem_staff != staff_symbol))
return SCM_BOOL_T;
Grob *stem_staff = Staff_symbol_referencer::get_staff_symbol (stem);
if (staff_symbol && (stem_staff != staff_symbol))
return SCM_BOOL_T;
- "A bracket with a number in the middle, used for tuplets. "
- "When the bracket spans a line break, the value of "
- "@code{break-overshoot} determines how far it extends "
- "beyond the staff. "
- "At a line break, the markups in the @code{edge-text} are printed "
- "at the edges. ",
-
+ "A bracket with a number in the middle, used for tuplets."
+ " When the bracket spans a line break, the value of"
+ " @code{break-overshoot} determines how far it extends"
+ " beyond the staff. At a line break, the markups in the"
+ " @code{edge-text} are printed at the edges.",