connect-to-neighbor
* lily/horizontal-bracket.cc (make_bracket): support
connect-to-neighbor.
2006-10-21 Han-Wen Nienhuys <hanwen@lilypond.org>
2006-10-21 Han-Wen Nienhuys <hanwen@lilypond.org>
+ * scm/define-grobs.scm (all-grob-descriptions): calc
+ connect-to-neighbor
+
+ * lily/horizontal-bracket.cc (make_bracket): support
+ connect-to-neighbor.
+
* lily/ttf.cc (make_index_to_charcode_map): remove debugging gobs.
* VERSION (PACKAGE_NAME): release 2.9.26
* lily/ttf.cc (make_index_to_charcode_map): remove debugging gobs.
* VERSION (PACKAGE_NAME): release 2.9.26
Drul_array<Real> shorten = robust_scm2interval (me->get_property ("shorten-pair"),
Interval (0, 0));
Drul_array<Real> shorten = robust_scm2interval (me->get_property ("shorten-pair"),
Interval (0, 0));
// Make sure that it points in the correct direction:
scale_drul (&edge_height, Real (-dir));
// Make sure that it points in the correct direction:
scale_drul (&edge_height, Real (-dir));
Offset start;
start[a] = length;
Offset start;
start[a] = length;
+ Drul_array<bool> connect_to_other =
+ robust_scm2booldrul (me->get_property ("connect-to-neighbor"),
+ Drul_array<bool> (false, false));
+
+ Direction d = LEFT;
+ do
+ {
+ if (connect_to_other[d])
+ {
+ edge_height[d] = 0.0;
+ flare[d] = 0.0;
+ shorten[d] = 0.0;
+ }
+ }
+ while (flip (&d) != LEFT);
+
/*
ugh, Tuplet_bracket should use Horizontal_bracket, not the other way around.
*/
/*
ugh, Tuplet_bracket should use Horizontal_bracket, not the other way around.
*/
SCM
Horizontal_bracket::print (SCM smob)
{
SCM
Horizontal_bracket::print (SCM smob)
{
- Grob *me = unsmob_grob (smob);
+ Spanner *me = unsmob_spanner (smob);
extract_grob_set (me, "columns", gs);
extract_grob_set (me, "columns", gs);
+
+ vector<Grob*> enclosed = gs;
if (!gs.size ())
{
me->suicide ();
return SCM_EOL;
}
if (!gs.size ())
{
me->suicide ();
return SCM_EOL;
}
- Stencil b = make_enclosing_bracket (me, me, gs, X_AXIS, get_grob_direction (me));
+ Direction d = LEFT;
+ do
+ {
+ Item *b = me->get_bound (d);
+ if (b->break_status_dir ())
+ enclosed.push_back (b);
+ }
+ while (flip (&d) != LEFT);
+
+ Stencil b = make_enclosing_bracket (me, me, enclosed, X_AXIS, get_grob_direction (me));
return b.smobbed_copy ();
}
return b.smobbed_copy ();
}
"columns "
"edge-height "
"shorten-pair "
"columns "
"edge-height "
"shorten-pair "
#include "std-vector.hh"
#include "translator.hh"
#include "std-vector.hh"
#include "translator.hh"
+/*
+ TODO: derive "foo-bar-interface" from Foo_bar classname.
+ */
+
/**
A macro to automate administration of translators.
*/
/**
A macro to automate administration of translators.
*/
Direction d = LEFT;
do
straight_corners[d] += -d * shorten[d] / length * dz;
Direction d = LEFT;
do
straight_corners[d] += -d * shorten[d] / length * dz;
- while (flip (&d) != LEFT)
- ;
+ while (flip (&d) != LEFT);
if (gap.is_empty ())
gap = Interval (0, 0);
if (gap.is_empty ())
gap = Interval (0, 0);
(thickness . 1.0)
(stencil . ,ly:horizontal-bracket::print)
(Y-offset . ,ly:side-position-interface::y-aligned-side)
(thickness . 1.0)
(stencil . ,ly:horizontal-bracket::print)
(Y-offset . ,ly:side-position-interface::y-aligned-side)
+ (connect-to-neighbor . ,ly:tuplet-bracket::calc-connect-to-neighbors)
+
(padding . 0.2)
(staff-padding . 0.2)
(direction . ,DOWN)
(padding . 0.2)
(staff-padding . 0.2)
(direction . ,DOWN)