lilypond-devel
[Top][All Lists]
Advanced

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

Re: rewrite Self_alignment_interface (issue 7768043)


From: janek . lilypond
Subject: Re: rewrite Self_alignment_interface (issue 7768043)
Date: Tue, 02 Apr 2013 11:42:14 +0000

On 2013/04/02 04:26:29, mike7 wrote:
On 2 avr. 2013, at 00:51, mailto:address@hidden wrote:

>>> As for chain_offset_callback, i've tried it (see attached patch),
>>> but i get a strange error:
>>>
>>> Processing `input/regression/add-stem-support.ly'
>>> Parsing...
>>> Interpreting music...
>>> Preprocessing graphical objects...ERROR:
>>> In procedure ly:self-alignment-interface::x-align-grob:
>>> ERROR: Wrong number of arguments to
>>> #<primitive-procedure ly:self-alignment-interface::x-align-grob>
>>>
>>> quite frankly, i don't know what's wrong.
>>> I've looked at other uses of chain_offset_callback
>>> and it seems that i've written my code correctly.
>
>> I'll look into it when I get home.
>
> did you have any sucess with this stuff?

Try making the function accept a second optional argument with a
previous offset
(check out the offset functions in side position interface)

I've tried that and it works, but the code got quite ugly - you can see
results in dev/janek-chain-optarg (i can abstract some of the duplicated
code to a function, but it will still be quite ugly because of an
additional level of abstraction).

I don't quite see what we gain from using chain_offset_callback - could
you explain why we shouldn't just set the property and be done?

Janek



https://codereview.appspot.com/7768043/diff/46001/scm/define-grobs.scm
File scm/define-grobs.scm (right):

https://codereview.appspot.com/7768043/diff/46001/scm/define-grobs.scm#newcode143
scm/define-grobs.scm:143: (X-extent . (-0.1 . 0.1)) ;UGH! how to get
ambitusline extent from its stencil?
On 2013/04/01 05:52:00, MikeSol wrote:
Why can't you use the standard X extent function given in grob.cc?

well, i've tried
  (X-extent . ,ly:grob::stencil-width)
but i keep on getting the same "warning: AmbitusLine
has empty extent and non-empty stencil."

Besides, wouldn't Lily use that on her own if there was
something there?  I mean, X-extent should be automatically
derived from stencil anyway.  So, i think that the problem
is in getting extent of a line stencil.

https://codereview.appspot.com/7768043/



reply via email to

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