--- /dev/null
+\version "2.11.16"
+\paper { ragged-right = ##t }
+\layout {
+ \context {
+ \Score
+ \override TupletBracket #'bracket-visibility = ##t
+ }
+}
+
+voice = {
+ \times 2/3 { b8 \change Staff=RH c' d' }
+ \times 2/3 { d' c' \change Staff=LH b }
+}
+
+\score {
+ \new PianoStaff
+ <<
+ \new Staff = "RH" { s4 s4 s4 }
+ \new Staff = "LH" { \clef bass \voice }
+ >>
+}
\ No newline at end of file
DECLARE_SCHEME_CALLBACK (height, (SCM));
DECLARE_SCHEME_CALLBACK (outside_slur_callback, (SCM, SCM));
DECLARE_SCHEME_CALLBACK (pure_outside_slur_callback, (SCM, SCM, SCM, SCM));
- DECLARE_SCHEME_CALLBACK (cross_staff, (SCM));
+ DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM));
DECLARE_GROB_INTERFACE();
static Bezier get_curve (Grob *me);
};
e->name().c_str ()));
}
-MAKE_SCHEME_CALLBACK (Slur, cross_staff, 1)
+MAKE_SCHEME_CALLBACK (Slur, calc_cross_staff, 1)
SCM
-Slur::cross_staff (SCM smob)
+Slur::calc_cross_staff (SCM smob)
{
Grob *me = unsmob_grob (smob);
Grob *staff = Staff_symbol_referencer::get_staff_symbol (me);
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 rp = ss * robust_scm2double (stems[RIGHT]->get_property ("stem-end-position"), 0.0);
+ Real my_parent_offset = me->get_parent (Y_AXIS)->relative_coordinate (commony, Y_AXIS);
+ Real lp = ss * robust_scm2double (stems[LEFT]->get_property ("stem-end-position"), 0.0)
+ + stems[LEFT]->get_parent (Y_AXIS)->relative_coordinate (commony, Y_AXIS) - my_parent_offset;
+ Real rp = ss * robust_scm2double (stems[RIGHT]->get_property ("stem-end-position"), 0.0)
+ + stems[RIGHT]->get_parent (Y_AXIS)->relative_coordinate (commony, Y_AXIS) - my_parent_offset;
*dy = rp - lp;
points.push_back (Offset (stems[LEFT]->relative_coordinate (commonx, X_AXIS) - x0, lp));
Kind of pointless since we put them outside the staff anyway, but
let's leave code for the future when possibly allow them to move
into the staff once again.
+
+ This doesn't seem to support cross-staff tuplets atm.
*/
if (*dy == 0
&& fabs (*offset) < ss * Staff_symbol_referencer::staff_radius (me))
Tuplet_number::calc_cross_staff (SCM smob)
{
Grob *me = unsmob_grob (smob);
- return unsmob_grob (me->get_object ("bracket"))->get_property ("cross_staff");
+ return unsmob_grob (me->get_object ("bracket"))->get_property ("cross-staff");
}
ADD_INTERFACE (Tuplet_number,