From a26086ffa95fbbddf0a4f27614415932541b4545 Mon Sep 17 00:00:00 2001
From: Han-Wen Nienhuys <hanwen@xs4all.nl>
Date: Fri, 27 May 2005 12:00:15 +0000
Subject: [PATCH] (circle): support circle. (bracket): stub for bracket.

---
 ChangeLog             |  3 +++
 scm/framework-tex.scm |  2 +-
 scm/lily.scm          |  1 -
 scm/output-svg.scm    | 42 ++++++++++++++++++++++++++++--------------
 4 files changed, 32 insertions(+), 16 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7f7b49da7a..22764291f2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2005-05-27  Han-Wen Nienhuys  <hanwen@xs4all.nl>
 
+	* scm/output-svg.scm (circle): support circle.
+	(bracket): stub for bracket.
+
 	* scripts/lilypond-book.py (main): make sure --psfonts warning is correct.
 
 2005-05-26  Graham Percival  <gperlist@shaw.ca>
diff --git a/scm/framework-tex.scm b/scm/framework-tex.scm
index 561c5c5e7c..568c5e7c40 100644
--- a/scm/framework-tex.scm
+++ b/scm/framework-tex.scm
@@ -162,7 +162,7 @@
 (define (header-end)
   (string-append
    "\\def\\scaletounit{ "
-   (number->string (lily-unit->bigpoint-factor))
+   (number->string lily-unit->bigpoint-factor)
    " mul }%\n"
    "\\ifx\\lilypondstart\\undefined\n"
    "  \\input lilyponddefs\n"
diff --git a/scm/lily.scm b/scm/lily.scm
index a956f55073..c385f0b809 100644
--- a/scm/lily.scm
+++ b/scm/lily.scm
@@ -405,7 +405,6 @@ The syntax is the same as `define*-public'."
 	    (exit 1))
 	  (exit 0)))))
 
-
 (define (gui-no-files-handler)
   (let* ((ly (string-append (ly:effective-prefix) "/ly/"))
 	 ;; FIXME: soft-code, localize
diff --git a/scm/output-svg.scm b/scm/output-svg.scm
index 830bba9ab2..edf86aa119 100644
--- a/scm/output-svg.scm
+++ b/scm/output-svg.scm
@@ -270,11 +270,10 @@
 	    (stroke-linecap . "round")
 	    (stroke-width . ,thick)
 	    (stroke . "black")
-	    ;;'(fill . "black")
 	    (x1 . ,x1)
-	    (y1 . ,y1)
+	    (y1 . ,(- y1))
 	    (x2 . ,x2)
-	    (y2 . ,y2))
+	    (y2 . ,(- y2)))
 	  alist)))
 
 (define (dashed-line thick on off dx dy)
@@ -301,17 +300,17 @@
 	  `(transform . ,(format #f "translate (~f, ~f)"
 				 x (- y)))))
 
-
-(define (polygon coords blot-diameter)
-  (entity 'polygon ""
-	  '(stroke-linejoin . "round")
-	  '(stroke-linecap . "round")
-	  `(stroke-width . ,blot-diameter)
-	  '(stroke . "black")
-	  ;;'(fill . "black")
-	  `(points . ,(string-join
-		       (map offset->point (ly:list->offsets '() coords))))
-  ))
+(define (polygon coords blot-diameter is-filled)
+  (entity
+   'polygon ""
+   '(stroke-linejoin . "round")
+   '(stroke-linecap . "round")
+   `(stroke-width . ,blot-diameter)
+   `(fill . ,(if is-filled "black" "none"))
+   '(stroke . "black")
+   `(points . ,(string-join
+		(map offset->point (ly:list->offsets '() coords))))
+   ))
 
 (define (round-filled-box breapth width depth height blot-diameter)
   (entity 'rect ""
@@ -330,8 +329,23 @@
 	  `(ry . ,(/ blot-diameter 2))
 	  ))
 
+(define (circle radius thick is-filled)
+  (entity
+   'circle ""
+   '(stroke-linejoin . "round")
+   '(stroke-linecap . "round")
+   `(fill . ,(if is-filled "black" "none"))
+   `(stroke . "black")
+   `(stroke-width . ,thick)
+   `(r . ,radius)))
+
 (define (text font string)
   (dispatch `(fontify ,font ,(entity 'tspan (string->entities string)))))
 
 (define (utf8-string pango-font-description string)
   (dispatch `(fontify ,pango-font-description ,(entity 'tspan string))))
+
+(define (bracket arch_angle arch_width arch_height height arch_thick thick)
+  ;; FIXME.
+  ""
+  )
-- 
2.39.5