--- /dev/null
+\version "2.15.22"
+
+\header {
+ texidoc = "Slurs do not force grobs with outside-staff-priority
+too high.
+"
+}
+
+\relative c' {
+ f8^"rit"( c' f c' f) r8 r4 |
+ c2( c,2 |
+ g1)~\startTrillSpan
+ g1\stopTrillSpan
+ g1(\f
+ g,1)
+}
\ No newline at end of file
return SCM_BOOL_F;
}
+LY_DEFINE (ly_vsize_p, "ly:vsize?",
+ 1, 0, 0, (SCM s),
+ "Is @var{s} a vsize?")
+{
+ if (scm_is_integer (s))
+ {
+ int i = scm_to_int (s);
+ return i >= 0 ? SCM_BOOL_T : SCM_BOOL_F;
+ }
+ return SCM_BOOL_F;
+}
+
LY_DEFINE (ly_assoc_get, "ly:assoc-get",
2, 2, 0,
(SCM key, SCM alist, SCM default_value, SCM strict_checking),
Real robust_scm2double (SCM, double);
int robust_scm2int (SCM, int);
+vsize robust_scm2vsize (SCM, vsize);
Direction robust_scm2dir (SCM, Direction);
Drul_array<Real> robust_scm2drul (SCM, Drul_array<Real>);
Drul_array<bool> robust_scm2booldrul (SCM, Drul_array<bool>);
DECLARE_SCHEME_CALLBACK (calc_direction, (SCM));
DECLARE_SCHEME_CALLBACK (pure_height, (SCM, SCM, SCM));
DECLARE_SCHEME_CALLBACK (height, (SCM));
+ DECLARE_SCHEME_CALLBACK (vertical_skylines, (SCM));
DECLARE_SCHEME_CALLBACK (outside_slur_callback, (SCM, SCM));
DECLARE_SCHEME_CALLBACK (pure_outside_slur_callback, (SCM, SCM, SCM, SCM));
DECLARE_SCHEME_CALLBACK (outside_slur_cross_staff, (SCM, SCM));
return o;
}
+vsize
+robust_scm2vsize (SCM k, vsize o)
+{
+ if (scm_integer_p (k) == SCM_BOOL_T)
+ {
+ o = scm_to_int (k);
+ if (o >= 0)
+ return (vsize) o;
+ }
+ return o;
+}
+
SCM
ly_rational2scm (Rational r)
{
#include "note-column.hh"
#include "output-def.hh"
#include "spanner.hh"
+#include "skyline-pair.hh"
#include "staff-symbol-referencer.hh"
#include "stem.hh"
#include "text-interface.hh"
return scm_from_double (offset + avoidance_offset);
}
+MAKE_SCHEME_CALLBACK_WITH_OPTARGS (Slur, vertical_skylines, 1, 0, "");
+SCM
+Slur::vertical_skylines (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+ vector<Box> boxes;
+
+ if (!me)
+ return Skyline_pair (boxes, 0.0, X_AXIS).smobbed_copy ();
+
+ Bezier curve = Slur::get_curve (me);
+ vsize box_count = robust_scm2vsize (me->get_property ("skyline-quantizing"), 10);
+ for (vsize i = 0; i < box_count; i++)
+ {
+ Box b;
+ b.add_point (curve.curve_point (i * 1.0 / box_count));
+ b.add_point (curve.curve_point ((i + 1) * 1.0 / box_count));
+ boxes.push_back (b);
+ }
+
+ return Skyline_pair (boxes, 0.0, X_AXIS).smobbed_copy ();
+}
+
/*
* Used by Slur_engraver:: and Phrasing_slur_engraver::
*/
"inspect-index "
"line-thickness "
"note-columns "
+ "skyline-quantizing "
"positions "
"ratio "
"thickness "
+ "vertical-skylines "
);
(side-support-elements ,ly:grob-array? "The side support, an array of
grobs.")
+ (skyline-quantizing ,ly:vsize? "The number of boxes to break a
+slur into when calculating its skyline.")
(slur ,ly:grob? "A pointer to a @code{Slur} object.")
(spacing ,ly:grob? "The spacing spanner governing this section.")
(spacing-wishes ,ly:grob-array? "An array of note spacing or staff spacing
(springs-and-rods . ,ly:spanner::set-spacing-rods)
(stencil . ,ly:slur::print)
(thickness . 1.1)
+ (vertical-skylines . ,ly:slur::vertical-skylines)
(Y-extent . ,ly:slur::height)
(meta . ((class . Spanner)
(interfaces . (slur-interface))))))
(springs-and-rods . ,ly:spanner::set-spacing-rods)
(stencil . ,ly:slur::print)
(thickness . 1.2)
+ (vertical-skylines . ,ly:slur::vertical-skylines)
(Y-extent . ,ly:slur::height)
(meta . ((class . Spanner)
(interfaces . (slur-interface))))))
(,ly:translator? . "translator")
(,ly:translator-group? . "translator group")
(,ly:unpure-pure-container? . "unpure/pure container")
+ (,ly:vsize? . "vsize")
))
ly:unit
ly:usage
ly:version
+ ly:vsize?
ly:warning
;; FIXME: cannot change staff size in --safe-mode