too. Fixes inf error with added bass notes.
2005-06-01 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ * lily/stencil.cc (is_empty): check dim_ field for is_empty()
+ too. Fixes inf error with added bass notes.
+
* scripts/lilypond-book.py (do_options): --psfonts doesn't take
argument anymore.
return s->expr ();
}
-LY_DEFINE (ly_stencil_get_extent, "ly:stencil-extent",
+LY_DEFINE (ly_stencil_extent, "ly:stencil-extent",
2, 0, 0, (SCM stil, SCM axis),
"Return a pair of numbers signifying the extent of @var{stil} in "
"@var{axis} direction (0 or 1 for x and y axis respectively).")
return dim_[a];
}
-/* Hmm... maybe this is not such a good idea ; stuff can be empty,
- while expr_ == '() */
bool
Stencil::is_empty () const
{
- return expr_ == SCM_EOL;
+ return (expr_ == SCM_EOL
+ || dim_[X_AXIS].is_empty ()
+ || dim_[Y_AXIS].is_empty ());
}
SCM
(def-markup-command (line layout props args) (markup-list?)
"Put @var{args} in a horizontal line. The property @code{word-space}
determines the space between each markup in @var{args}."
+ (let*
+ ((stencils (map (lambda (m) (interpret-markup layout props m)) args))
+ (space (chain-assoc-get 'word-space props)))
+
(stack-stencil-line
- (chain-assoc-get 'word-space props)
- (remove ly:stencil-empty?
- (map (lambda (m) (interpret-markup layout props m)) args))))
+ space
+ (remove ly:stencil-empty? stencils))))
(def-markup-command (fromproperty layout props symbol) (symbol?)
"Read the @var{symbol} from property settings, and produce a stencil
(if (and (pair? (cdr stencils))
(ly:stencil? (cadr stencils)))
- (let* ((tail (stack-stencil-line space (cdr stencils)))
+ (let* ((tail (stack-stencil-line space (cdr stencils)))
(head (car stencils))
(xoff (+ space (cdr (ly:stencil-extent head X)))))
(ly:stencil-add head