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]),
_______________________________________________
lilypond-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/lilypond-devel