/// round slope to closest TeXslope
Atom beam (Real&,Real) const;
- /**
- pos == 3 : 3 lines above staff (extending below note)
-
- pos == -3: below staff
- */
- Atom streepjes (int type, int pos) const;
+ Atom streepje (int type) const;
Atom vbrace (Real &dy) const;
Atom meter (Array<Scalar>) const;
}
Atom
-Lookup::streepjes (int type, int i) const
+Lookup::streepje (int type) const
{
- assert (i);
+ if (type > 2)
+ type = 2;
- int arg;
- String idx;
-
- if (i < 0)
- {
- idx = "botlines";
- arg = -i;
- }
- else
- {
- arg = i;
- idx = "toplines";
- }
-
- // ugh
- Real w = ball (type).dim_[X_AXIS].length ();
-
- Atom ret = (*symtables_)("streepjes")->lookup (idx);
-
- Array<String> a;
- a.push (String (w) + "pt");
- a.push (arg);
- ret.tex_ = substitute_args (ret.tex_, a);
-
- return ret;
+ Symtable * st = (*symtables_)("balls");
+
+ return st->lookup (String (type) + 'l');
}
Atom
Real inter_f = p->internote_f ();
// ugh
- int streepjes_i = abs(position_i_) < staff_size_i_/2
+ int streepjes_i = abs (position_i_) < staff_size_i_/2
? 0
: (abs(position_i_) - staff_size_i_/2) /2;
if (streepjes_i)
{
int dir = sign (position_i_);
+ Atom streepje = p->lookup_l ()->streepje (balltype_i_);
+
+ int parity = (position_i_ % 2) ? 1 : 0;
- Atom streepje = p->lookup_l()->streepjes (balltype_i_, dir* streepjes_i);
-
- Molecule sm;
- sm.add (streepje);
- if (position_i_ % 2)
- sm.translate_axis (-inter_f* dir, Y_AXIS);
- out->add (sm);
+
+ for (int i=0; i < streepjes_i; i++)
+ {
+ Atom s = streepje;
+ s.translate_axis (-dir * inter_f * (i*2 + parity),
+ Y_AXIS);
+ out->add (s);
+ }
}
out->translate_axis (inter_f*position_i_, Y_AXIS);