source file of the GNU LilyPond music typesetter
- (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+ (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include "misc.hh"
#include "dots.hh"
#include "note-head.hh"
-#include "dimen.hh"
+#include "dimension.hh"
#include "debug.hh"
#include "paper-def.hh"
#include "lookup.hh"
Interval
Note_head::do_width () const
{
- Atom a = paper ()->lookup_l()->ball (balltype_i_);
+ Atom a = lookup_l ()->ball (balltype_i_);
Interval i = a.dim_[X_AXIS];
i+= x_dir_ * i.length ();
return i;
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;
- Atom s = p->lookup_l()->ball (balltype_i_);
+ Atom s = lookup_l()->ball (balltype_i_);
out = new Molecule (Atom (s));
out->translate_axis (x_dir_ * s.dim_[X_AXIS].length (), X_AXIS);
if (streepjes_i)
{
int dir = sign (position_i_);
+ Atom streepje = 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_atom (s);
+ }
}
out->translate_axis (inter_f*position_i_, Y_AXIS);