12 Score::do_connect(PCol *c1, PCol *c2, Real d, Real h)
16 Idealspacing*sp=pscore_->get_spacing(c1,c2);
25 Score::connect(PCol* c1, PCol *c2, Real d, Real h)
27 do_connect(c1,c2,d,h);
28 do_connect(c1->postbreak, c2,d,h);
29 do_connect(c1, c2->prebreak,d,h);
30 do_connect(c1->postbreak, c2->prebreak,d,h);
33 /* this needs A LOT of rethinking.
35 generate springs between columns.
38 Score::calc_idealspacing()
40 PCursor<Score_column*> i(cols_);
44 PCursor<Score_column*> j (i+1);
47 for (int n=0; n < i->durations.sz(); n++) {
48 Real d = i->durations[n];
49 Real dist = paper_->duration_to_dist(d);
50 while (j->when < d + i->when)
53 assert( distance(j->when, d+i->when) < 1e-8);
55 connect(i->pcol_, j->pcol_, dist);
56 if (!j->musical && (j+1).ok()
57 && (j+1)->when == j->when) {
59 connect(i->pcol_, j->pcol_, dist);
64 /* attach i to the next column in use. This exists, since
65 the last col is breakable, and therefore in use
68 Real d = j->when - i->when;
69 Real dist = (d) ? paper_->duration_to_dist(d) :
70 convert_dimen(2,"pt"); // todo
72 connect(i->pcol_, j->pcol_, dist, (d) ? 1.0:1.0);
74 // !j.ok() might hold if we're at the last col.