+/*
+ notehead.cc -- implement Note_head
+
+ source file of the GNU LilyPond music typesetter
+
+ (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
#include "misc.hh"
#include "note-head.hh"
#include "dimen.hh"
rest_b_ = false;
}
+void
+Note_head::do_pre_processing()
+{
+ // 8 ball looks the same as 4 ball:
+ if (balltype_i_ > 4 && !rest_b_)
+ balltype_i_ = 4;
+}
+
void
Note_head::set_rhythmic(Rhythmic_req*r_req_l)
{
balltype_i_ = r_req_l->duration_.type_i_;
- if (balltype_i_ > 4)
- balltype_i_ = 4;
dots_i_ = r_req_l->duration_.dots_i_;
}
IMPLEMENT_STATIC_NAME(Note_head);
+IMPLEMENT_IS_TYPE_B1(Note_head,Item);
void
Note_head::do_print()const
Molecule dm;
dm.add(Atom(d));
if (!(position_i_ %2))
- dm.translate(Offset(0,dy));
+ dm.translate_y(dy);
out->add_right(dm);
}
- out->translate(Offset(x_dir_i_ * p->note_width(),0));
+ out->translate_x(x_dir_i_ * p->note_width());
bool streepjes = (position_i_<-1)||(position_i_ > staff_size_i_+1);
if (rest_b_ && balltype_i_ > 2)
Molecule sm;
sm.add(Atom(str));
if (position_i_ % 2)
- sm.translate(Offset(0,-dy* dir));
+ sm.translate_y(-dy* dir);
out->add(sm);
}
- out->translate(Offset(0,dy*position_i_));
+ out->translate_y(dy*position_i_);
return out;
}