From 2c1d6f7451ce2f15a2e9afdb1d81d98b0d3e8f55 Mon Sep 17 00:00:00 2001 From: fred Date: Sun, 24 Mar 2002 19:31:02 +0000 Subject: [PATCH] lilypond-0.0.30 --- src/dimen.cc | 3 +-- src/lookup.cc | 23 ++++++++++++++++++----- 2 files changed, 19 insertions(+), 7 deletions(-) diff --git a/src/dimen.cc b/src/dimen.cc index eb53756b45..93077bd87b 100644 --- a/src/dimen.cc +++ b/src/dimen.cc @@ -15,7 +15,6 @@ parse_dimen(String dim) return convert_dimen(dim.fvalue(), unit); } -const Real CM_TO_PT=72/2.54; Real convert_dimen(Real quant, String unit) @@ -27,7 +26,7 @@ convert_dimen(Real quant, String unit) if (unit == "mm") return quant*CM_TO_PT/10; if (unit == "in") - return quant * 72; + return quant * INCH_TO_PT; error ("unknown length unit: `" + unit+"'"); } diff --git a/src/lookup.cc b/src/lookup.cc index be3466e092..96932e0023 100644 --- a/src/lookup.cc +++ b/src/lookup.cc @@ -42,7 +42,7 @@ Lookup::text(String style, String text, int dir) return s; } -/****************/ +/* *************** */ Real Lookup::internote() @@ -137,7 +137,21 @@ Lookup::streepjes(int i) return ret; } - +Symbol +Lookup::hairpin(Real &wid, bool decresc) +{ + int idx = rint(wid / 6 PT); + if(!idx) idx ++; + wid = idx*6 PT; + String idxstr = (decresc)? "decrescendosym" : "crescendosym"; + Symbol ret=(*symtables_)("param")->lookup(idxstr); + + Array a; + a.push(idx); + ret.tex = substitute_args(ret.tex, a); + ret.dim.x = Interval(0,wid); + return ret; +} Symbol Lookup::linestaff(int lines, Real wid) @@ -162,9 +176,8 @@ Symbol Lookup::meter(Array a) { Symbol s; - s.dim.x = Interval( convert_dimen(0,"pt"), - convert_dimen(10,"pt")); - s.dim.y = Interval(0, convert_dimen(20,"pt") ); // todo + s.dim.x = Interval( 0 PT, 10 PT); + s.dim.y = Interval(0, 20 PT); // todo String src = (*symtables_)("param")->lookup("meter").tex; s.tex = substitute_args(src,a); return s; -- 2.39.5