]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.1.27
authorfred <fred>
Sun, 24 Mar 2002 20:01:20 +0000 (20:01 +0000)
committerfred <fred>
Sun, 24 Mar 2002 20:01:20 +0000 (20:01 +0000)
Documentation/lilypond.pod
lily/include/main.hh
lily/tex-slur.cc

index 2d85939d0f00a59af9cce3f25c0b2b646bbfabb5..20f75f4b82b77ef44bf54eed0e79c0b79e76d721 100644 (file)
@@ -32,6 +32,10 @@ Turn debugging info on.  GNU LilyPond reads the file F<.dstreamrc>,
 which lists what functions and classes may produce copious debugging
 output.
 
+=item B<-t,--test>,
+
+Switch on any experimental features.  Not for general public use.
+
 =item B<-w,--warranty>,
 
 Show the warranty with which GNU LilyPond comes. (It comes with B<NO
index 98ed2c920ea523440c0c4bfbfd1827a8a903b8db..7ff4721bbabec31a36d23a44b74fa376ad9cb249 100644 (file)
@@ -20,6 +20,7 @@ String get_version_number_str();
 extern Sources* source_l_g;
 extern bool only_midi;
 extern int exit_status_i_;
+extern bool experimental_features_global_b;
 
 extern String default_out_fn;
 
index 34cd12d5efe58bfb75e4c142e6b71d232ccb4b8d..ea365069b2afa019f309b309c95c289d970de084 100644 (file)
@@ -13,7 +13,9 @@
 #include "dimen.hh"
 #include "debug.hh"
 #include "paper-def.hh"
+#include "string-convert.hh"
 
+#include "main.hh"
 
 static char
 direction_char (Direction y_sign)
@@ -134,13 +136,45 @@ Lookup::half_slur (int dy, Real &dx, Direction dir, int xpart) const
 Atom
 Lookup::slur (int dy , Real &dx, Direction dir) const
 {
-
   assert (abs (dir) <= 1);
   if  (dx < 0)
     {
       warning (_("Negative slur/tie length: ") + print_dimen (dx));
       dx = 4.0 PT;
     }
+
+  Atom s;
+  s.dim_[X_AXIS] = Interval (0, dx);
+  s.dim_[Y_AXIS] = Interval (min (0, dy), max (0, dy));
+
+  // duh
+  // let's try the embedded stuff
+  bool embedded_b = experimental_features_global_b;
+  if (embedded_b)
+    {
+      // huh, factor 8?
+      Real fdy = dy*paper_l_->internote_f ();
+      Real fdx = dx;
+      String ps = "\\embeddedps{\n";
+      // ugh, how bout " /draw_slur { ... } def "
+      ps += String_convert::int_str (fdx) + " " 
+       + String_convert::int_str (fdy) + " "
+       + String_convert::int_str (dir) +
+       " drawslur}";
+
+      String mf = "\\embeddedmf{\n";
+      mf += "input feta-sleur;\n";
+      mf += "draw_slur((0,0),";
+      mf += "(" + String_convert::int_str (fdx) + "," 
+       + String_convert::int_str (fdy) + "),";
+      mf += String_convert::int_str (dir) + ");\n";
+      mf += "end.\n";
+      ps += "}\n";
+
+      s.tex_ = ps + mf;
+      return s;
+    }
+
   Direction y_sign = (Direction) sign (dy);
 
   bool large = abs (dy) > 8;
@@ -175,10 +209,6 @@ Lookup::slur (int dy , Real &dx, Direction dir) const
       WARN<<_("slur to steep: ") << dy << _(" shrinking (ugh)\n");
     }
 
-  Atom s;
-  s.dim_[X_AXIS] = Interval (0, dx);
-  s.dim_[Y_AXIS] = Interval (min (0, dy), max (0, dy));
-
   String f = String ("\\slurchar") + String (direction_char (y_sign));
 
   int idx=-1;
@@ -205,7 +235,6 @@ Lookup::slur (int dy , Real &dx, Direction dir) const
   f+=String ("{") + String (idx) + "}";
   s.tex_ = f;
 
-
   s.translate_axis (dx/2, X_AXIS);
   return s;
 }