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

Delta Between Two Patch Sets: lily/note-spacing.cc

Issue 5626052: Gets vertical skylines from grob stencils (Closed)
Left Patch Set: Adds support for KeySignature Created 13 years, 1 month ago
Right Patch Set: Run astyle on c++ files Created 12 years, 6 months 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/misc.cc ('k') | lily/open-type-font.cc » ('j') | lily/skyline.cc » ('J')
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) 2001--2012 Han-Wen Nienhuys <hanwen@xs4all.nl> 4 Copyright (C) 2001--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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 /* 72 /*
73 The main factor that determines the amount of space is the width of the 73 The main factor that determines the amount of space is the width of the
74 note head (or the rest). For example, a quarter rest gets almost 0.5 ss 74 note head (or the rest). For example, a quarter rest gets almost 0.5 ss
75 less horizontal space than a note. 75 less horizontal space than a note.
76 76
77 The other parts of a note column (eg. flags, accidentals, etc.) don't get 77 The other parts of a note column (eg. flags, accidentals, etc.) don't get
78 the full amount of space. We give them half the amount of space, but then 78 the full amount of space. We give them half the amount of space, but then
79 adjust things so there are no collisions. 79 adjust things so there are no collisions.
80 */ 80 */
81 Drul_array<Skyline> skys = Spacing_interface::skylines (me, right_col); 81 Drul_array<Skyline> skys = Spacing_interface::skylines (me, right_col);
82 Real distance = skys[LEFT].distance (skys[RIGHT]); 82 Real distance = skys[LEFT].distance (skys[RIGHT], robust_scm2double (right_col ->get_property ("skyline-vertical-padding"), 0.0));
83 Real min_dist = max (0.0, distance); 83 Real min_dist = max (0.0, distance);
84 Real min_desired_space = left_head_end + (min_dist - left_head_end + base_spac e - increment) / 2; 84 Real min_desired_space = left_head_end + (min_dist - left_head_end + base_spac e - increment) / 2;
85 Real ideal = base_space - increment + left_head_end; 85 Real ideal = base_space - increment + left_head_end;
86 86
87 /* If we have a NonMusical column on the right, we measure the ideal distance 87 /* If we have a NonMusical column on the right, we measure the ideal distance
88 to the bar-line (if present), not the start of the column. */ 88 to the bar-line (if present), not the start of the column. */
89 if (!Paper_column::is_musical (right_col) 89 if (!Paper_column::is_musical (right_col)
90 && !skys[RIGHT].is_empty () 90 && !skys[RIGHT].is_empty ()
91 && to_boolean (me->get_property ("space-to-barline"))) 91 && to_boolean (me->get_property ("space-to-barline")))
92 { 92 {
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 323
324 /* properties */ 324 /* properties */
325 "knee-spacing-correction " 325 "knee-spacing-correction "
326 "left-items " 326 "left-items "
327 "right-items " 327 "right-items "
328 "same-direction-correction " 328 "same-direction-correction "
329 "stem-spacing-correction " 329 "stem-spacing-correction "
330 "space-to-barline " 330 "space-to-barline "
331 ); 331 );
332 332
LEFTRIGHT

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