lilypond-user
[Top][All Lists]
Advanced

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

Re: Combining NoteHead and Stem stencils for rotation


From: David Kastrup
Subject: Re: Combining NoteHead and Stem stencils for rotation
Date: Tue, 29 Mar 2011 15:25:39 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux)

address@hidden writes:

> Hey all,
>
> I'd like to rotate a note head and its stem in one fell swoop.
>
> This seems rather nightmarish to do.  I can envision two solutions:
>
> (1) Combine the stem stencil with its notehead stencil and then make
> the notehead transparent.  Then, rotate this uberstencil.
> (2) Do trig on the stem to translate it after having rotated the
> notehead (or vice versa).
>
> Both of these options seem not easy, but option 2 seems more feasible.
> In order to do this, though, I'd have to spend a fair bit of time
> doing the math and work with different unit systems for X and Y (I
> think).
>
> Before I start on this, can anyone think of a quick & easy way to do
> this rotation?

2 seems rather trivial.  Note that rotation about (x,y) is the same as
subtracting (x,y), rotating about (0,0), and then adding (x,y).  So it
should be easy enough, given the rotation of one element, to make
another rotate in a shifted coordinate system.

-- 
David Kastrup




reply via email to

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