Ensure that stem-tremolos have a width so they are included in the skyline.
DECLARE_SCHEME_CALLBACK (calc_width, (SCM));
DECLARE_SCHEME_CALLBACK (print, (SCM));
DECLARE_SCHEME_CALLBACK (height, (SCM));
+ DECLARE_SCHEME_CALLBACK (width, (SCM));
DECLARE_SCHEME_CALLBACK (calc_style, (SCM));
static Stencil raw_stencil (Grob *, Real slope, Direction stemdir);
static Stencil translated_stencil (Grob*, Real slope);
return ly_interval2scm (s1.extent (Y_AXIS));
}
+MAKE_SCHEME_CALLBACK (Stem_tremolo, width, 1);
+SCM
+Stem_tremolo::width (SCM smob)
+{
+ Grob *me = unsmob_grob (smob);
+
+ /*
+ Cannot use the real slope, since it looks at the Beam.
+ */
+ Stencil s1 (untranslated_stencil (me, 0.35));
+
+ return ly_interval2scm (s1.extent (X_AXIS));
+}
+
Real
Stem_tremolo::vertical_length (Grob *me)
{
(StemTremolo
. (
(Y-extent . ,ly:stem-tremolo::height)
+ (X-extent . ,ly:stem-tremolo::width)
(stencil . ,ly:stem-tremolo::print)
- (X-extent . #f)
(slope . ,ly:stem-tremolo::calc-slope)
(beam-width . ,ly:stem-tremolo::calc-width) ; staff-space
(style . ,ly:stem-tremolo::calc-style)