-Real
-Grob::pure_relative_y_coordinate (Grob const *refp, int start, int end)
-{
- if (refp == this)
- return 0.0;
-
- SCM pure_off = ly_lily_module_constant ("pure-Y-offset");
- Real off = 0;
-
- if (dim_cache_[Y_AXIS].offset_)
- off = *dim_cache_[Y_AXIS].offset_;
- else if (ly_is_procedure (pure_off))
- {
- dim_cache_[Y_AXIS].offset_ = new Real (0.0);
- off = scm_to_double (scm_apply_3 (pure_off, self_scm (),
- scm_from_int (start), scm_from_int (end),
- SCM_EOL));
- delete dim_cache_[Y_AXIS].offset_;
- dim_cache_[Y_AXIS].offset_ = 0;
- }
-
- /* we simulate positioning-done if we are the child of a VerticalAlignment,
- but only if we don't have a cached offset. If we do have a cached offset,
- it probably means that the Alignment was fixed and it has already been
- calculated.
- */
- Grob *p = get_parent (Y_AXIS);
- Real trans = 0;
- if (Align_interface::has_interface (p) && !dim_cache_[Y_AXIS].offset_)
- trans = Align_interface::get_pure_child_y_translation (p, this, start, end);
-
- return off + trans
- + dim_cache_[Y_AXIS].parent_->pure_relative_y_coordinate (refp, start, end);
-}
-