lilypond-user
[Top][All Lists]
Advanced

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

Re: Modified slur stencil with added markup


From: Torsten Hämmerle
Subject: Re: Modified slur stencil with added markup
Date: Fri, 12 Oct 2018 04:02:47 -0700 (MST)

Urs Liska-3 wrote
> What is 'interval-center'?


Hi Urs,

Harm already revealed where interval-center is being defined.

But why did I use it?
A stencil x-extent is a pair of left and right extent, and in order to know
the total extent, we'll have to add up (car x-extent) and (cdr x-extent) and
divide it by 2 in order to get the centre. This could be done manually or by
using interval-center.

Using the horizontal centre of both markup and slur, the necessary x-shift
can be easily calculated.

In this case, it is important to know that ly:stencil-combine-at-edge uses
the reference point for alignment and the stencil will stick out to the left
if the left extent is negative.
The slur has a positive (!) left extent, and that's why it is shiftet to the
right with regards to the reference point (at the left edge of the
notehead).
In your original attempt, centering the slur destroyed this slight shift and
moved the whole lot to the left.

All the best,
Torsten



--
Sent from: http://lilypond.1069038.n5.nabble.com/User-f3.html



reply via email to

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