;; JUNK this -- see lily.scm: ly:all-output-backend-commands
#:export (unknown
- blank
+ bezier-sandwich
+ char
circle
- dot
+ comment
+ dashed-line
dashed-slur
- char
- setcolor
- resetcolor
+ dot
+ draw-line
+ embedded-ps
named-glyph
- dashed-line
- zigzag-line
- comment
- repeat-slash
+ no-origin
placebox
- bezier-sandwich
- embedded-ps
+ polygon
+ repeat-slash
+ resetcolor
+ resetrotatino
round-filled-box
+ setcolor
+ setrotation
text
- polygon
- draw-line
- no-origin))
+ zigzag-line))
(use-modules (guile)
(define (euclidean-length x y)
(sqrt (+ (* x x) (* y y))))
- (let ((x-width (euclidean-length slope (/ beam-thickness slope)))
+ (let ((x-width (euclidean-length beam-thickness (/ beam-thickness slope)))
(height (* width slope)))
(format #f "~a draw_repeat_slash"
(numbers->string4 (list x-width width height)))))
;; restore color from stack
(define (resetcolor) "setrgbcolor\n")
+;; reset rotation
+(define (resetrotation ang x y)
+ (format "~a translate ~a rotate ~a translate\n"
+ (numbers->string4 (list x y))
+ (number->string (* -1 ang))
+ (numbers->string4 (list (* -1 x) (* -1 y)))))
+
(define (round-filled-box left right bottom top blotdiam)
(let* ((halfblot (/ blotdiam 2))
(x (- halfblot left))
(format #f "currentrgbcolor ~a setrgbcolor\n"
(numbers->string4 (list r g b))))
+;; rotation around given point
+(define (setrotation ang x y)
+ (format "~a translate ~a rotate ~a translate\n"
+ (numbers->string4 (list x y))
+ (number->string ang)
+ (numbers->string4 (list (* -1 x) (* -1 y)))))
+
(define (text font s)
;; (ly:warning (_ "TEXT backend-command encountered in Pango backend"))
;; (ly:warning (_ "Arguments: ~a ~a"" font str))