Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(759)

Unified Diff: lily/grob.cc

Issue 6498077: Approximates cross-staff slurs in VerticalAxisGroup vertical-skylines. Base URL: http://git.savannah.gnu.org/gitweb/?p=lilypond.git/trunk/
Patch Set: Better approximations Created 12 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lily/grob.cc
diff --git a/lily/grob.cc b/lily/grob.cc
index c515c186169e16402ea38a5476e93f7e1ae5e7a5..79c3f9d795a65a201f89bb6ee5f5aa5c8d53651d 100644
--- a/lily/grob.cc
+++ b/lily/grob.cc
@@ -374,7 +374,7 @@ Grob::pure_relative_y_coordinate (Grob const *refp, int start, int end)
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);
-
+//printf ("%s O T %4.4f %4.4f\n", name().c_str(), off, trans);
return off + trans + p->pure_relative_y_coordinate (refp, start, end);
}
return off;
@@ -924,6 +924,25 @@ common_refpoint_of_array (set<Grob *> const &arr, Grob *common, Axis a)
}
Interval
+maybe_pure_robust_relative_extent (Grob *me, Grob *refp, Axis a, bool pure, int start, int end)
+{
+ if (pure && a != Y_AXIS)
+ programming_error ("tried to get pure X-offset");
+ return (pure && a == Y_AXIS) ? pure_robust_relative_extent (me, refp, start, end)
+ : robust_relative_extent (me, refp, a);
+}
+
+Interval
+pure_robust_relative_extent (Grob *me, Grob *refpoint, int start, int end)
+{
+ Interval ext = me->pure_height (refpoint, start, end);
+ if (ext.is_empty ())
+ ext.add_point (me->pure_relative_y_coordinate (refpoint, start, end));
+
+ return ext;
+}
+
+Interval
robust_relative_extent (Grob *me, Grob *refpoint, Axis a)
{
Interval ext = me->extent (refpoint, a);

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b