2018-02-04 20:30 GMT+01:00 Stefano Troncaro <[email protected]>:
> Thank you! This is a workable starting point. However, it raised a few
> questions.
>
> 1) I noticed that rotating the grob doesn't work well with automatic
> collision detection, since the grob skylines are still where they would be
> for the unrotated grob. See this example code and the attached images:
>>
>> \version "2.19.80"
>> \language "english"
>>
>> tweaks = {
>> \once \override Hairpin.rotation = #'(9 0 0)
>> %\once \override Hairpin.extra-offset = #'(0 . -1)
>> }
>>
>> \score {
>> \new Staff \relative c' { \time 2/2 \tweaks d8[^\<(^"some really long
>> text here!" e f g a b c d]\!) |
>> <e c g g,>4\arpeggio }
>> \layout {
>> \context {
>> \Score
>> \override Hairpin.height = #0.5
>> }
>> }
>> }
>
> This makes me hesitate for the same reason that using extra-offset does: I'd
> want to tweak the shape of the Hairpins and have Lilypond automatically work
> out the correct spacing between different grobs and staves. So, how can I
> make it so that the skylines are also updated when I rotate the grob? Or, if
> internally the grob is first placed and then rotated, how can I make it so
> that the rotation occurs before Lilypond calculates the positioning and
> spacing of grobs?
Don't use extra-offset to place things, unless you _want_ them overlap
or as very, very last resort.
Use 'shorten-pair to affect length of the Hairpin, working with
Hairpins for newer devel-versions, Thanks David Nalesnik, iirc.
'rotation comes too late, use a stencil-override with ly:stencil-rotate instead.
See below.
\version "2.19.80"
tweaks = {
\once \override Hairpin.shorten-pair = #'(-2 . -2)
\once \override Hairpin.stencil =
#(lambda (grob)
(ly:stencil-rotate (ly:hairpin::print grob) 9 0 0))
}
\score {
\new Staff
\relative c' {
\time 2/2
\tweaks
d8[^\<(^"some really long text here!" e f g a b c d]\!) |
<e c g g,>4\arpeggio
}
\layout {
\context {
\Score
\override Hairpin.height = #0.5
}
}
}
Cheers,
Harm
_______________________________________________
lilypond-user mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-user