lilypond-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: how offsets and alignment works: an explanation


From: Thomas Morley
Subject: Re: how offsets and alignment works: an explanation
Date: Sun, 24 Mar 2013 03:02:24 +0100

2013/3/23 Janek Warchoł <address@hidden>:
> 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]