On 2013/04/02 04:26:29, mike7 wrote:
On 2 avr. 2013, at 00:51, mailto:janek.lilyp...@gmail.com 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/

_______________________________________________
lilypond-devel mailing list
lilypond-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/lilypond-devel

Reply via email to