-
- /* ugh. Should be done by beam. */
- Real x = stem_l_->hpos_f ();
- Direction d = stem_l_->get_dir ();
- Real beamy = x * b->slope_f_ + b->left_y_;
- Interval restdim = extent (Y_AXIS);
-
- Real staff_space = rest_l_arr_[0]->staff_line_leading_f ();
- Real internote_f = staff_space/2;
+
+ /* ugh. Should be done by beam.
+ (what? should be done --jcn)
+ scary too?: height is calculated during post_processing
+ */
+ Real beam_dy = 0;
+ Real beam_y = 0;
+
+ SCM s = b->get_elt_property ("height");
+ if (gh_number_p (s))
+ beam_dy = gh_scm2double (s);
+
+ s = b->get_elt_property ("y-position");
+ if (gh_number_p (s))
+ beam_y = gh_scm2double (s);
+
+
+ Real x0 = b->first_visible_stem ()->relative_coordinate (0, X_AXIS);
+ Real dx = b->last_visible_stem ()->relative_coordinate (0, X_AXIS) - x0;
+ Real dydx = beam_dy && dx ? beam_dy/dx : 0;
+
+ Direction d = stem_l ()->get_direction ();
+ Real beamy = (stem_l ()->relative_coordinate (0, X_AXIS) - x0) * dydx + beam_y;
+
+ s = get_elt_property ("rests");
+ Score_element * se = unsmob_element (gh_car (s));
+ Staff_symbol_referencer_interface si (se);
+
+ Real staff_space = si.staff_space ();
+ Real rest_dim = extent (Y_AXIS)[d]*2.0 /staff_space ;
+