[Top][All Lists]

[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: ,


this is a follow-up to issues 3254
( and 3962
(  It's not
finished yet, but you should get an idea of where i'm heading with
self-alignment-interface.  Comments welcome!


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
 - 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

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

Affected files (+55, -129 lines):
  M lily/
  M lily/
  M lily/include/self-alignment-interface.hh
  M lily/
  M lily/
  M ly/
  M scm/define-grobs.scm

reply via email to

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