/*
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>
LilyPond is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
#include "lookup.hh"
#include "dimensions.hh"
#include "output-def.hh"
+#include "paper-column.hh"
#include "warn.hh"
#include "item.hh"
#include "staff-symbol-referencer.hh"
{
Item *x = sp->get_bound (d);
- span_points[d] = x->relative_coordinate (common, X_AXIS);
- if (!x->break_status_dir ()
- && !x->extent (x, X_AXIS).is_empty ())
- span_points[d] += x->extent (x, X_AXIS)[d];
+ span_points[d] = ((!x->break_status_dir ()
+ && !x->extent (x, X_AXIS).is_empty ())
+ ? Paper_column::break_align_width (x, ly_symbol2scm ("break-alignment"))[d]
+ : x->relative_coordinate (common, X_AXIS));
}
span_points[d] -= d * t / 2;
Direction dir = (Direction)sign (pos - nearest_line);
if (scm_is_pair (ledger_positions))
+ // custom ledger line positions
{
Real min_pos = HUGE_VAL;
Real max_pos = -HUGE_VAL;
int n = (int) floor ((ledger_fill[DOWN] - min_pos) / cycle);
Real current;
SCM s = scm_cdr (ledger_positions);
+ if (!scm_is_pair (s) || cycle < 0.1)
+ return values;
do
{
s2 = scm_car (s);
while (current <= ledger_fill[UP]);
}
else
+ // normal ledger lines
{
int ledger_count = (int) floor ((abs (nearest_line - pos) + ledger_extra) / 2);
values.resize (ledger_count);