lilypond-devel
[Top][All Lists]
Advanced

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

[PATCH] Ragged-right alignment


From: Han-Wen Nienhuys
Subject: [PATCH] Ragged-right alignment
Date: Sun, 31 Mar 2002 23:48:04 +0200

address@hidden writes:
> Happy Easter!
> 
> And here is another small but important step towards mensural notation.
> (If you want to see an example, put "raggedright = ##t" into the paper
> block, e.g. of wtk1-fugue.ly, and see, what happens!)

Patch looks fine (i'll put it in); 2 nitpicks.

> @@ -554,7 +555,10 @@
>        max_fixed_note_space = increment;
>      }
>  
> -  Spaceable_grob::add_spring (lc, rc, max_note_space,  1 / (max_note_space 
> -max_fixed_note_space), expand_only);
> +  bool ragged = to_boolean (me->paper_l ()->get_scmvar ("raggedright"));
> +  Real strength = (ragged) ? 1.0 : 1 / (max_note_space - 
> max_fixed_note_space);
> +  Real distance = (ragged) ? max_fixed_note_space : max_note_space;

why is the ideal distance dependent on being raggedright or not? I'd like to
use raggedright in stead of  linewidth = -1 in some examples, but
that's only useful if the spacing remains the same. 

> +  if (ragged)
> +    {
> +      // *prevent* staff symbol from being ragged right
> +      width =
> +     me->paper_l ()->get_var ("linewidth")
> +     - sp->get_bound (LEFT)->relative_coordinate (common, X_AXIS)
> +     ;
> +    }

I'd like a separate setting for this one. By default, just be as wide
as the bounds. With a special flag, be as wide as some specified
dimension (eg. you could add a 'width property.)


-- 

Han-Wen Nienhuys   |   address@hidden    | http://www.cs.uu.nl/~hanwen/




reply via email to

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