summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
31eac32)
and separation-item spacing. Make it per-grob configurable for grobs with
outside-staff-priority.
Box b (elements[i]->extent (x_common, X_AXIS),
elements[i]->extent (y_common, Y_AXIS));
Box b (elements[i]->extent (x_common, X_AXIS),
elements[i]->extent (y_common, Y_AXIS));
+ SCM horizon_padding_scm = elements[i]->get_property ("outside-staff-horizontal-padding");
+ Real horizon_padding = robust_scm2double (horizon_padding_scm, 0.0);
if (b[X_AXIS].is_empty () || b[Y_AXIS].is_empty ())
{
warning (_f ("outside-staff object %s has an empty extent", elements[i]->name ().c_str ()));
if (b[X_AXIS].is_empty () || b[Y_AXIS].is_empty ())
{
warning (_f ("outside-staff object %s has an empty extent", elements[i]->name ().c_str ()));
boxes.clear ();
boxes.push_back (b);
boxes.clear ();
boxes.push_back (b);
- Skyline other = Skyline (boxes, 0, X_AXIS, -dir);
+ Skyline other = Skyline (boxes, horizon_padding, X_AXIS, -dir);
Real padding = robust_scm2double (elements[i]->get_property ("outside-staff-padding"), 0.5);
Real dist = skylines[dir].distance (other) + padding;
Real padding = robust_scm2double (elements[i]->get_property ("outside-staff-padding"), 0.5);
Real dist = skylines[dir].distance (other) + padding;
"meta "
"minimum-X-extent "
"minimum-Y-extent "
"meta "
"minimum-X-extent "
"minimum-Y-extent "
+ "outside-staff-horizontal-padding "
"outside-staff-padding "
"outside-staff-priority "
"rotation "
"outside-staff-padding "
"outside-staff-priority "
"rotation "
vector<Box> bs = boxes (me);
do
{
vector<Box> bs = boxes (me);
do
{
- Skyline l (bs, 0, Y_AXIS, d);
+ /* todo: the horizon_padding is somewhat arbitrary */
+ Skyline l (bs, 0.1, Y_AXIS, d);
index_set_cell (lines, d, l.smobbed_copy ());
}
while (flip (&d) != LEFT);
index_set_cell (lines, d, l.smobbed_copy ());
}
while (flip (&d) != LEFT);
continue;
Interval y (il->pure_height (ycommon, 0, very_large));
continue;
Interval y (il->pure_height (ycommon, 0, very_large));
- y.widen (0.1); // fixme
Box b (il->extent (pc, X_AXIS), y);
out.push_back (b);
Box b (il->extent (pc, X_AXIS), y);
out.push_back (b);
/* A skyline is a sequence of non-overlapping buildings: something like
this:
_______
/* A skyline is a sequence of non-overlapping buildings: something like
this:
_______
- / \ ________
- / \ ________/ \
- /\ / \ / \
- / -----/ \ / \
- / \ / \
- / ------------/ ----
+ | \ ________
+ | \ ________/ \
+ /\ | \ / \
+ / -------- \ / \
+ / \ / \
+ / ------------/ ----
--
Each building has a starting position, and ending position, a starting
height and an ending height.
--
Each building has a starting position, and ending position, a starting
height and an ending height.
if (!isinf (b.iv_[RIGHT]))
ret->push_front (Building (b.iv_[RIGHT], -infinity_f,
-infinity_f, infinity_f));
if (!isinf (b.iv_[RIGHT]))
ret->push_front (Building (b.iv_[RIGHT], -infinity_f,
-infinity_f, infinity_f));
- if (horizon_padding > 0)
+ if (horizon_padding > 0 && !isinf (b.iv_.length ()))
ret->push_front (b.sloped_neighbour (horizon_padding, RIGHT));
if (b.iv_[RIGHT] > b.iv_[LEFT])
ret->push_front (b);
ret->push_front (b.sloped_neighbour (horizon_padding, RIGHT));
if (b.iv_[RIGHT] > b.iv_[LEFT])
ret->push_front (b);
- if (horizon_padding > 0)
+ if (horizon_padding > 0 && !isinf (b.iv_.length ()))
ret->push_front (b.sloped_neighbour (horizon_padding, LEFT));
if (!isinf (b.iv_[LEFT]))
ret->push_front (Building (-infinity_f, -infinity_f,
ret->push_front (b.sloped_neighbour (horizon_padding, LEFT));
if (!isinf (b.iv_[LEFT]))
ret->push_front (Building (-infinity_f, -infinity_f,
iv.widen (EPS);
Building front = Building (iv[LEFT], height, height, iv[RIGHT]);
bldgs.push_front (front);
iv.widen (EPS);
Building front = Building (iv[LEFT], height, height, iv[RIGHT]);
bldgs.push_front (front);
- if (horizon_padding > 0)
+ if (horizon_padding > 0 && !isinf (front.iv_.length ()))
{
bldgs.push_front (front.sloped_neighbour (horizon_padding, LEFT));
bldgs.push_front (front.sloped_neighbour (horizon_padding, RIGHT));
{
bldgs.push_front (front.sloped_neighbour (horizon_padding, LEFT));
bldgs.push_front (front.sloped_neighbour (horizon_padding, RIGHT));
boxes.push_back (Box (xiv, yiv));
}
boxes.push_back (Box (xiv, yiv));
}
- skylines_[UP] = Skyline (boxes, 0, X_AXIS, UP);
- skylines_[DOWN] = Skyline (boxes, 0, X_AXIS, DOWN);
+ SCM horizon_padding_scm = get_property ("skyline-horizontal-padding");
+ Real horizon_padding = robust_scm2double (horizon_padding_scm, 0);
+ skylines_[UP] = Skyline (boxes, horizon_padding, X_AXIS, UP);
+ skylines_[DOWN] = Skyline (boxes, horizon_padding, X_AXIS, DOWN);
"pure-Y-extent "
"spaceable-staves "
"skyline-distance "
"pure-Y-extent "
"spaceable-staves "
"skyline-distance "
+ "skyline-horizontal-padding "
boxes.push_back (Box (x, y));
}
while (flip (&updowndir) != DOWN);
boxes.push_back (Box (x, y));
}
while (flip (&updowndir) != DOWN);
-
- chord_outlines_[key] = Skyline (boxes, 0, Y_AXIS, -dir);
+
+ /* todo: the horizon_padding is somewhat arbitrary */
+ chord_outlines_[key] = Skyline (boxes, 0.1, Y_AXIS, -dir);
if (bounds[0]->break_status_dir ())
{
Real x = robust_relative_extent (bounds[0], x_refpoint_, X_AXIS)[-dir];
if (bounds[0]->break_status_dir ())
{
Real x = robust_relative_extent (bounds[0], x_refpoint_, X_AXIS)[-dir];
(non-musical ,boolean? "True if the grob belongs in a NonMusicalPaperColumn.")
(number-type ,symbol? "Type of numbers to use in label. Choices
include @code{roman-lower}, @code{roman-upper}, and @code{arabic}.")
(non-musical ,boolean? "True if the grob belongs in a NonMusicalPaperColumn.")
(number-type ,symbol? "Type of numbers to use in label. Choices
include @code{roman-lower}, @code{roman-upper}, and @code{arabic}.")
+ (outside-staff-horizontal-padding ,number? "By default, an outside-staff-object can be
+placed so that is it very close to another grob horizontally. If this property is set,
+the outside-staff-object will be raised so that it is not so close to its neighbour.")
(outside-staff-padding ,number? "The padding to place between this grob and the staff when
spacing according to outside-staff-priority.")
(outside-staff-priority ,number? "When set, the grob will be positioned outside the staff
(outside-staff-padding ,number? "The padding to place between this grob and the staff when
spacing according to outside-staff-priority.")
(outside-staff-priority ,number? "When set, the grob will be positioned outside the staff
(spaceable-staves ,ly:grob-array? "Objects to be spaced during page layout.")
(skyline-distance ,number? "The distance between this staff and the next one, as determined by a skyline algorithm.")
(spaceable-staves ,ly:grob-array? "Objects to be spaced during page layout.")
(skyline-distance ,number? "The distance between this staff and the next one, as determined by a skyline algorithm.")
+ (skyline-horizontal-padding ,number? "For determining the vertical distance between 2 staves, it is possible to have a configuration which would result in a tight interleaving of grobs from the top staff and the bottom staff. The larger this parameter is, the farther apart the staves will be placed in such a configuration.")
(skyline-spacing ,boolean? "When true, this axis-group will vertically space its children
using a skyline algorithm.")
(skyline-spacing ,boolean? "When true, this axis-group will vertically space its children
using a skyline algorithm.")
(X-extent . ,ly:axis-group-interface::width)
(Y-extent . ,ly:axis-group-interface::height)
(skyline-spacing . #t)
(X-extent . ,ly:axis-group-interface::width)
(Y-extent . ,ly:axis-group-interface::height)
(skyline-spacing . #t)
+ (skyline-horizontal-padding . 1.0)
(meta . ((class . System)
(interfaces . (system-interface
axis-group-interface))))))
(meta . ((class . System)
(interfaces . (system-interface
axis-group-interface))))))