]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/horizontal-bracket.cc
2003 -> 2004
[lilypond.git] / lily / horizontal-bracket.cc
index a172d85358199b156081a9f27427368edfe8d94f..b2f5942d2f5e8ab414f76ec66734690465d3370b 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-(c) 2002--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+(c) 2002--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
  */
 
@@ -12,6 +12,7 @@
 #include "group-interface.hh"
 #include "directional-element-interface.hh"
 #include "paper-def.hh"
+#include "staff-symbol-referencer.hh"
 
 struct Horizontal_bracket
 {
@@ -51,14 +52,11 @@ Horizontal_bracket::brew_molecule (SCM smob)
   ext.unite (gs[0]->extent (cx, X_AXIS));
 
   Direction d = get_grob_direction (me);
-  Real lt =me->get_paper()->get_realvar (ly_symbol2scm ("linethickness"));
-  Real t = lt;
 
-  SCM lthick = me->get_grob_property ("thickness");
-  if (gh_number_p (lthick))
-    t *= gh_scm2double (lthick);
+  Real thickness = Staff_symbol_referencer::line_thickness (me);
+  thickness *= robust_scm2double (me->get_grob_property ("thickness"), 1.0);
   
-  Molecule b = Lookup::bracket (X_AXIS, ext, t, - d* 1.0, lt); 
+  Molecule b = Lookup::bracket (X_AXIS, ext, thickness, - d* 1.0, thickness/2); 
   
   b.translate_axis ( - sp->get_bound (LEFT)->relative_coordinate (cx, X_AXIS), X_AXIS);