]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/tex-slur.cc
release: 0.1.24
[lilypond.git] / lily / tex-slur.cc
index 8ea4ba4a5df9c481ea1a64a0f08c35a47fec94f6..34cd12d5efe58bfb75e4c142e6b71d232ccb4b8d 100644 (file)
@@ -42,19 +42,19 @@ Lookup::half_slur_middlepart (Real &dx, Direction dir) const
   // todo
   if (dx >= 400 PT)
     {
-      WARN<<"halfslur too large" <<print_dimen (dx)<< "shrinking (ugh)\n";
+      WARN<<_("halfslur too large") <<print_dimen (dx)<< _("shrinking (ugh)\n");
       dx = 400 PT;
     }
   int widx = int (floor (dx / 4.0));
   dx = widx * 4.0;
   if (widx) widx --;
-  else 
+  else
     {
-      WARN <<  "slur too narrow\n";
+      WARN <<  _("slur too narrow\n");
     }
 
   Atom s;
-  
+
   s.dim_[Y_AXIS] = Interval (min (0, 0), max (0, 0)); // todo
   s.dim_[X_AXIS] = Interval (-dx/2, dx/2);
 
@@ -75,7 +75,7 @@ Lookup::half_slur_middlepart (Real &dx, Direction dir) const
 }
 
 /*
-   The halfslurs have their center at the end pointing away from the notehead.  
+   The halfslurs have their center at the end pointing away from the notehead.
    This lookup translates so that width() == [0, w]
  */
 
@@ -87,10 +87,10 @@ Lookup::half_slur (int dy, Real &dx, Direction dir, int xpart) const
     return half_slur_middlepart (dx, dir);
 
   int widx;
-               
-  if (dx >= 96 PT) 
+
+  if (dx >= 96 PT)
     {
-      WARN << "Slur half too wide." << print_dimen (orig_dx) << " shrinking (ugh)\n";
+      WARN << _("Slur half too wide.") << print_dimen (orig_dx) << _(" shrinking (ugh)\n");
       dx =  96 PT;
     }
 
@@ -98,11 +98,11 @@ Lookup::half_slur (int dy, Real &dx, Direction dir, int xpart) const
   dx = widx*12.0;
   if (widx)
     widx --;
-  else 
+  else
     {
-      WARN <<  "slur too narrow " << print_dimen (orig_dx)<<"\n";
+      WARN <<  _("slur too narrow ") << print_dimen (orig_dx)<<"\n";
     }
-       
+
   Atom s;
   s.dim_[X_AXIS] = Interval (0, dx);
   s.dim_[Y_AXIS] = Interval (min (0, dy), max (0, dy));
@@ -121,38 +121,38 @@ Lookup::half_slur (int dy, Real &dx, Direction dir, int xpart) const
   idx = widx * 16 + hidx;
   if (xpart < 0)
     idx += 128;
-  
+
   assert (idx < 256);
   f+=String ("{") + String (idx) + "}";
 
-  
+
   s.tex_ = f;
+
   return s;
 }
 
 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));
+      warning (_("Negative slur/tie length: ") + print_dimen (dx));
       dx = 4.0 PT;
     }
   Direction y_sign = (Direction) sign (dy);
 
   bool large = abs (dy) > 8;
 
-  if (y_sign) 
+  if (y_sign)
     {
       large |= dx>= 4*16 PT;
     }
   else
     large |= dx>= 4*54 PT;
-  
-  if (large) 
+
+  if (large)
     {
       return big_slur (dy, dx, dir);
     }
@@ -161,20 +161,20 @@ Lookup::slur (int dy , Real &dx, Direction dir) const
   dx = 4.0 * widx;
   if (widx)
     widx --;
-  else 
+  else
     {
-      WARN <<  "slur too narrow: " << print_dimen (orig_dx) << "\n";
+      WARN <<  _("slur too narrow: ") << print_dimen (orig_dx) << "\n";
     }
 
   int hidx = dy;
   if (hidx <0)
     hidx = -hidx;
-  hidx --; 
-  if (hidx > 8) 
+  hidx --;
+  if (hidx > 8)
     {
-      WARN<<"slur to steep: " << dy << " shrinking (ugh)\n";
+      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));
@@ -182,44 +182,44 @@ Lookup::slur (int dy , Real &dx, Direction dir) const
   String f = String ("\\slurchar") + String (direction_char (y_sign));
 
   int idx=-1;
-  if (y_sign) 
-    {  
+  if (y_sign)
+    {
       idx = hidx * 16 + widx;
       if (dir < 0)
        idx += 128;
     }
-  else 
+  else
     {
-      if (dx >= 4*54 PT) 
+      if (dx >= 4*54 PT)
        {
-         WARN << "slur too wide: " << print_dimen (dx) <<
-           " shrinking (ugh)\n";
+         WARN << _("slur too wide: ") << print_dimen (dx) <<
+           _(" shrinking (ugh)\n");
          dx = 4*54 PT;
        }
       idx = widx;
       if (dir < 0)
-       idx += 54;              
+       idx += 54;
     }
-  
+
   assert (idx < 256);
   f+=String ("{") + String (idx) + "}";
   s.tex_ = f;
 
 
   s.translate_axis (dx/2, X_AXIS);
-  return s;    
+  return s;
 }
 
 Atom
 Lookup::big_slur (int dy , Real &dx, Direction dir) const
 {
-  if (dx < 24 PT) 
+  if (dx < 24 PT)
     {
-      warning ("big_slur too small " + print_dimen (dx) + " (stretching)");
+      warning (_("big_slur too small ") + print_dimen (dx) + _(" (stretching)"));
       dx = 24 PT;
     }
-  
-  Real slur_extra =abs (dy)  /2.0 + 2; 
+
+  Real slur_extra =abs (dy)  /2.0 + 2;
   int l_dy = int (Real (dy)/2 + slur_extra*dir);
   int r_dy =  dy - l_dy;
 
@@ -228,8 +228,8 @@ Lookup::big_slur (int dy , Real &dx, Direction dir) const
   Real right_wid = left_wid;
 
   Atom l = half_slur (l_dy, left_wid, dir, -1);
-  
-   
+
+
   Atom r = half_slur (r_dy, right_wid, dir, 1);
   Real mid_wid = dx - left_wid - right_wid;
 
@@ -245,5 +245,3 @@ Lookup::big_slur (int dy , Real &dx, Direction dir) const
   s.dim_ = mol.extent();
   return s;
 }
-
-