- ((cause (music-cause grob))
- (tag (if (and cause (integer? (ly:music-property cause 'input-tag)))
- (ly:music-property cause 'input-tag)
- -1))
- (name (cdr (assoc 'name (ly:grob-property grob 'meta))))
- )
-
- (apply format
- (append (list "cause ~a \"~a\" ~a ~a ~a ~a\n"
- tag name)
-
- (grob-bbox grob offset))
- )))
-
-(define-public (glyph-string
- postscript-font-name
- size cid?
- x-y-named-glyphs)
-
- (format "text \"~a\" ~a ~a " postscript-font-name size
- (string-join (map (lambda (xyn) (caddr xyn))
- x-y-named-glyphs))))
+ ((cause (event-cause grob))
+ (tag (if (and cause (integer? (ly:event-property cause 'input-tag)))
+ (ly:event-property cause 'input-tag)
+ -1))
+ (name (assoc-get 'name (ly:grob-property grob 'meta))))
+
+ (apply format #f
+ "cause ~a \"~a\" ~a ~a ~a ~a\n" tag name
+ (grob-bbox grob offset))))
+
+(define (named-glyph font glyph)
+ (format #f "glyphshow ~a \"~a\" ~a \"~a\""
+ (ly:font-glyph-name-to-charcode font glyph)
+ (ly:font-name font)
+ (modified-font-metric-font-scaling font)
+ glyph))
+
+(define (no-origin)
+ "nocause\n")
+
+(define (placebox x y s)
+ (if (not (string-null? s))
+ (format #f "at ~a ~a ~a\n" x y s)
+ ""))
+
+(define (polygon xy-coords blot do-fill)
+ (format #f "polygon ~a ~a ~a"
+ blot
+ (if do-fill "True" "False")
+ (string-join (map number->string xy-coords))))
+
+(define (round-filled-box breapth width depth height blot-diameter)
+ (format #f "draw_round_box ~a ~a ~a ~a ~a"
+ breapth width depth height blot-diameter))
+
+(define (utf-8-string descr string)
+ (format #f "utf-8 \"~a\" \"~a\""
+ (escape-string descr)
+ ;; don't want unescaped spaces.
+ (escape-string string)))