Jérôme Plût
2018-11-08 19:59:45 UTC
#(begin
; after http://lsr.di.unimi.it/LSR/Snippet?id=969
(define-markup-command (with-background layout props color arg) (color? markup?)
(let* ((stencil (interpret-markup layout props arg))
(X-ext (ly:stencil-extent stencil X))
(Y-ext (ly:stencil-extent stencil Y)))
(ly:stencil-add (ly:make-stencil
(list 'color color
(ly:stencil-expr (ly:round-filled-box X-ext Y-ext 0))
X-ext Y-ext)) stencil)))
(display "\"")
(display (markup->string (markup #:with-background `(1. 0. 0.) "something")))
(display "\"")
)
This should display "something". However it displays an empty string.
How could I fix this?
(I tried to manually debug markup->string (in scm/markup.scm): as I
understand it, the problem is likely that with-background does not
belong to the 'lily module. However, I am completely unfamiliar with
guile's module system, so I don't have the slightest idea about how to
fix this).
Thanks,
; after http://lsr.di.unimi.it/LSR/Snippet?id=969
(define-markup-command (with-background layout props color arg) (color? markup?)
(let* ((stencil (interpret-markup layout props arg))
(X-ext (ly:stencil-extent stencil X))
(Y-ext (ly:stencil-extent stencil Y)))
(ly:stencil-add (ly:make-stencil
(list 'color color
(ly:stencil-expr (ly:round-filled-box X-ext Y-ext 0))
X-ext Y-ext)) stencil)))
(display "\"")
(display (markup->string (markup #:with-background `(1. 0. 0.) "something")))
(display "\"")
)
This should display "something". However it displays an empty string.
How could I fix this?
(I tried to manually debug markup->string (in scm/markup.scm): as I
understand it, the problem is likely that with-background does not
belong to the 'lily module. However, I am completely unfamiliar with
guile's module system, so I don't have the slightest idea about how to
fix this).
Thanks,
--
Jérôme
Jérôme