#include "cross-staff.hh"
#include "item.hh"
-#include "align-element.hh"
+#include "align-interface.hh"
#include "spanner.hh"
#include "warn.hh"
{
Real interstaff = 0.0;
Score_element *common = item->common_refpoint (span, Y_AXIS);
- Align_element * align = dynamic_cast<Align_element*> (common);
- if (align && align->axis() == Y_AXIS)
+ Align_interface align(common);
+
+ if (align.has_interface_b () && align.axis() == Y_AXIS)
{
- SCM threshold = align->get_elt_property ("threshold");
+ SCM threshold = common->get_elt_property ("threshold");
if (!gh_pair_p (threshold)
|| !scm_equal_p (gh_car (threshold), gh_cdr (threshold)))
warning (_ ("minVerticalAlign != maxVerticalAlign: cross staff spanners may be broken"));
note_refpoint = note_refpoint->parent_l (Y_AXIS);
int span_prio =
- align->get_count ((Score_element*) dynamic_cast<Score_element const*> (span_refpoint));
+ align.get_count ((Score_element*) dynamic_cast<Score_element const*> (span_refpoint));
int item_prio =
- align->get_count ((Score_element*) dynamic_cast<Score_element const *> (note_refpoint));
+ align.get_count ((Score_element*) dynamic_cast<Score_element const *> (note_refpoint));
/*
our staff is lower -> interstaff *= -1