From a8ac663bf03c250ea84bc499437ffc8d529fc047 Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sat, 27 Apr 2013 14:43:40 +0200 Subject: [PATCH] Let Stencil::is_empty use Box::is_empty 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 | 2 +- lily/stencil.cc | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/lily/stencil-scheme.cc b/lily/stencil-scheme.cc index 37203f4eda..3bc68710ef 100644 --- a/lily/stencil-scheme.cc +++ b/lily/stencil-scheme.cc @@ -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) diff --git a/lily/stencil.cc b/lily/stencil.cc index 1657481109..833d5be0fd 100644 --- a/lily/stencil.cc +++ b/lily/stencil.cc @@ -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 -- 2.39.5