2 (define-module (scm output-socket)
11 (define (dummy . rest)
16 (module-define! (current-module)
20 (ly:all-stencil-expressions))
23 (define-public (draw-line thick x1 y1 x2 y2)
24 (format "drawline ~a ~a ~a ~a ~a"
27 (define-public (polygon xy-coords blot do-fill)
28 (format "polygon ~a ~a ~a"
30 (if do-fill "True" "False")
32 (map number->string xy-coords))
35 (define-public (named-glyph font glyph)
36 (format "glyphshow ~a \"~a\" ~a \"~a\""
37 (ly:font-glyph-name-to-charcode font glyph)
39 (modified-font-metric-font-scaling font)
43 (define-public (placebox x y s)
44 (format "at ~a ~a ~a\n" x y s))
46 (define-public (round-filled-box breapth width depth height blot-diameter)
47 (format "draw_round_box ~a ~a ~a ~a ~a"
48 breapth width depth height blot-diameter
51 (define (music-cause grob)
53 ((cause (ly:grob-property grob 'cause)))
56 ((ly:music? cause) cause)
57 ((ly:grob? cause) (music-cause cause))
61 (define (grob-bbox grob offset)
63 ((x-ext (ly:grob-extent grob grob X))
64 (y-ext (ly:grob-extent grob grob Y))
72 (list (+ x (car x-ext))
78 (define-public (no-origin)
81 (define-public (grob-cause offset grob)
83 ((cause (music-cause grob))
84 (tag (if (and cause (integer? (ly:music-property cause 'input-tag)))
85 (ly:music-property cause 'input-tag)
87 (name (cdr (assoc 'name (ly:grob-property grob 'meta))))
91 (append (list "cause ~a \"~a\" ~a ~a ~a ~a\n"
94 (grob-bbox grob offset))
97 (define-public (glyph-string
102 (format "text \"~a\" ~a ~a " postscript-font-name size
103 (string-join (map (lambda (xyn) (caddr xyn))