Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1487)

Issue 6308093: add general_alignment (issue 2613)

Can't Edit
Can't Publish+Mail
Start Review
Created:
11 years, 10 months ago by janek
Modified:
11 years, 10 months ago
CC:
lilypond-devel_gnu.org
Base URL:
http://git.savannah.gnu.org/gitweb/?p=lilypond.git/trunk/
Visibility:
Public.

Description

This adds a versatile method for specifying alignment of grobs, allowing parent reference point to be specified separately from grob reference point.

Patch Set 1 #

Total comments: 6

Patch Set 2 : drop dim_cache. Allows user-created extents #

Patch Set 3 : add missing interface; don't change LyricText properties yet #

Total comments: 6

Patch Set 4 : fix docstrings, passes make. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+104 lines, -0 lines) Patch
M lily/include/self-alignment-interface.hh View 2 chunks +3 lines, -0 lines 0 comments Download
M lily/self-alignment-interface.cc View 1 2 3 chunks +85 lines, -0 lines 0 comments Download
M scm/define-grob-properties.scm View 1 2 3 2 chunks +16 lines, -0 lines 0 comments Download

Messages

Total messages: 16
janek
A pdf showing what this patch does is attached to tracker issue: http://code.google.com/p/lilypond/issues/detail?id=2613#c2 Please review!
11 years, 10 months ago (2012-06-19 17:59:44 UTC) #1
janek
http://codereview.appspot.com/6308093/diff/1/scm/define-grob-properties.scm File scm/define-grob-properties.scm (right): http://codereview.appspot.com/6308093/diff/1/scm/define-grob-properties.scm#newcode964 scm/define-grob-properties.scm:964: (X-alignment ,list? "eponymous") i will write a better description ...
11 years, 10 months ago (2012-06-19 18:03:08 UTC) #2
hanwenn
This patch seems to be for solving a lyrics related problem. It would be nice ...
11 years, 10 months ago (2012-06-19 23:28:58 UTC) #3
janek
On Wed, Jun 20, 2012 at 1:28 AM, Han-Wen Nienhuys <hanwenn@gmail.com> wrote: > This patch ...
11 years, 10 months ago (2012-06-20 03:20:07 UTC) #4
Keith
On 2012/06/20 03:20:07, janek wrote: > On Wed, Jun 20, 2012 at 1:28 AM, Han-Wen ...
11 years, 10 months ago (2012-06-20 05:02:27 UTC) #5
joeneeman
http://codereview.appspot.com/6308093/diff/1/lily/self-alignment-interface.cc File lily/self-alignment-interface.cc (right): http://codereview.appspot.com/6308093/diff/1/lily/self-alignment-interface.cc#newcode206 lily/self-alignment-interface.cc:206: grob_alignment = scm_to_double (scm_cdr (grob_alignment_property)); Use robust_scm2double http://codereview.appspot.com/6308093/diff/1/lily/self-alignment-interface.cc#newcode221 lily/self-alignment-interface.cc:221: ...
11 years, 10 months ago (2012-06-20 09:45:25 UTC) #6
janek
Hi, After rereading the code i see that you are totally right! I don't know ...
11 years, 10 months ago (2012-06-20 13:05:37 UTC) #7
janek
Hi all, i've found why it was breaking make - an interface for properties was ...
11 years, 10 months ago (2012-06-21 07:12:13 UTC) #8
MikeSol
http://codereview.appspot.com/6308093/diff/10001/scm/define-grob-properties.scm File scm/define-grob-properties.scm (right): http://codereview.appspot.com/6308093/diff/10001/scm/define-grob-properties.scm#newcode984 scm/define-grob-properties.scm:984: (Y-alignment ,list? "3-element list specifying how an object is ...
11 years, 10 months ago (2012-06-21 07:26:31 UTC) #9
janek
http://codereview.appspot.com/6308093/diff/10001/scm/define-grob-properties.scm File scm/define-grob-properties.scm (right): http://codereview.appspot.com/6308093/diff/10001/scm/define-grob-properties.scm#newcode984 scm/define-grob-properties.scm:984: (Y-alignment ,list? "3-element list specifying how an object is ...
11 years, 10 months ago (2012-06-21 07:36:31 UTC) #10
Keith
Looks good; I hope to try it using your example-input on the bug-tracker issue 2613 ...
11 years, 10 months ago (2012-06-21 08:24:11 UTC) #11
dak
http://codereview.appspot.com/6308093/diff/10001/scm/define-grob-properties.scm File scm/define-grob-properties.scm (right): http://codereview.appspot.com/6308093/diff/10001/scm/define-grob-properties.scm#newcode969 scm/define-grob-properties.scm:969: be used (for example X@tie{}extent) and the second value ...
11 years, 10 months ago (2012-06-21 19:57:09 UTC) #12
Keith
This fails an assertion in scm_or_str2symbol, so I had to recompile with NDEBUG On 2012/06/21 ...
11 years, 10 months ago (2012-06-22 05:41:49 UTC) #13
janek
On Fri, Jun 22, 2012 at 7:41 AM, <k-ohara5a5a@oco.net> wrote: > This fails an assertion ...
11 years, 10 months ago (2012-06-22 15:21:24 UTC) #14
Keith
On Fri, 22 Jun 2012 08:21:02 -0700, Janek Warchoł <janek.lilypond@gmail.com> wrote: > On Fri, Jun ...
11 years, 10 months ago (2012-06-22 19:02:48 UTC) #15
Keith
11 years, 10 months ago (2012-06-22 20:13:35 UTC) #16
On Fri, 22 Jun 2012 08:21:02 -0700, Janek Warchoł <janek.lilypond@gmail.com>
wrote:

>> The new property X-alignment will be awkward to use, because it is a
>> complex structure of unnamed conceptually-distinct objects.
>
> Unnamed?  What do you mean?

If you change things as you have the patch now, when someone asks, over the
telephone,
"Why doesn't \once\override self-alignment-X work anymore ?"
you have to say "If you are using on lyrics, don't use self-alignment-X; instead
copy X-alignment from the define-grobs.scm and change the car of the second
element in the list to what you used to use for self-alignment-X".  I think I
might have gotten something wrong in that.

> I hope these examples are explained clear enough.
>
Yes. It takes some imagination to visualize an implementation of solutions,
though.

I see how it makes sense to have LyricsText determine its 'core' and then let
self-alignment-X (or, rather, the appropriate element in X-alignment) refer to
that core.

It is hard for me to predict if a "core extent" can be determined by
straightforward code for the various parent objects.   It worked as a
description for what you want in the cases you described.

The relationship between parent and child is asymmetric, though, so you might
not want the symmetric concept of parent and child each having a core.  Tou
might think of the child having a core extent and the parent having a choice of
alignment points (including its reference point which is our choice today).  It
depends on what you can reasonably extract from the parent objects.

Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b