lilypond-devel
[Top][All Lists]
Advanced

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

Re: [patch] X-aligned instrument names


From: Han-Wen Nienhuys
Subject: Re: [patch] X-aligned instrument names
Date: Sun, 10 Feb 2008 23:41:27 -0200

Sounds like a good idea.  You could do the same with the other lines,
if you would assume that there was a 'virtual' indent (don't change
the line dimensions, but assume there is a global given space to align
names with)


2008/2/10, Nicolas Sceaux <address@hidden>:
> The following patch add x-alignment support for instrument names:
> being given the amount of indentation, and the value of the
> self-alignment-X grob property, some padding is added to the right
> of the instrument name.
>
> \override Staff.InstrumentName #'self-alignment-X = #LEFT
> ==> instrument name aligned on the left margin
>
> \override Staff.InstrumentName #'self-alignment-X = #CENTER
> ==> instrument name centered in the indentation
>
> \override Staff.InstrumentName #'self-alignment-X = #RIGHT
> ==> instrument name right-aligned, on the system start.
>
> If the instrument name is bigger than the indentation, it will
> be placed as if right aligned.
>
> May I apply?




+         Real right_padding = padding * (1.0 - ((align_x + 1.0) / 2.0));

this looks as if you're looking for the linear_combination function


+         Stencil right_stencil (right_box, ly_string2scm (""));
+         right_stencil.translate_axis (p_extent[RIGHT], X_AXIS);

why don't you create a stencil with a modified dimesions and the same
expression? Adding a bogus ("") seems unnecessary.

-- 
Han-Wen Nienhuys - address@hidden - http://www.xs4all.nl/~hanwen




reply via email to

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