return attachments;
}
-Tie_formatting_problem::Tie_formatting_problem()
+Tie_formatting_problem::Tie_formatting_problem ()
{
x_refpoint_ = 0;
+ use_horizontal_spacing_ = true;
}
Tie_formatting_problem::~Tie_formatting_problem ()
{
if (Stem::is_normal_stem (stem))
{
-
Interval x;
x.add_point (stem->relative_coordinate (x_refpoint_, X_AXIS));
x.widen (staff_space / 20); // ugh.
Interval y;
- Real stem_end_position =
- Stem::is_cross_staff (stem)
- ? get_grob_direction (stem) * infinity_f
- : Stem::stem_end_position (stem) * staff_space * .5;
+ Real stem_end_position = 0.0;
+ if (Stem::is_cross_staff (stem))
+ stem_end_position = get_grob_direction (stem) * infinity_f;
+ else
+ {
+ if (use_horizontal_spacing_ || !Stem::get_beam (stem))
+ stem_end_position = Stem::stem_end_position (stem) * staff_space * .5;
+ else
+ stem_end_position = Stem::note_head_positions (stem)[get_grob_direction (stem)]
+ * staff_space * .5;
+ }
+
y.add_point (stem_end_position);
Direction stemdir = get_grob_direction (stem);
*/
boxes.push_back (Box (x, y));
- stem_extents_[key].unite (Box (x,y));
+ stem_extents_[key].unite (Box (x, y));
if (dir == LEFT)
{
Box flag_box = Stem::get_translated_flag (stem).extent_box ();
- flag_box.translate( Offset (x[RIGHT], X_AXIS));
+ flag_box.translate ( Offset (x[RIGHT], X_AXIS));
boxes.push_back (flag_box);
}
}
}
extract_grob_set (stem, "note-heads", heads);
- for (vsize i = 0; i < heads.size(); i ++)
+ for (vsize i = 0; i < heads.size (); i ++)
{
- if (find (bounds.begin(), bounds.end (), dynamic_cast<Item*> (heads[i])) == bounds.end ())
+ if (find (bounds.begin (), bounds.end (), dynamic_cast<Item*> (heads[i])) == bounds.end ())
{
/*
other untied notes in the same chord.
{
Interval x;
Interval y;
- if (head_boxes.size())
+ if (head_boxes.size ())
{
Box b = boundary (head_boxes, updowndir, 0);
x = b[X_AXIS];
{
if (semi_ties.empty ())
return;
-
+
+ use_horizontal_spacing_ = false;
details_.from_grob (semi_ties[0]);
vector<Item*> heads;
while (flip (&d) != LEFT);
if (ties_conf
- && ties_conf->size() == 1)
+ && ties_conf->size () == 1)
{
Direction d = LEFT;
Drul_array<Grob*> stems (0, 0);
);
vars.push_back (var);
}
- if (i == ties.size() && !specifications_[i].has_manual_position_
+ if (i == ties.size () && !specifications_[i].has_manual_position_
&& ties[i].dir_ == UP)
{
Tie_configuration_variation var;
if (to_boolean (x_refpoint_->layout ()
->lookup_variable (ly_symbol2scm ("debug-tie-scoring"))))
{
- for (vsize i = 0; i < base.size(); i++)
+ for (vsize i = 0; i < base.size (); i++)
{
string card = base.complete_tie_card (i);
specifications_[i].tie_grob_->set_property ("quant-score",