X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Farpeggio.cc;h=80858426bc6eb43bc7f12e2f77a83aec4351d8b3;hb=bd97c502d275ea64db1ad0334327b734e17f2496;hp=5322a46c95fcdeceecb01cbc189f3903269d5a9d;hpb=6fee5c666220c045719d8b22497c29b93efeaaed;p=lilypond.git diff --git a/lily/arpeggio.cc b/lily/arpeggio.cc index 5322a46c95..80858426bc 100644 --- a/lily/arpeggio.cc +++ b/lily/arpeggio.cc @@ -8,15 +8,16 @@ #include "arpeggio.hh" +#include "bezier.hh" +#include "font-interface.hh" #include "grob.hh" +#include "lookup.hh" #include "output-def.hh" -#include "stem.hh" +#include "pointer-group-interface.hh" #include "staff-symbol-referencer.hh" #include "staff-symbol.hh" +#include "stem.hh" #include "warn.hh" -#include "font-interface.hh" -#include "lookup.hh" -#include "pointer-group-interface.hh" Grob * Arpeggio::get_common_y (Grob *me) @@ -136,6 +137,28 @@ Arpeggio::brew_chord_bracket (SCM smob) return mol.smobbed_copy (); } +MAKE_SCHEME_CALLBACK (Arpeggio, brew_chord_slur, 1); +SCM +Arpeggio::brew_chord_slur (SCM smob) +{ + Grob *me = unsmob_grob (smob); + Interval heads = robust_scm2interval (me->get_property ("positions"), + Interval()) + * Staff_symbol_referencer::staff_space (me); + + Real lt = me->layout ()->get_dimension (ly_symbol2scm ("line-thickness")); + Real dy = heads.length (); + + Real height_limit = 1.5; + Real ratio = .33; + Bezier curve = slur_shape (dy, height_limit, ratio); + curve.rotate (M_PI / 2); + + Stencil mol (Lookup::slur (curve, lt, lt)); + mol.translate_axis (heads[LEFT], Y_AXIS); + return mol.smobbed_copy (); +} + /* We have to do a callback, because print () triggers a vertical alignment if it is cross-staff. @@ -169,7 +192,8 @@ Arpeggio::pure_height (SCM smob, SCM, SCM) } ADD_INTERFACE (Arpeggio, - "Functions and settings for drawing an arpeggio symbol (a wavy line left to noteheads.", + "Functions and settings for drawing an arpeggio symbol (a" + " wavy line left to noteheads.", /* properties */ "arpeggio-direction "