lilypond-user
[Top][All Lists]

## Re: Extending the width of a glissando

 From: Jean Abou Samra Subject: Re: Extending the width of a glissando Date: Mon, 20 Sep 2021 23:08:21 +0200 User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

```

Le 20/09/2021 à 22:02, Lukas-Fabian Moser a écrit :
```
```
```
```
```
Question to the experts: Am I right in thinking that the documentation is misleading here?
```
That is also my understanding. The rotation property works on a stencil
using its own extents, performing the equivalent of ly:stencil-rotate,
not ly:stencil-rotate-absolute. After that, LilyPond places the stencil
using the newly created extents. The placement on the staff can depend
or not on these extents, e.g. that of a Clef won't but that of a Hairpin
will.

The term “reference point” is a bit ambiguous. LilyPond places every
object relative to its parents, displacing it by X-offset and Y-offset.
If you are writing an [XY]-offset callback, you might think of the
reference point as being the point where the object would be placed
if its X-offset and Y-offset were 0. On top of that, the object is
drawn using a stencil, which carries its own extents. If you are writing
a stencil callback, you can think of the reference point as being
the point where a point stencil (having extents '(0 . 0) and '(0 . 0))
would be placed, i.e. taking X-offset and Y-offset into account
this time. It is the latter notion that applies here.
```
```
```
Yes, exactly. But the one thing the term "reference point" should never mean is "just the object's center".
```
```
So if the rotation is done with respect to the object's center (and in scaled coordinates such that the object's extents are from -1 to 1) - and this is what happens, as can be seen in the attached file where blue crosses mark the centers of objects, red crosses their respective '(0 . 0) point -, then to describe this as
```
```
and the x and y coordinates of the point relative to the object’s reference point about which the rotation is to be performed (http://lilypond.org/doc/v2.23/Documentation/notation/rotating-objects.html#rotating-layout-objects)
```is simply wrong in my opinion.

If you agree, I'll try and prepare a MR to change the documentation.
```
```

```
Maybe one might consider if it would be nice to have both behaviours: .rotation with respect to the object's center (current behaviour), but also with respect to the the stencil's '(0 . 0). Of course, one can achieve the latter with a bit of scheme code, but maybe a grob property of the form
```
```
\override Hairpin.rotation-system = #'absolute % offset (0,0) is the stencil's reference point, offset units are in staff spaces \override Hairpin.rotation-system = #'relative % offset (0,0) is the object's center, offset units are such that the object's edges are at +- 1.
```
might be useful?
```
```
I dunno. In the end, rotation around any point is equivalent to
rotation around the center and then some translation. Perhaps
it would be more intuitive to tweak the translation directly?
One could make the rotation property accept bare numbers instead
of 3-element lists, making the rotation center default to '(0 . 0),
and then it's a matter of setting X-offset and Y-offset, possibly
using \offset to make it relative to the reference point in the
sense of the stencil's origin if X/Y-offset were untweaked.
Thoughts? One would have to look at the most typical use cases
to decide on an interface.

Cheers,
Jean

```