[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: layout.cc: do not draw empty boxes (issue 6450113)
From: |
k-ohara5a5a |
Subject: |
Re: layout.cc: do not draw empty boxes (issue 6450113) |
Date: |
Mon, 03 Sep 2012 07:25:53 +0000 |
Reviewers: joeneeman, Graham Percival,
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)
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() );
Description:
layout.cc: do not draw empty^H^H infinite boxes
Please review this at http://codereview.appspot.com/6450113/
Affected files:
M lily/lookup.cc
Index: lily/lookup.cc
diff --git a/lily/lookup.cc b/lily/lookup.cc
index
1acb34f783cf83dab6b0cc503f8d55fb47852a0e..f37d98c0e3d9e83a8bccb49d227e7b22ae295afc
100644
--- a/lily/lookup.cc
+++ b/lily/lookup.cc
@@ -174,6 +174,9 @@ Lookup::round_filled_box (Box b, Real blotdiameter)
if (b.y ().length () < blotdiameter)
blotdiameter = b.y ().length ();
+ if (isinf (b.x ().delta ()) || isinf (b.y ().delta ()))
+ return Stencil (b, SCM_EOL);
+
SCM at = (scm_list_n (ly_symbol2scm ("round-filled-box"),
scm_from_double (-b[X_AXIS][LEFT]),
scm_from_double (b[X_AXIS][RIGHT]),
- Re: layout.cc: do not draw empty boxes (issue 6450113),
k-ohara5a5a <=
- Re: layout.cc: do not draw empty boxes (issue 6450113), dak, 2012/09/03
- Re: layout.cc: do not draw empty boxes (issue 6450113), k-ohara5a5a, 2012/09/03
- Re: layout.cc: do not draw empty boxes (issue 6450113), joeneeman, 2012/09/03
- Re: layout.cc: do not draw empty boxes (issue 6450113), k-ohara5a5a, 2012/09/03
- Re: layout.cc: do not draw empty boxes (issue 6450113), dak, 2012/09/17
- Re: layout.cc: do not draw empty boxes (issue 6450113), graham, 2012/09/18
- Re: layout.cc: do not draw empty boxes (issue 6450113), k-ohara5a5a, 2012/09/18