[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: First stab at getting script offsets right. (issue 5235052)
From: |
address@hidden |
Subject: |
Re: First stab at getting script offsets right. (issue 5235052) |
Date: |
Wed, 19 Oct 2011 10:05:29 +0200 |
On Oct 18, 2011, at 3:56 PM, address@hidden wrote:
>
> http://codereview.appspot.com/5235052/diff/17001/lily/script-engraver.cc
> File lily/script-engraver.cc (right):
>
> http://codereview.appspot.com/5235052/diff/17001/lily/script-engraver.cc#newcode206
> lily/script-engraver.cc:206:
> Script_engraver::acknowledge_inline_accidental (Grob_info info)
> Doesn't this add every accidental to a script in a chord?
Yes - I could try adding only the extremal accidentals, but I'm not sure if
this would speed things up.
>
> I'm concerned there's a risk the side-positioning calculation might be
> incorrect, since the accidentals are shuffled around via
> AccidentalPlacement later.
>
The shuffling happens in the Y-offset callback (Accidental's Y-offset is
ly:grob::x-parent-positioning, added in Accidental_placement::add_accidental)
which is calculated when the extent is calculated and reported back to the
boxes (and thus skylines) in Side_position_interface. I don't think
AccidentalPlacement does any subsequent shuffling (although I could be wrong).
> http://codereview.appspot.com/5235052/diff/17001/lily/side-position-interface.cc
> File lily/side-position-interface.cc (right):
>
> http://codereview.appspot.com/5235052/diff/17001/lily/side-position-interface.cc#newcode218
> lily/side-position-interface.cc:218: b[ax] = e->maybe_pure_extent
> (common[ax], ax, pure, start, end);
> Accidentals have special treatment for more accurate boxes. Could you
> use them instead (or get the skyline from AccidentalPlacement instead)?
>
Good call! I don't think the skylines are reusable, as the skylines in
accidental-placement.cc are horizontal skylines calculated to aid in
accidentals' placement during the loop in position_apes, not vertical skylines
that represent where they actually fall. However,
Accidental_interface::accurate_boxes is a neat function that's in the new
patchset.
> http://codereview.appspot.com/5235052/
- First stab at getting script offsets right. (issue 5235052), mtsolo, 2011/10/09
- Re: First stab at getting script offsets right. (issue 5235052), mtsolo, 2011/10/10
- Re: First stab at getting script offsets right. (issue 5235052), dak, 2011/10/10
- Re: First stab at getting script offsets right. (issue 5235052), dak, 2011/10/10
- Re: First stab at getting script offsets right. (issue 5235052), n . puttock, 2011/10/18
- Re: First stab at getting script offsets right. (issue 5235052),
address@hidden <=
- Re: First stab at getting script offsets right. (issue 5235052), bordage . bertrand, 2011/10/20