lilypond-devel
[Top][All Lists]
Advanced

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

Re: Calculations for spanner before its print function is called


From: Mike Solomon
Subject: Re: Calculations for spanner before its print function is called
Date: Wed, 02 Jun 2010 14:45:43 +0200
User-agent: Microsoft-Entourage/11.4.0.080122

I tried setting a flag like that, but the problem is that the stencils are
drawn in parallel and not in series, so by the time I've set this flag the
other stencils are done doing their thing :-(

~Mike


On 6/2/10 1:32 PM, "Carl Sorensen" <address@hidden> wrote:

> On 6/2/10 5:28 AM, "Mike Solomon" <address@hidden> wrote:
> 
>> Hey lilypond developers,
>>     I am toying around with a new spanner, and before it prints, I need to
>> do some calculations on all of its broken_intos_.  I can easily do these
>> calculations in the print function by accessing the broken_into_ of
>> spanner->original (), but then this calculation is done for each time print
>> is called, which is N-1 times too many (where N is the length of
>> broken_into_).  The code works just fine, but it is overkill: is there a way
>> to perform operations on a spanner and its broken_into_'s once before the
>> print function is called?
> 
> You could decrease the calculation time by setting a flag in the original
> spanner (e.g. calculation_done_) and skip the calculation if it had been
> done.
> 
> Somebody else will probably have a better idea.
> 
> Thanks,
> 
> Carl
> 
> 





reply via email to

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