lilypond-devel
[Top][All Lists]
Advanced

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

Re: Checks for grobs with circular parentage in the regtests. (issue4747


From: address@hidden
Subject: Re: Checks for grobs with circular parentage in the regtests. (issue4747045)
Date: Sat, 16 Jul 2011 17:31:25 +0200

On Jul 16, 2011, at 3:39 AM, address@hidden wrote:

> 
> http://codereview.appspot.com/4747045/diff/2001/lily/grob.cc
> File lily/grob.cc (right):
> 
> http://codereview.appspot.com/4747045/diff/2001/lily/grob.cc#newcode528
> lily/grob.cc:528: Grob::in_own_family_tree (Grob *g, Grob *orig)
> I think this should take an axis argument, and check only one axis.
> 
> http://codereview.appspot.com/4747045/diff/2001/lily/include/grob.hh
> File lily/include/grob.hh (right):
> 
> http://codereview.appspot.com/4747045/diff/2001/lily/include/grob.hh#newcode140
> lily/include/grob.hh:140: static bool in_own_family_tree(Grob *g, Grob
> *orig);
> this needs a small comment; could probably be normal method as well.
> 
> I think
> 
>  a->has_ancestor(b)
> 
> would be more clear.
> 
> http://codereview.appspot.com/4747045/diff/2001/lily/pitched-trill-engraver.cc
> File lily/pitched-trill-engraver.cc (right):
> 
> http://codereview.appspot.com/4747045/diff/2001/lily/pitched-trill-engraver.cc#newcode124
> lily/pitched-trill-engraver.cc:124: trill_group_->translate_axis
> ((unsmob_pitch (scm_pitch)->steps () + c0 ) * 0.5,
> you can't do typography (positioning) in any engraver.  This wil mess up
> positioning with modified staff sizes.
> 

I'm gonna pull this patch out of consideration - both you and Neil are right 
about checking parents on an axis-by-axis basis.  My desire to do this comes 
from an incomplete understanding of what "parent" means in LilyPond speak.  I 
now understand that grob A can be grob B's X parent while grob B is grob A's Y 
parent.  In this case, the approach in my tuplet patch holds because I only 
check along the Y_AXIS (as Carl suggested), which eliminates the recursive 
problem.

Cheers,
MS


reply via email to

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