]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.102
authorfred <fred>
Wed, 27 Mar 2002 00:01:54 +0000 (00:01 +0000)
committerfred <fred>
Wed, 27 Mar 2002 00:01:54 +0000 (00:01 +0000)
flower/include/interval.hh
lily/font-metric.cc
lily/include/font-metric.hh
lily/include/scaled-font-metric.hh [new file with mode: 0644]
lily/paper-def.cc
lily/scaled-font-metric.cc
lily/volta-spanner.cc
mf/feta-beugel.mf

index 0e1bae660048136f9ca6e0dc398d4870b63d4c32..b526673298f89925bc76fe81f62264f0cd2bfbd4 100644 (file)
@@ -58,13 +58,16 @@ struct Interval_t : public Drul_array<T> {
     return *this;
   }
   Interval_t<T> &operator *=(T r) {
-    elem (LEFT) *= r;
-    elem (RIGHT) *= r;
-    if (r < T(0)) {
-      T t = elem (LEFT);
-      elem (LEFT) = elem (RIGHT);
-      elem (RIGHT) = t;
-    }
+    if (!empty_b ())
+      {
+       elem (LEFT) *= r;
+       elem (RIGHT) *= r;
+       if (r < T(0)) {
+         T t = elem (LEFT);
+         elem (LEFT) = elem (RIGHT);
+         elem (RIGHT) = t;
+       }
+      }
     return *this;
   }
 
index 88213329851f2459787ebca7ab84d681a5d50ba1..8ff6a36bac4127269a6525f81d4437ee31b0f380 100644 (file)
@@ -57,14 +57,6 @@ Font_metric::text_dimension (String text) const
 }
 
 
-Box
-Scaled_font_metric::text_dimension (String t) const
-{
-  Box b (orig_l_->text_dimension (t));
-
-  b.scale (magnification_f_);
-  return b;
-}
 
 Font_metric::~Font_metric ()
 {
index 5844d58065402ab43e1bf4aba111efd6eddf8a71..767b3475df3a3d0319a0141c2ac0bfba3f4cb59a 100644 (file)
@@ -31,22 +31,6 @@ protected:
   Font_metric ();
 };
 
-
-/*
-  Perhaps junk this, and move iface to paper_def? 
- */
-struct Scaled_font_metric : public Font_metric
-{
-  virtual Box text_dimension (String) const;
-  virtual Molecule find_by_name (String) const;
-  static SCM make_scaled_font_metric (Font_metric*, Real);
-protected:
-  Font_metric *orig_l_;
-  Real magnification_f_;
-  
-  Scaled_font_metric (Font_metric*,Real);
-};
-
 Font_metric * unsmob_metrics (SCM s);
 
 #endif /* FONT_METRIC_HH */
diff --git a/lily/include/scaled-font-metric.hh b/lily/include/scaled-font-metric.hh
new file mode 100644 (file)
index 0000000..82d1245
--- /dev/null
@@ -0,0 +1,31 @@
+/*   
+  scaled-font-metric.hh -- declare Font_metric
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#ifndef SCALED_FONT_METRIC_HH
+#define SCALED_FONT_METRIC_HH
+
+#include "font-metric.hh"
+
+/*
+  Perhaps junk this, and move this to paper_def as interface? 
+ */
+struct Scaled_font_metric : public Font_metric
+{
+  virtual Box text_dimension (String) const;
+  virtual Molecule find_by_name (String) const;
+  static SCM make_scaled_font_metric (Font_metric*, Real);
+
+protected:
+  virtual   Box get_char (int)const;
+  Font_metric *orig_l_;
+  Real magnification_f_;
+  
+  Scaled_font_metric (Font_metric*,Real);
+};
+#endif
index 8332b128d1f6ce2d763f071835505e4967572d35..27c33651a4b9041cf586aaed8d3e8761b539b04a 100644 (file)
@@ -13,7 +13,7 @@
 #include "misc.hh"
 #include "paper-def.hh"
 #include "debug.hh"
-#include "font-metric.hh"
+#include "scaled-font-metric.hh"
 #include "main.hh"
 #include "scope.hh"
 #include "file-results.hh" // urg? header_global_p
index 27f8c34fc37deb852728888ee6d8ada6db0d91df..cef407719a4971fa74977698ee2cc8357e38517c 100644 (file)
@@ -1,4 +1,13 @@
-#include "font-metric.hh"
+/*   
+     scaled-font-metric.cc -- declare Scaled_font_metric
+  
+  source file of the GNU LilyPond music typesetter
+  
+  (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  
+ */
+
+#include "scaled-font-metric.hh"
 #include "string.hh"
 #include "molecule.hh"
 
@@ -30,3 +39,20 @@ Scaled_font_metric::find_by_name (String s) const
 
   return q ;
 }
+
+Box 
+Scaled_font_metric::get_char (int i) const
+{
+  Box b = orig_l_->get_char (i);
+  b.scale (magnification_f_);
+  return b;  
+}
+
+Box
+Scaled_font_metric::text_dimension (String t) const
+{
+  Box b (orig_l_->text_dimension (t));
+
+  b.scale (magnification_f_);
+  return b;
+}
index 7db9f659364cf421e3a9b1d0447dd5522817af72..0de67ae6d679a301f634afae50d833764a28ec77 100644 (file)
@@ -21,7 +21,7 @@
 
 
 void
-Volta_spanner::set_interface (Score_element*me)
+Volta_spanner::set_interface (Score_element*)
 {
 }
 
index 0deab25aab3ab490cb68cf0be46cf3003b3c843e..1461401cb9d0f216df8bb8ae93374551e06b3cfe 100644 (file)
@@ -11,8 +11,9 @@ def draw_brace( expr height_sharp, width_sharp) =
        height# := height_sharp;
        width#  := width_sharp;
 
-       beginchar(incr code, width#, height#/2, height#/2);
+       beginchar(code, width#, height#/2, height#/2);
+       code := incr code;
+         
        define_pixels (height, width);
        thin = 2 stafflinethickness;
        thick = .5 staff_space;