]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lookup.cc
Moving files into input/manual/
[lilypond.git] / lily / lookup.cc
index e5fda585958fc02ec82b6b0a08606bb04bc8f259..d8c20c044fcd871b36f831b83adf022ed28c0c54 100644 (file)
@@ -110,6 +110,22 @@ Lookup::dashed_slur (Bezier b, Real thick, Real dash_period, Real dash_fraction)
   return Stencil (box, at);
 }
 
+Stencil
+Lookup::rotated_box (Real slope, Real width, Real thick, Real blot)
+{
+  vector<Offset> pts;
+  Offset rot (1, slope);
+
+  thick -= 2*blot;
+  width -= 2*blot;
+  rot /= sqrt (1 + slope*slope);
+  pts.push_back (Offset (0, -thick / 2) * rot);
+  pts.push_back (Offset (width, -thick / 2) * rot);
+  pts.push_back (Offset (width, thick / 2) * rot);
+  pts.push_back (Offset (0, thick / 2) * rot);
+  return Lookup::round_filled_polygon (pts, blot);
+}
+
 Stencil
 Lookup::horizontal_line (Interval w, Real th)
 {
@@ -227,7 +243,7 @@ Lookup::round_filled_box (Box b, Real blotdiameter)
  * shrinked polygon). --jr
  */
 Stencil
-Lookup::round_filled_polygon (std::vector<Offset> const &points,
+Lookup::round_filled_polygon (vector<Offset> const &points,
                              Real blotdiameter)
 {
   /* TODO: Maybe print a warning if one of the above limitations
@@ -256,7 +272,7 @@ Lookup::round_filled_polygon (std::vector<Offset> const &points,
     return Line_interface::make_line (blotdiameter, points[0], points[1]);
 
   /* shrink polygon in size by 0.5 * blotdiameter */
-  std::vector<Offset> shrunk_points;
+  vector<Offset> shrunk_points;
   shrunk_points.resize (points.size ());
   bool ccw = 1; // true, if three adjacent points are counterclockwise ordered
   for (vsize i = 0; i < points.size (); i++)
@@ -451,8 +467,8 @@ Stencil
 Lookup::accordion (SCM s, Real staff_space, Font_metric *fm)
 {
   Stencil m;
-  std::string sym = ly_scm2string (scm_car (s));
-  std::string reg = ly_scm2string (scm_car (scm_cdr (s)));
+  string sym = ly_scm2string (scm_car (s));
+  string reg = ly_scm2string (scm_car (scm_cdr (s)));
 
   if (sym == "Discant")
     {
@@ -649,7 +665,7 @@ Stencil
 Lookup::repeat_slash (Real w, Real s, Real t)
 {
 #if 0 /*  TODO */
-  std::vector<Offset> points;
+  vector<Offset> points;
   Real blotdiameter = 0.0;
 
   Offset p1 (0, 0);