-
- Molecule m;
- if (!edge[LEFT].empty_b ())
- m = edge[LEFT];
-
- if (!edge_line[LEFT].empty_b ())
- m.add_at_edge (X_AXIS, RIGHT, edge_line[LEFT], 0);
- if (!line.empty_b ())
- m.add_at_edge (X_AXIS, RIGHT, line,
- edge_line[LEFT].empty_b () ? 0 : - thick/2);
- if (!edge_line[RIGHT].empty_b ())
- m.add_at_edge (X_AXIS, RIGHT, edge_line[RIGHT], -thick/2);
- if (!edge[RIGHT].empty_b ())
- m.add_at_edge (X_AXIS, RIGHT, edge[RIGHT], 0);
- m.translate_axis (broken_left + extra_off[LEFT] + shorten[LEFT], X_AXIS);
-
- return m.smobbed_copy ();
-}
-
-
-
-/*
- Piano pedal brackets are a special case of a text spanner.
- Pedal up-down (restart) indicated by the angled right and left edges
- of consecutive pedals touching exactly to form an __/\__
- Chris Jackson <chris@fluffhouse.org.uk>
-*/
-
-void
-Text_spanner::setup_pedal_bracket(Spanner *me)
-{
-
- Real thick = me->paper_l ()->get_var ("linethickness");
- SCM st = me->get_grob_property ("thickness");
- if (gh_number_p (st))
- {
- thick *= gh_scm2double (st);
- }
-
- Drul_array<bool> w, broken;
- Drul_array<Real> height, width, shorten, r;
-
- /*
- FIXME: too many new property names.
- */
- SCM pa = me->get_grob_property ("if-text-padding");
- SCM ew = me->get_grob_property ("edge-width");
- SCM eh = me->get_grob_property ("edge-height");
- SCM sp = me->get_grob_property ("shorten-pair");
- SCM wl = me->get_grob_property ("left-widen");
- SCM wr = me->get_grob_property ("right-widen");
-
- // Pedal has an angled left edge \__ or an angled right edge __/
- w[LEFT] = w[RIGHT] = false;
- if (gh_boolean_p (wl) )
- w[LEFT] = to_boolean (wl);
- if (gh_boolean_p (wr) )
- w[RIGHT] = to_boolean (wr);
-
- Direction d = LEFT;
- Interval e;
- Real padding = 0;
-
- if (gh_number_p (pa) )
- padding = gh_scm2double (pa);
-
- do {
- Item *b = me->get_bound (d);
-
- e = b->extent (b, X_AXIS);
- if (!e.empty_b ())
- r[d] = d * (e[-d] + padding);
-
- broken[d] = b->break_status_dir () != CENTER;
- width[d] = 0;
- height[d] = 0;
- shorten[d] = 0;
- if ( w[d] && gh_pair_p (ew) )
- width[d] += gh_scm2double (index_cell (ew, d)) * d;
- if ( !broken[d] && (gh_pair_p (eh) ) )
- height[d] = gh_scm2double (index_cell (eh, d));
- if ( gh_pair_p (sp) )
- shorten[d] = gh_scm2double (index_cell (sp, d));
- }