lilypond-auto
[Top][All Lists]
Advanced

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

[Lilypond-auto] Issue 3239 in lilypond: Patch: reorganize self_alignment


From: lilypond
Subject: [Lilypond-auto] Issue 3239 in lilypond: Patch: reorganize self_alignment_interface - part 1
Date: Tue, 12 Mar 2013 22:02:49 +0000

Status: Started
Owner: address@hidden
Labels: Type-Enhancement Patch-new

New issue 3239 by address@hidden: Patch: reorganize self_alignment_interface - part 1
http://code.google.com/p/lilypond/issues/detail?id=3239

reorganize self_alignment_interface - part 1

Currently self_alignment_interface is quite messy.  We have many
methods for calculating offsets of grobs; some methods are
really similar to each other (-> code duplication), for example
aligned_on_self is a "subset" of aligned_on_parent.  At the same
time all these methods are not powerful enough: for example,
it's not possible to align left edge of a grob to the right edge
of its parent.  Also, take a look at define-grobs.scm: a lot of
grobs have their offsets defined using closures that combine
different callbacks.  That's inelegant and difficult to handle
for users.

My ultimate goal is to replace all methods in
self_alignment_interface (i.e. aligned_on_parent,
centered_on_object and aligned_on_self) with one versatile
method, and reduce the amount of callbacks. The idea is to make
more things configurable via properties. For example, there are
now separate callbacks "aligned_on_xy_parent" and
"xy_aligned_on_self" - to choose whether the size of grob's
parent should be taken into account or not, the user has to
override offset callback. I'd prefer to do this via a property -
it's simpler. Also, if the user wants to align a grob on some
special grob, for example align LyricText on a Stem, currently
he has to write his own callback to do this - that's difficult.
I'd like to make it possible to specify the grob to be aligned
to using a property.

In this commit i merge aligned_on_parent with aligned_on_self
and prepare ground for more powerful alignment options by using
two separate alignment values (my_align and his_align) instead
of one. The next step will be merging centered_on_object, but
i'd like some feedback on this before i move on.

This commit is a work in progress, but it should compile and
don't cause any regressions. ( = James, you can test it)

In addition to comments on this code, i kindly ask for help
with explaining strange behaviour of relative_coordinate
http://lists.gnu.org/archive/html/lilypond-devel/2013-03/msg00131.html
and DynamicText alignment:
http://lists.gnu.org/archive/html/lilypond-devel/2013-03/msg00132.html

http://codereview.appspot.com/7768043

--
You received this message because this project is configured to send all issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings



reply via email to

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