#include "spanner.hh"
#include "font-interface.hh"
#include "dimensions.hh"
-#include "paper-def.hh"
+#include "output-def.hh"
#include "warn.hh"
#include "paper-column.hh"
#include "lookup.hh"
Direction grow_dir = to_dir (s);
-
- /* Ugh, must be same as Text_spanner::print. */
-
- /*
- Ugh. property name is not general.
- */
- Real padding = gh_scm2double (me->get_property ("if-text-padding"));
+ Real padding = scm_to_double (me->get_property ("bound-padding"));
Drul_array<bool> broken;
Drul_array<Item*> bounds ;
Direction d = LEFT;
do
{
- bounds[d] =spanner->get_bound (d);
+ bounds[d] = spanner->get_bound (d);
broken[d] = bounds[d]->break_status_dir () != CENTER;
}
while (flip (&d) != LEFT);
do
{
Item *b = bounds[d];
- x_points[d] = b->relative_coordinate (common, X_AXIS);
+ x_points[d] = b->relative_coordinate (common, X_AXIS);
if (broken [d])
{
if (d == LEFT)
adjacent to a text-dynamic, and we may move closer. We
make the padding a little smaller, here.
*/
- Interval e =b->extent (common, X_AXIS);
+ Interval e = b->extent (common, X_AXIS);
if (e.is_empty ())
e = Interval (0,0) + b->relative_coordinate (common, X_AXIS);
- x_points[d] = e.center () - d * padding /3; // ugh.
+ x_points[d] = e.center () - d * padding / 3; // ugh.
}
else
{
- Interval e =b->extent (common, X_AXIS);
+ Interval e = b->extent (common, X_AXIS);
if (!e.is_empty ())
x_points[d] = e[-d] - d*padding;
}
/*
should do relative to staff-symbol staff-space?
- */
+ */
Stencil mol;
mol = Line_interface::line (me, Offset (0, starth), Offset (width, endh));
mol.add_stencil (Line_interface::line (me,
- Offset (0, -starth),
- Offset (width, -endh)));
+ Offset (0, -starth),
+ Offset (width, -endh)));
mol.translate_axis (x_points[LEFT]
- bounds[LEFT]->relative_coordinate (common, X_AXIS),
ADD_INTERFACE (Hairpin, "hairpin-interface",
"A hairpin (de)crescendo.",
- "grow-direction height if-text-padding");
+ "grow-direction height bound-padding");