]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lookup.cc
release: 1.3.2
[lilypond.git] / lily / lookup.cc
index 880dca8825ef97303dc46349d1cc7a67a952baa3..1b7c19e11640de37682c28053ac6199de3a33161 100644 (file)
@@ -111,7 +111,7 @@ Lookup::afm_find (String s, bool warn) const
     {
       /*
        don't want people relying on this kind of dimension. 
-       */
+      */
       m.set_empty (false);
       return m;
     }
@@ -161,7 +161,7 @@ Molecule
 Lookup::bar (String str, Real h, Paper_def *paper_l) const
 {
   if (str == "bracket")
-    return staff_bracket (h);
+    return staff_bracket (h, paper_l);
   else if (str == "brace")
     {
       Real staffht  = paper_l->get_var ("staffheight");
@@ -241,11 +241,11 @@ Lookup::beam (Real slope, Real width, Real thick) const
   
   Molecule m;
   Atom at
-     (gh_list (gh_symbol2scm ("beam"),
-                               gh_double2scm (width),
-                               gh_double2scm (slope),
-                               gh_double2scm (thick),
-                               SCM_UNDEFINED));
+    (gh_list (gh_symbol2scm ("beam"),
+             gh_double2scm (width),
+             gh_double2scm (slope),
+             gh_double2scm (thick),
+             SCM_UNDEFINED));
 
   m.dim_[X_AXIS] = Interval (0, width);
   m.dim_[Y_AXIS] = Interval (min_y, max_y);
@@ -455,7 +455,7 @@ Lookup::text (String style, String text, Paper_def *paper_l) const
 
   
   Atom at  (gh_list (gh_symbol2scm ("text"),
-                    ly_ch_C_to_scm (text.ch_C()),
+                    ly_str02scm (text.ch_C()),
                     SCM_UNDEFINED));
   at.font_ = ly_symbol (style);
   at.magn_ = gh_int2scm (font_mag);
@@ -492,15 +492,15 @@ Lookup::staff_brace (Real y, int staff_size) const
 {
   Molecule m;
   /*
-  (define (pianobrace y staffht)
+    (define (pianobrace y staffht)
     (let* ((step 1.0)
-          (minht (* 2 staffht))
-          (maxht (* 7 minht))
-          )
-      (string-append
-       (select-font (string-append "feta-braces" (number->string (inexact->exact staffht))) 0)
-       (char (max 0 (/  (- (min y (- maxht step)) minht) step))))
-      )
+    (minht (* 2 staffht))
+    (maxht (* 7 minht))
+    )
+    (string-append
+    (select-font (string-append "feta-braces" (number->string (inexact->exact staffht))) 0)
+    (char (max 0 (/  (- (min y (- maxht step)) minht) step))))
+    )
     )
   */
 
@@ -527,7 +527,7 @@ Lookup::hairpin (Real width, Real height, Real thick, bool decresc, bool continu
   Molecule m;   
 
   String hairpin = String (decresc ? "de" : "") + "crescendo";
-  Atom at  (gh_list (ly_symbol ("hairpin"),
+  Atom at  (gh_list (ly_symbol (hairpin),
                     gh_double2scm (thick),
                     gh_double2scm (width),
                     gh_double2scm (height),
@@ -541,12 +541,13 @@ Lookup::hairpin (Real width, Real height, Real thick, bool decresc, bool continu
 }
 
 Molecule
-Lookup::tuplet_bracket (Real dy , Real dx, Real thick, Real gap, Real interline_f, Direction dir) const
+Lookup::tuplet_bracket (Real dy , Real dx, Real thick, Real gap,
+                       Real height, Direction dir) const
 {
   Molecule m;
 
   Atom at  (gh_list(gh_symbol2scm ("tuplet"),
-                   gh_double2scm (interline_f),
+                   gh_double2scm (height),
                    gh_double2scm (gap),
                    gh_double2scm (dx),
                    gh_double2scm (dy),
@@ -586,14 +587,21 @@ Lookup::slur (Array<Offset> controls, Real linethick) const
 }
 
 Molecule
-Lookup::staff_bracket (Real y) const
+Lookup::staff_bracket (Real height, Paper_def* paper_l) const
 {
-  Molecule m; 
+  Molecule m;
   Atom at  ( gh_list (gh_symbol2scm ("bracket"),
-                     gh_double2scm (y),
-                     SCM_UNDEFINED));
+                     gh_double2scm (paper_l->get_var("bracket_arch_angle")),
+                     gh_double2scm (paper_l->get_var("bracket_arch_width")),
+                     gh_double2scm (paper_l->get_var("bracket_arch_height")),
+                     gh_double2scm (paper_l->get_var("bracket_width")),
+                     gh_double2scm (height),
+                     gh_double2scm (paper_l->get_var("bracket_arch_thick")),
+                     gh_double2scm (paper_l->get_var("bracket_thick")),
+                     SCM_UNDEFINED));
+  
   m.add_atom (&at);                             
-  m.dim_[Y_AXIS] = Interval (-y/2,y/2);
+  m.dim_[Y_AXIS] = Interval (-height/2,height/2);
   m.dim_[X_AXIS] = Interval (0,4 PT);
 
   m.translate_axis (- 4. / 3. * m.dim_[X_AXIS].length (), X_AXIS);