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

Issue 7564044: don't abort aligning when grob's parent is a PaperColumn

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 1 month ago by janek
Modified:
11 years, 1 month ago
CC:
lilypond-devel_gnu.org
Visibility:
Public.

Description

If a grob's parent is a PaperColumn, align using NoteColumns extent. This makes unassociated lyrics behave consistently with associated lyrics. Until now, unassociated lyrics (i.e. lyrics without an associatedVoice) were all left-aligned (more precisely: their X-offset was 0). Changing self-alignment-X didn't have any effect on them. This was because X-parent of an unassociated LyricText is a PaperColumn, and aligned_on_parent didn't know how to handle that. This patch tells aligned_on_parent to use the extent of respective NoteColumns as the parent extent needed for grob alignment. Additionally to fixing unassociated lyrics behaviour, this should allow correctly aligning_on_parent other grobs, such as DynamicTexts. Expected changes in regtests: all lyrics should now be centered by default. This affects 11 regtests.

Patch Set 1 #

Patch Set 2 : calculate extent of notecolumn and use it for aligning #

Patch Set 3 : add regtest #

Total comments: 2

Patch Set 4 : make the method for calculating extents more generic and move it to PaperColumn #

Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -3 lines) Patch
A input/regression/unassociated-lyrics-alignment.ly View 1 2 1 chunk +24 lines, -0 lines 0 comments Download
M lily/include/paper-column.hh View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M lily/paper-column.cc View 1 2 3 1 chunk +19 lines, -0 lines 0 comments Download
M lily/self-alignment-interface.cc View 1 2 3 1 chunk +13 lines, -3 lines 0 comments Download

Messages

Total messages: 9
janek
Please review. You'll find a sample test file in tracker issue: http://code.google.com/p/lilypond/issues/detail?id=3254
11 years, 1 month ago (2013-03-17 23:58:50 UTC) #1
Trevor Daniels
I can't easily test this, but on the basis of the reg tests - LGTM
11 years, 1 month ago (2013-03-18 10:36:35 UTC) #2
janek
On 2013/03/18 10:36:35, Trevor Daniels wrote: > I can't easily test this, but on the ...
11 years, 1 month ago (2013-03-18 13:05:15 UTC) #3
Trevor Daniels
On 2013/03/18 13:05:15, janek wrote: > On 2013/03/18 10:36:35, Trevor Daniels wrote: > > I ...
11 years, 1 month ago (2013-03-18 16:05:44 UTC) #4
janek
calculate extent of notecolumn and use it for aligning
11 years, 1 month ago (2013-03-18 23:59:20 UTC) #5
janek
add regtest
11 years, 1 month ago (2013-03-19 00:36:11 UTC) #6
MikeSol
https://codereview.appspot.com/7564044/diff/9001/lily/self-alignment-interface.cc File lily/self-alignment-interface.cc (right): https://codereview.appspot.com/7564044/diff/9001/lily/self-alignment-interface.cc#newcode130 lily/self-alignment-interface.cc:130: // TODO: should this function be defined someplace else, ...
11 years, 1 month ago (2013-03-19 15:21:37 UTC) #7
janek
Thanks for reviewing, Mike! I'm uploading new patchset. https://codereview.appspot.com/7564044/diff/9001/lily/self-alignment-interface.cc File lily/self-alignment-interface.cc (right): https://codereview.appspot.com/7564044/diff/9001/lily/self-alignment-interface.cc#newcode130 lily/self-alignment-interface.cc:130: // ...
11 years, 1 month ago (2013-03-19 19:18:53 UTC) #8
janek
11 years, 1 month ago (2013-03-19 19:19:09 UTC) #9
make the method for calculating extents more generic and move it to PaperColumn
Sign in to reply to this message.

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