[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Cleanup in self_alignment_interface (issue 105410046 by address@hidden)
From: |
janek . lilypond |
Subject: |
Cleanup in self_alignment_interface (issue 105410046 by address@hidden) |
Date: |
Thu, 26 Jun 2014 18:37:11 +0000 |
Reviewers: ,
Message:
Hello,
this is a follow-up to issues 3254
(https://code.google.com/p/lilypond/issues/detail?id=3254) and 3962
(https://code.google.com/p/lilypond/issues/detail?id=3962). It's not
finished yet, but you should get an idea of where i'm heading with
self-alignment-interface. Comments welcome!
thanks,
Janek
Description:
Consists of several commits:
Clean up DynamicText horizontal alignment.
Until now, DynamicText alignment was messy, as there were 3 different
callbacks involved - some of them interacting in a confusing way:
- in define-grobs.scm, X-offset property was initialized to
ly:self-alignment-interface::x-aligned-on-self,
- Dynamic_engraver called set_center_parent on every created
DynamicText, so that half a NoteHead width was always added
to its X-offset (producing confusing results for example when
user requested dynamics to be left-aligned),
- DynamicTexts living in a Dynamics context used a completely
different offset callback, which aligned them on NoteColumns.
Since aligned_on_parent is now able to correctly align grobs
with PaperColumn parents (issue 3254), we can use it for all
DynamicTexts and have a single interface for the job.
Expected changes in output: DynamicTexts in Dynamics context
aligned to suspended noteheads may be placed up to 1/4 NoteHead
width further to the right. This shouldn't be a problem.
Don't hardcode centering on parent; replace closures with calls to
aligned-on-x-parent
Align textscripts on parent
I think this makes more sense than just "self-alignment".
It makes them consistent with Lyrics and Dynamics.
some cleanup of aligned_on_parent
Please review this at https://codereview.appspot.com/105410046/
Affected files (+55, -129 lines):
M lily/dynamic-engraver.cc
M lily/fingering-engraver.cc
M lily/include/self-alignment-interface.hh
M lily/new-fingering-engraver.cc
M lily/self-alignment-interface.cc
M ly/engraver-init.ly
M scm/define-grobs.scm
- Cleanup in self_alignment_interface (issue 105410046 by address@hidden),
janek . lilypond <=