- This is most important for output-svg, due to
the regular expression matching, but the other
output backends can benefit from the removal of
the superfluous `placebox' expressions.
x-radius y-radius thick))
(define (placebox x y s)
x-radius y-radius thick))
(define (placebox x y s)
- (ly:format
-"~4f ~4f moveto
-~a\n" x y s))
+ (if (not (string-null? s))
+ (ly:format "~4f ~4f moveto ~a\n" x y s)
+ ""))
(define (polygon points blot-diameter filled?)
(ly:format "~a ~4l ~a ~4f draw_polygon"
(define (polygon points blot-diameter filled?)
(ly:format "~a ~4l ~a ~4f draw_polygon"
))
(define-public (placebox x y s)
))
(define-public (placebox x y s)
- (format "at ~a ~a ~a\n" x y s))
+ (if (not (string-null? s))
+ (format "at ~a ~a ~a\n" x y s)
+ ""))
(define-public (round-filled-box breapth width depth height blot-diameter)
(format "draw_round_box ~a ~a ~a ~a ~a"
(define-public (round-filled-box breapth width depth height blot-diameter)
(format "draw_round_box ~a ~a ~a ~a ~a"
(ly:font-glyph-name-to-charcode font name))))))
(define (placebox x y expr)
(ly:font-glyph-name-to-charcode font name))))))
(define (placebox x y expr)
- (let*
- ((match (regexp-exec svg-element-regexp expr))
- (tagname (match:substring match 1))
- (attributes (match:substring match 2)))
-
- (string-append tagname
- ;; FIXME: Not using GNU coding standards
- ;; [translate ()] here to work around a
- ;; bug in Microsoft Internet Explorer 6.0
- (ly:format " transform=\"translate(~f, ~f)\" " x (- y))
- attributes
- "\n")))
+ (if (not (string-null? expr))
+ (let*
+ ((match (regexp-exec svg-element-regexp expr))
+ (tagname (match:substring match 1))
+ (attributes (match:substring match 2)))
+
+ (string-append tagname
+ ;; FIXME: Not using GNU coding standards
+ ;; [translate ()] here to work around a
+ ;; bug in Microsoft Internet Explorer 6.0
+ (ly:format " transform=\"translate(~f, ~f)\" "
+ x (- y))
+ attributes
+ "\n"))
+ ""))
(define (polygon coords blot-diameter is-filled)
(entity
(define (polygon coords blot-diameter is-filled)
(entity