I think this is because these are texts that are attached to multimeasure
rests. The multi measure rest is the Y parent of the text. IIRC, the texts
are implemented as spanners, so their X parent would be the left bound of
the text spanner.


On Tue, Apr 2, 2013 at 10:55 PM, Janek Warchoł <janek.lilyp...@gmail.com>wrote:

> Hi,
>
> In scm/define-grobs.scm we can see that the following grobs:
> MultiMeasureRestNumber
> MultiMeasureRestText
> PercentRepeatCounter
> DoublePercentRepeatCounter
> have their X-offsets initialized to a sum of return values from two
> functions: x-aligned-on-self and x-centered-on-y-parent.  Now, the
> x-aligned-on-self is quite clear, but i'm puzzled by
> x-centered-on-y-parent: why would we derive grob's horizontal position
> from its *vertical* parent?? Isn't it the job of horizontal parent to
> be the base for horizontal position?  In other words, if
> MultiMeasureRestNumber's Y-parent (which is a MultiMeasureRest) should
> be the basis for MultiMeasureRestNumber's X-placement, then maybe we
> should simply set MultiMeasureRestNumber's X-parent to be that
> MultiMeasureRest?
>
> I tried git archeology to learn about the motivation of this design,
> but i didn't get anything meaningful - the only thing i know is that
> Han-Wen wrote that code ;) so i'm ccing him.
>
> I did some testing and it seems that my idea is correct (i.e. we
> should just set appropriate X-parent and use that for alignment), but
> i don't know how to set that parent - the obvious way failed... Check
> out attached patch, and the testfile.  Ideas?
>
> cheers,
> Janek
>



-- 
Han-Wen Nienhuys - han...@xs4all.nl - http://www.xs4all.nl/~hanwen
_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to