]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/output-ps.scm
* scm/paper-system.scm (paper-system-annotate): also annotate the
[lilypond.git] / scm / output-ps.scm
index 2303bf2d02d6d4fb0b78232050f0886605bbc8e5..2e8c78e2d5f9ba4b161c040c8de8085ed31d7cf5 100644 (file)
 
   ;; 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))