[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: don't abort aligning when grob's parent is a PaperColumn (issue 7564
From: |
mtsolo |
Subject: |
Re: don't abort aligning when grob's parent is a PaperColumn (issue 7564044) |
Date: |
Tue, 19 Mar 2013 15:21:37 +0000 |
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, e.g. in note-column.cc?
I like where you're going with this.
I would recommend creating a function algined_on_grobs that accepts a
grob, an vector of grobs to align to, and an axis. Then
algined_on_parent becomes a subset of this where the vector is of length
one and is the parent.
Then, you can create a function
Self_alignment_interface::lyrics_algined_on_note_columns that invokes
aligned_on_grobs with a vector of note columns returned using the search
method in this function. This function could be implemented in
paper-column.cc as get_generic_interface_extent such that it recurses
through a paper columns' element list, finds all grobs implementing
interface X and returns them.
https://codereview.appspot.com/7564044/