From: fred Date: Sun, 24 Mar 2002 20:03:31 +0000 (+0000) Subject: lilypond-0.1.34 X-Git-Tag: release/1.5.59~3559 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=88185c6fc02f3f3767bd26c95b00a6ab2a1905a9;p=lilypond.git lilypond-0.1.34 --- diff --git a/lily/lookup.cc b/lily/lookup.cc index cc26384fec..5c304c2cb2 100644 --- a/lily/lookup.cc +++ b/lily/lookup.cc @@ -19,6 +19,7 @@ #include "tex.hh" #include "scalar.hh" #include "paper-def.hh" +#include "main.hh" Lookup::Lookup() { @@ -158,15 +159,32 @@ Lookup::streepje (int type) const Atom Lookup::hairpin (Real &wid, bool decresc) const { - int idx = int (rint (wid / 6 PT)); - if (!idx) idx ++; - wid = idx*6 PT; - String idxstr = (decresc)? "decrescendosym" : "crescendosym"; - Atom ret=(*symtables_p_)("param")->lookup (idxstr); - - Array a; - a.push (idx); - ret.tex_ = substitute_args (ret.tex_, a); + bool embedded_b = experimental_features_global_b; + String embed; + Atom ret; + if (embedded_b) + { + Real height = 2 PT; + embed = "\\embeddedps{\n" ; + embed += String (wid) + " " + + String (height) + + " draw_" + String(decresc ? "de" : "") + "cresc}\n"; + ret.tex_ = embed; + } + else + { + int idx = int (rint (wid / 6 PT)); + if (!idx) idx ++; + wid = idx*6 PT; + String idxstr = (decresc)? "decrescendosym" : "crescendosym"; + ret=(*symtables_p_)("param")->lookup (idxstr); + + Array a; + a.push (idx); + ret.tex_ = substitute_args (ret.tex_, a); + + } + ret.dim_.x() = Interval (0,wid); return ret; }