- TODO: robustify.
- */
- SCM which = me->get_grob_property ("type");
- SCM thick = me->get_grob_property ("thickness");
- SCM height = me->get_grob_property ("height");
-
- Real t = me->get_paper ()->get_var ("linethickness") * gh_scm2double (thick);
- Grob *common = me->get_bound(LEFT)->common_refpoint (me->get_bound (RIGHT),
- X_AXIS);
- Real w = me->get_bound (LEFT)->relative_coordinate (common, X_AXIS)
- - me->get_bound (RIGHT)->relative_coordinate (common, X_AXIS);
-
- Interval iv (0,w);
-
- Molecule m;
- if (which == ly_symbol2scm ("bracket"))
- {
- m = Lookup::bracket (X_AXIS, iv,t, gh_scm2double (height));
- }
- else if (which == ly_symbol2scm ("triangle"))
- {
- m = Lookup::triangle (iv, t, gh_scm2double (height));
- }
-
- return m.smobbed_copy();
+ TODO: use line interface
+ */
+ if (scm_is_eq (which, ly_symbol2scm ("bracket")))
+ m = Lookup::bracket (X_AXIS, iv, t, -height, t);
+ else if (scm_is_eq (which, ly_symbol2scm ("triangle")))
+ m = Lookup::triangle (iv, t, height);
+
+ m.align_to (Y_AXIS, DOWN);
+ m.translate_axis (- me->relative_coordinate (common, X_AXIS), X_AXIS);
+ return m.smobbed_copy ();