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

Unified Diff: lily/staff-symbol-referencer.cc

Issue 5992073: Correctly positions dots on rests that share a column with a beamed grob.
Patch Set: Makes Dots::calc_y_offset a true callback Created 11 years, 11 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/staff-symbol-referencer.cc
diff --git a/lily/staff-symbol-referencer.cc b/lily/staff-symbol-referencer.cc
index b18bb04fa3b8f7f2dd6b8d60206e09ac2fb08863..134547985869c614a58410268935097b7641c1e9 100644
--- a/lily/staff-symbol-referencer.cc
+++ b/lily/staff-symbol-referencer.cc
@@ -166,27 +166,19 @@ will be extracted from staff-position */
void
Staff_symbol_referencer::set_position (Grob *me, Real p)
{
- internal_set_position (me, p, false);
+ me->translate_axis (get_translated_position (me, p), Y_AXIS);
}
-void
-Staff_symbol_referencer::pure_set_position (Grob *me, Real p)
-{
- internal_set_position (me, p, true);
-}
-
-void
-Staff_symbol_referencer::internal_set_position (Grob *me, Real p, bool pure)
+Real
+Staff_symbol_referencer::get_translated_position (Grob *me, Real p)
{
Grob *st = get_staff_symbol (me);
Real oldpos = 0.0;
if (st && me->common_refpoint (st, Y_AXIS))
- {
- oldpos = pure ? pure_get_position (me) : get_position (me);
- }
+ oldpos = get_position (me);
Real ss = Staff_symbol_referencer::staff_space (me);
- me->translate_axis ((p - oldpos) * ss * 0.5, Y_AXIS);
+ return (p - oldpos) * ss * 0.5;
}
/* Half of the height, in staff space, i.e. 2.0 for a normal staff. */
« lily/dot-column.cc ('K') | « lily/rest.cc ('k') | scm/define-grob-properties.scm » ('j') | no next file with comments »

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