#include "proto.hh"
#include "misc.hh"
#include "debug.hh"
+#include "dimension-cache.hh"
#include "align-element.hh"
#include "stem.hh"
int stem_max = (int)rint(paper_l->get_var ("stem_max"));
String type_str = grace_b ? "grace_" : "";
Real min_stem_f = paper_l->get_var (type_str + "minimum_stem_length"
- + to_str (mult_i_ <? stem_max));
+ + to_str (mult_i_ <? stem_max)) * internote_f;
Real stem_f = paper_l->get_var (type_str + "stem_length"
+ to_str (mult_i_ <? stem_max))* internote_f;
// interstaff beam
Beam* beam_l = stem_l_->beam_l_;
- Dimension_cache *common = stem_l_->common_group (beam_l, Y_AXIS);
- Align_element * align = dynamic_cast<Align_element*> (common->element_l ());
+ Graphical_element *common = stem_l_->common_refpoint (beam_l, Y_AXIS);
+ Align_element * align = dynamic_cast<Align_element*> (common);
if (align && align->axis() == Y_AXIS)
{
if (align->threshold_interval_[MIN] !=
interstaff_f_ = align->threshold_interval_[MIN] / internote_f;
- Dimension_cache * beam_refpoint = beam_l->dim_cache_[Y_AXIS];
- Dimension_cache * stem_refpoint = stem_l_->dim_cache_[Y_AXIS];
+ Graphical_element * beam_refpoint = beam_l;
+ Graphical_element * stem_refpoint = stem_l_;
- while (beam_refpoint->parent_l_ != common)
- beam_refpoint = beam_refpoint->parent_l_;
- while (stem_refpoint->parent_l_ != common)
- stem_refpoint = stem_refpoint->parent_l_;
+ while (beam_refpoint->parent_l (Y_AXIS) != common)
+ beam_refpoint = beam_refpoint->parent_l (Y_AXIS);
+ while (stem_refpoint->parent_l (Y_AXIS) != common)
+ stem_refpoint = stem_refpoint->parent_l (Y_AXIS);
int beam_prio =
- align->get_priority (dynamic_cast<Score_element*> (beam_refpoint->element_l ()));
+ align->get_priority (dynamic_cast<Score_element*> (beam_refpoint));
int stem_prio =
- align->get_priority (dynamic_cast<Score_element*> (stem_refpoint->element_l ()));
+ align->get_priority (dynamic_cast<Score_element*> (stem_refpoint));
/*
our staff is lower -> interstaff_f_ *= -1