]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/molecule.scm
* Documentation/user/music-glossary.itely: add Finnish author.
[lilypond.git] / scm / molecule.scm
index 0c5510179b4255b700756658461f4419e34a991b..443f6e5c83781532d54271aec8e792f61c1b262a 100644 (file)
@@ -22,8 +22,7 @@
                                       (stack-lines dir padding baseline (cdr mols))
                                       padding baseline
                                       )
-         )
-  ))
+         )))
 
 (define-public (fontify-text font-metric text)
   "Set TEXT with font FONT-METRIC, returning a molecule."
 (define-public (bracketify-molecule mol axis thick protusion padding)
   "Add brackets around MOL, producing a new molecule."
 
-  (let* (
-        (ext (ly:molecule-get-extent mol axis))
+  (let* ((ext (ly:molecule-get-extent mol axis))
         (lb (ly:bracket axis ext thick (- protusion)))
-        (rb (ly:bracket axis ext thick protusion))
-        )
+        (rb (ly:bracket axis ext thick protusion)))
     (set! mol (ly:molecule-combine-at-edge mol (other-axis  axis) 1 lb padding))
     (set! mol (ly:molecule-combine-at-edge mol (other-axis  axis) -1 rb padding))
     mol
@@ -73,15 +70,15 @@ encloses the contents.
 (define-public (box-molecule mol thick padding)
   "Add a box around MOL, producing a new molecule."
   (let* (
-        (x-ext (widen-interval (ly:molecule-get-extent mol 0) padding))
-        (y-ext (widen-interval (ly:molecule-get-extent mol 1) padding))
-        (x-rule (make-filled-box-molecule (widen-interval x-ext thick)
-                              (cons 0 thick)))
-        (y-rule (make-filled-box-molecule (cons 0 thick) y-ext)))
-    
-    (set! mol (ly:molecule-combine-at-edge mol 0 1 y-rule (* 0.5 padding)))
-    (set! mol (ly:molecule-combine-at-edge mol 0 -1  y-rule (* 0.5 padding)))
-    (set! mol (ly:molecule-combine-at-edge mol 1 1  x-rule 0.0))  
-    (set! mol (ly:molecule-combine-at-edge mol 1 -1 x-rule 0.0))
+        (x-ext (interval-widen (ly:molecule-get-extent mol 0) padding))
+        (y-ext (interval-widen (ly:molecule-get-extent mol 1) padding))
+        (y-rule (make-filled-box-molecule (cons 0 thick) y-ext))
+        (x-rule (make-filled-box-molecule (interval-widen x-ext thick)
+                                          (cons 0 thick)))
+        )
+    (set! mol (ly:molecule-combine-at-edge mol X 1 y-rule padding))
+    (set! mol (ly:molecule-combine-at-edge mol X -1 y-rule padding))
+    (set! mol (ly:molecule-combine-at-edge mol Y 1 x-rule 0.0))  
+    (set! mol (ly:molecule-combine-at-edge mol Y -1 x-rule 0.0))
     
     mol))