lilypond-devel
[Top][All Lists]
Advanced

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

Re: layout.cc: do not draw empty boxes (issue 6450113)


From: joeneeman
Subject: Re: layout.cc: do not draw empty boxes (issue 6450113)
Date: Mon, 03 Sep 2012 22:54:24 +0000

On 2012/09/03 08:16:27, dak wrote:
http://codereview.appspot.com/6450113/diff/10001/lily/lookup.cc
File lily/lookup.cc (right):


http://codereview.appspot.com/6450113/diff/10001/lily/lookup.cc#newcode172
lily/lookup.cc:172: if (b.x ().length () < blotdiameter)
On 2012/09/03 07:25:53, Keith wrote:
> It is arguably valid to request a box running from right to left,
for which
> length() returns zero.  In this application, the Interval class
abstraction is
> not helping us.  We could defeat the abstraction with
>  if ( abs( b.x().delta() ) < blotdiameter)
>     blotdiameter = abs( b.x().delta() );

Well, "arguably valid" does not mean that we can let some of our code
argue one
way, some of our code the other.

If we argue it is invalid, we should deliver a programming error here
in order
to make people fix the callers.  If we argue it is valid, the code
needs to be
able to deal with it.

I argue that it is invalid. If you interpret a "right-to-left box" as
being non-empty, then the implementation of Box needs to be rewritten,
since functions such as add_point and widen don't act as expected.

http://codereview.appspot.com/6450113/



reply via email to

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