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

Delta Between Two Patch Sets: lily/new-fingering-engraver.cc

Issue 7768043: rewrite Self_alignment_interface
Left Patch Set: change explanation comment Created 12 years ago
Right Patch Set: align MMR and perc.rep. stuff using xparents Created 12 years ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « lily/new-dynamic-engraver.cc ('k') | lily/paper-column.cc » ('j') | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 /* 1 /*
2 This file is part of LilyPond, the GNU music typesetter. 2 This file is part of LilyPond, the GNU music typesetter.
3 3
4 Copyright (C) 1998--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> 4 Copyright (C) 1998--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
5 5
6 LilyPond is free software: you can redistribute it and/or modify 6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by 7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or 8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version. 9 (at your option) any later version.
10 10
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 f->set_parent (ft.head_, Y_AXIS); 281 f->set_parent (ft.head_, Y_AXIS);
282 f->set_property ("avoid-slur", ly_symbol2scm ("inside")); 282 f->set_property ("avoid-slur", ly_symbol2scm ("inside"));
283 if (hordir == LEFT 283 if (hordir == LEFT
284 && unsmob_grob (ft.head_->get_object ("accidental-grob"))) 284 && unsmob_grob (ft.head_->get_object ("accidental-grob")))
285 Side_position_interface::add_support (f, 285 Side_position_interface::add_support (f,
286 unsmob_grob (ft.head_->get_object ("accidental-grob"))); 286 unsmob_grob (ft.head_->get_object ("accidental-grob")));
287 else if (unsmob_grob (ft.head_->get_object ("dot"))) 287 else if (unsmob_grob (ft.head_->get_object ("dot")))
288 Side_position_interface::add_support (f, 288 Side_position_interface::add_support (f,
289 unsmob_grob (ft.head_->get_object ("dot"))); 289 unsmob_grob (ft.head_->get_object ("dot")));
290 290
291 Self_alignment_interface::set_align_self (f, Y_AXIS); 291 // don't overwrite offset property if it was overridden by the user
292 Self_alignment_interface::set_center_parent (f, Y_AXIS); 292 if (f->get_property (ly_symbol2scm ("Y-offset")) == SCM_EOL)
293 f->set_property (ly_symbol2scm ("Y-offset"),
294 Self_alignment_interface::y_align_grob (f->self_scm ()) );
295
293 Side_position_interface::set_axis (f, X_AXIS); 296 Side_position_interface::set_axis (f, X_AXIS);
294 297
295 f->set_property ("direction", scm_from_int (hordir)); 298 f->set_property ("direction", scm_from_int (hordir));
296 } 299 }
297 300
298 Drul_array< vector<Finger_tuple> > vertical (down, up); 301 Drul_array< vector<Finger_tuple> > vertical (down, up);
299 for (DOWN_and_UP (d)) 302 for (DOWN_and_UP (d))
300 { 303 {
301 for (vsize i = 0; i < vertical[d].size (); i++) 304 for (vsize i = 0; i < vertical[d].size (); i++)
302 { 305 {
303 Finger_tuple ft = vertical[d][i]; 306 Finger_tuple ft = vertical[d][i];
304 Grob *f = ft.script_; 307 Grob *f = ft.script_;
305 int finger_prio = robust_scm2int (f->get_property ("script-priority"), 200); 308 int finger_prio = robust_scm2int (f->get_property ("script-priority"), 200);
306 f->set_parent (ft.head_, X_AXIS); 309 f->set_parent (ft.head_, X_AXIS);
307 f->set_property ("script-priority", 310 f->set_property ("script-priority",
308 scm_from_int (finger_prio + d * ft.position_)); 311 scm_from_int (finger_prio + d * ft.position_));
309 312
310 Self_alignment_interface::set_align_self (f, X_AXIS); 313 // don't overwrite offset property if it was overridden by the user
311 Self_alignment_interface::set_center_parent (f, X_AXIS); 314 if (f->get_property (ly_symbol2scm ("X-offset")) == SCM_EOL)
315 f->set_property (ly_symbol2scm ("X-offset"),
316 Self_alignment_interface::x_align_grob (f->self_scm ()));
317
312 Side_position_interface::set_axis (f, Y_AXIS); 318 Side_position_interface::set_axis (f, Y_AXIS);
313 319
314 f->set_property ("direction", scm_from_int (d)); 320 f->set_property ("direction", scm_from_int (d));
315 } 321 }
316 } 322 }
317 } 323 }
318 324
319 void 325 void
320 New_fingering_engraver::stop_translation_timestep () 326 New_fingering_engraver::stop_translation_timestep ()
321 { 327 {
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
391 397
392 /* read */ 398 /* read */
393 "fingeringOrientations " 399 "fingeringOrientations "
394 "harmonicDots " 400 "harmonicDots "
395 "strokeFingerOrientations " 401 "strokeFingerOrientations "
396 "stringNumberOrientations ", 402 "stringNumberOrientations ",
397 403
398 /* write */ 404 /* write */
399 "" 405 ""
400 ); 406 );
LEFTRIGHT

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