From: fred Date: Wed, 27 Mar 2002 00:01:54 +0000 (+0000) Subject: lilypond-1.3.102 X-Git-Tag: release/1.5.59~1186 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=25f98dafbd1a4ec21d232861d06609584d9afe46;p=lilypond.git lilypond-1.3.102 --- diff --git a/flower/include/interval.hh b/flower/include/interval.hh index 0e1bae6600..b526673298 100644 --- a/flower/include/interval.hh +++ b/flower/include/interval.hh @@ -58,13 +58,16 @@ struct Interval_t : public Drul_array { return *this; } Interval_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; } diff --git a/lily/font-metric.cc b/lily/font-metric.cc index 8821332985..8ff6a36bac 100644 --- a/lily/font-metric.cc +++ b/lily/font-metric.cc @@ -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 () { diff --git a/lily/include/font-metric.hh b/lily/include/font-metric.hh index 5844d58065..767b3475df 100644 --- a/lily/include/font-metric.hh +++ b/lily/include/font-metric.hh @@ -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 index 0000000000..82d1245976 --- /dev/null +++ b/lily/include/scaled-font-metric.hh @@ -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 + + */ + +#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 diff --git a/lily/paper-def.cc b/lily/paper-def.cc index 8332b128d1..27c33651a4 100644 --- a/lily/paper-def.cc +++ b/lily/paper-def.cc @@ -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 diff --git a/lily/scaled-font-metric.cc b/lily/scaled-font-metric.cc index 27f8c34fc3..cef407719a 100644 --- a/lily/scaled-font-metric.cc +++ b/lily/scaled-font-metric.cc @@ -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 + + */ + +#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; +} diff --git a/lily/volta-spanner.cc b/lily/volta-spanner.cc index 7db9f65936..0de67ae6d6 100644 --- a/lily/volta-spanner.cc +++ b/lily/volta-spanner.cc @@ -21,7 +21,7 @@ void -Volta_spanner::set_interface (Score_element*me) +Volta_spanner::set_interface (Score_element*) { } diff --git a/mf/feta-beugel.mf b/mf/feta-beugel.mf index 0deab25aab..1461401cb9 100644 --- a/mf/feta-beugel.mf +++ b/mf/feta-beugel.mf @@ -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;