2013/3/23 Janek Warchoł <janek.lilyp...@gmail.com>:
> Hi,
>
> here's an explanation of what's happening when we're using XY-offset,
> self-alignment etc.  I hope that it'll help users get a better
> understanding of LilyPond internals; i also think it would be a good
> material for documentation, but i'm not sure where should it be placed
> - it seems to fit both in Learning as well as Extending, and maybe
> even CG...
>
> Let's start at the very beginning:
> LilyPond needs to know where each and every grob should be placed.
> This placement information is stored using relative coordinates:
> position of a grob is defined relative to the position of its parent

[...]

> What is a reference point?

[...]

> There is a special C++ procedure x_aligned_on_self

[...]

> we have to use a different
> procedure: aligned_on_x_parent.

[...]

Hi Janek,

this is great!!
I've never read a better explanation of x_aligned_on_self and
aligned_on_x_parent.
Even better than
http://www.lilypond.org/doc/v2.17/Documentation/notation/aligning-objects
Well, it's _usage_ is explained quite well in the manuals.
Though, I very often need a deeper understanding _how_ something
works. If it's written in scheme, I study the code. But I've no clue
about C++. I'm able to distinguish C++ code and comments, and that's
(nearly) all. So very often I've to drop the ball.
Rewriting and modifying some C++ code in scheme to use with local
custom-functions/definitions is impossible, if I can't understand the
original.

I'd wish more/all procedures in C++ were explained this way.

Some other remarks:
a)
There are some opinions not to add it to the LM or the NR and I fully
agree with them.
But I strongly object to put it in the CG for one reason: The CG is
_never_ translated!
The Extending Manual seems to be appropiate (or the CG should be
translated as well).
b)
I'd suggest to add a remark (+ example?) about y_aligned_on_self

Thanks,
  Harm

_______________________________________________
lilypond-user mailing list
lilypond-user@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-user

Reply via email to