]> git.donarmstrong.com Git - lilypond.git/commitdiff
Let Stencil::is_empty use Box::is_empty
authorDavid Kastrup <dak@gnu.org>
Sat, 27 Apr 2013 12:43:40 +0000 (14:43 +0200)
committerDavid Kastrup <dak@gnu.org>
Sun, 26 May 2013 00:33:02 +0000 (02:33 +0200)
This is a change in semantics as an axis interval of '(1 . -1) is
considered empty as an interval, while it is not sufficient for making
a box axis empty.  Things like backspaces would have similar metrics
and are different from no information at all.

lily/stencil-scheme.cc
lily/stencil.cc

index 37203f4edaed9cb817809c19ffbe598b2f60efe0..3bc68710eff0d2e62c4956752454d1d8a6e16ab6 100644 (file)
@@ -180,7 +180,7 @@ LY_DEFINE (ly_make_stencil, "ly:make-stencil",
            "@item\n"
            "The vertical and horizontal extents of the object, given as"
            " pairs.  If an extent is unspecified (or if you use"
-           " @code{(1000 . -1000)} as its value), it is taken to be empty.\n"
+           " @code{empty-interval} as its value), it is taken to be empty.\n"
            "@end enumerate\n")
 {
   SCM_ASSERT_TYPE (!scm_is_pair (expr)
index 16574811092a5e02a84d79512beca8d40c49f641..833d5be0fd55cb12b732b0725d17738196d5b75f 100644 (file)
@@ -66,13 +66,9 @@ Stencil::extent (Axis a) const
 
 bool
 Stencil::is_empty () const
-/* If only one of X- or Y-extent is empty; such a stencil can be useful
- * for backspacing, as with \hspace #-2, so we do not consider it empty.
- */
 {
   return (expr_ == SCM_EOL
-          || (dim_[X_AXIS].is_empty ()
-              && dim_[Y_AXIS].is_empty ()));
+          || dim_.is_empty ());
 }
 
 SCM