assert (!s->beam_l ());
s->set_elt_pointer ("beam", self_scm_);
- if (!get_bound (LEFT))
- set_bound (LEFT,s);
- else
- set_bound (RIGHT,s);
+ add_bound_item (this, s);
}
int
}
- if (!directional_element (this).get ())
- directional_element (this).set (get_default_dir ());
+ if (!Directional_element_interface (this).get ())
+ Directional_element_interface (this).set (get_default_dir ());
auto_knees ();
set_stem_directions ();
for (int i=0; i <stem_count (); i++)
do { // HUH -- waar slaat dit op?
Stem *s = stem (i);
- Direction sd = directional_element (s).get ();
+ Direction sd = Directional_element_interface (s).get ();
int current = sd ? (1 + d * sd)/2
: s->get_center_distance ((Direction)-d);
void
Beam::set_stem_directions ()
{
- Direction d = directional_element (this).get ();
+ Direction d = Directional_element_interface (this).get ();
for (int i=0; i <stem_count (); i++)
{
Stem *s = stem (i);
SCM force = s->remove_elt_property ("dir-forced");
if (!gh_boolean_p (force) || !gh_scm2bool (force))
- directional_element (s).set (d);
+ Directional_element_interface (s).set (d);
}
}
bool knee_b = false;
int knee_y = 0;
SCM gap = get_elt_property (gap_str);
- Direction d = directional_element (this).get ();
+ Direction d = Directional_element_interface (this).get ();
if (gh_number_p (gap))
{
{
for (int i=0; i < stem_count (); i++)
{
+ Item *s = stem(i);
int y = (int)(stem (i)->head_positions()[d])
- + (int)calc_interstaff_dist (stem (i), this);
- directional_element (stem (i)).set (y < knee_y ? UP : DOWN);
- stem (i)->set_elt_property ("dir-forced", SCM_BOOL_T);
+ + (int)calc_interstaff_dist (s, this);
+
+
+ Directional_element_interface (s).set (y < knee_y ? UP : DOWN);
+ s->set_elt_property ("dir-forced", SCM_BOOL_T);
}
}
return knee_b;
/*
until here, we used only stem_info, which acts as if dir=up
*/
- y *= directional_element (this).get ();
- dy *= directional_element (this).get ();
+ y *= Directional_element_interface (this).get ();
+ dy *= Directional_element_interface (this).get ();
Staff_symbol_referencer_interface st (this);
Real half_space = st.staff_space () / 2;
*/
int quant_dir = 0;
if (abs (y_shift) > half_space / 2)
- quant_dir = sign (y_shift) * directional_element (this).get ();
+ quant_dir = sign (y_shift) * Directional_element_interface (this).get ();
y = quantise_y_f (y, dy, quant_dir);
}
}
Real stem_y = (dy && dx ? (s->relative_coordinate (0, X_AXIS) - x0) / dx * dy : 0) + y;
/* knee */
- Direction dir = directional_element(this).get ();
- Direction sdir = directional_element (s).get ();
+ Direction dir = Directional_element_interface(this).get ();
+ Direction sdir = Directional_element_interface (s).get ();
/* knee */
if (dir!= sdir)
// huh, why not for first visible?
if (//(s != first_visible_stem ()) &&
me.staff_symbol_l () != last.staff_symbol_l ())
- stem_y += directional_element (this).get ()
+ stem_y += Directional_element_interface (this).get ()
* (beam_multiplicity - stem_multiplicity) * interbeam_f;
}
return stem_y;
{
Real shorten = 0;
Real lengthen = 0;
- Direction dir = directional_element (this).get ();
+ Direction dir = Directional_element_interface (this).get ();
for (int i=0; i < stem_count (); i++)
{
if (a.size () <= 1)
return y;
- Real up_y = directional_element (this).get () * y;
+ Real up_y = Directional_element_interface (this).get () * y;
Interval iv = quantise_iv (a, up_y/staff_space) * staff_space;
Real q = up_y - iv[SMALLER] <= iv[BIGGER] - up_y
if (quant_dir)
q = iv[(Direction)quant_dir];
- return q * directional_element (this).get ();
+ return q * Directional_element_interface (this).get ();
}
void
nw_f = paper_l ()->get_var ("quartwidth");
- Direction dir = directional_element (this).get ();
+ Direction dir = Directional_element_interface (this).get ();
/* half beams extending to the left. */
if (prev)
Stem * sl = head(LEFT) ? head (LEFT)->stem_l () :0;
Stem * sr = head(RIGHT) ? head (RIGHT)->stem_l () :0;
- if (sl && directional_element (sl).get () == UP
- && sr && directional_element (sr).get () == UP)
+ if (sl && Directional_element_interface (sl).get () == UP
+ && sr && Directional_element_interface (sr).get () == UP)
return DOWN;
else
return UP;
}
+/*
+ fixme must use spanned drul from heads elt property
+ */
+
void
Tie::do_add_processing()
{
return SCM_UNDEFINED;
}
- if (!directional_element (this).get ())
- directional_element (this).set (get_default_dir ());
+ if (!Directional_element_interface (this).get ())
+ Directional_element_interface (this).set (get_default_dir ());
Real staff_space = staff_symbol_referencer (this).staff_space ();
Real half_space = staff_space / 2;
int ypos_i = int (ypos);
Real dx_f = extent (X_AXIS).length () + dx_f_drul_[RIGHT] - dx_f_drul_[LEFT];
- Direction dir = directional_element (this).get();
+ Direction dir = Directional_element_interface (this).get();
if (dx_f < paper_l ()->get_var ("tie_staffspace_length"))
{
if (abs (ypos_i) % 2)
if (gh_number_p (d))
a = lookup_l ()->dashed_slur (one, thick, gh_scm2int (d));
else
- a = lookup_l ()->slur (one, directional_element (this).get () * thick, thick);
+ a = lookup_l ()->slur (one, Directional_element_interface (this).get () * thick, thick);
return a.create_scheme();
}
Bezier
Tie::get_curve () const
{
- Direction d (directional_element (this).get ());
+ Direction d (Directional_element_interface (this).get ());
Bezier_bow b (get_encompass_offset_arr (), d);
Real staff_space = staff_symbol_referencer (this).staff_space ();
Real staff_space = paper_l ()->get_var ("interline");
- Direction dir = directional_element (this).get ();
+ Direction dir = Directional_element_interface (this).get ();
Real dy = gh_scm2double (get_elt_property ("delta-y"));
SCM number = get_elt_property ("text");
if (gh_string_p (number) && number_visibility)
void
Tuplet_spanner::do_add_processing ()
{
+#if 0
if (gh_pair_p (get_elt_pointer ("columns")))
{
Link_array<Note_column> column_arr=
set_bound (LEFT, column_arr[0]);
set_bound (RIGHT, column_arr.top ());
}
+#endif
}
Score_element * common = common_refpoint (get_elt_pointer ("columns"), Y_AXIS);
- Direction d = directional_element (this).get ();
+ Direction d = Directional_element_interface (this).get ();
/*
Use outer non-rest columns to determine slope
Pointer_group_interface__extract_elements (this, (Note_column*)0, "columns");
- Direction d = directional_element (this).get ();
+ Direction d = Directional_element_interface (this).get ();
*dy = column_arr.top ()->extent (Y_AXIS) [d]
- column_arr[0]->extent (Y_AXIS) [d];
}
return SCM_UNDEFINED;
}
- Direction d = directional_element (this).get ();
+ Direction d = Directional_element_interface (this).get ();
if (!d)
{
d = get_default_dir ();
- directional_element (this).set (d);
+ Directional_element_interface (this).set (d);
}
Real dy, offset;
gi.add_element (n);
add_dependency (n);
+
+ add_bound_item (this, n);
}