]> git.donarmstrong.com Git - lilypond.git/commitdiff
Gets rid of dot stencil command
authorMike Solomon <mike@apollinemike.com>
Mon, 6 Feb 2012 13:57:45 +0000 (14:57 +0100)
committerMike Solomon <mike@apollinemike.com>
Mon, 6 Feb 2012 13:57:45 +0000 (14:57 +0100)
lily/include/lookup.hh
lily/lookup.cc
ps/music-drawing-routines.ps
scm/define-stencil-commands.scm
scm/output-ps.scm

index 0d13b037a3da8e01c0a9815a80d598af074a1191..f95a7e2a407981456551a51788163e1da8f7a95b 100644 (file)
@@ -26,8 +26,8 @@
 
 struct Lookup
 {
-  static Stencil dot (Offset p, Real radius);
   static Stencil bracket (Axis a, Interval iv, Real thick, Real protrude, Real blot);
+  static Stencil circle (Real rad, Real thick, bool filled);
   static Stencil rotated_box (Real slope, Real width, Real thick, Real blot);
   static Stencil round_filled_polygon (vector<Offset> const &points, Real blotdiameter);
   static Stencil frame (Box b, Real thick, Real blot);
index f19e4d2703885095a3eecf42e974a95e6c7489fa..3f393e05ac058d3d0115e4934589543a1cc4b744 100644 (file)
@@ -33,20 +33,6 @@ using namespace std;
 #include "main.hh"
 #include "lily-guile.hh"
 
-Stencil
-Lookup::dot (Offset p, Real radius)
-{
-  SCM at = (scm_list_n (ly_symbol2scm ("dot"),
-                        scm_from_double (p[X_AXIS]),
-                        scm_from_double (p[Y_AXIS]),
-                        scm_from_double (radius),
-                        SCM_UNDEFINED));
-  Box box;
-  box.add_point (p - Offset (radius, radius));
-  box.add_point (p + Offset (radius, radius));
-  return Stencil (box, at);
-}
-
 Stencil
 Lookup::beam (Real slope, Real width, Real thick, Real blot)
 {
@@ -137,6 +123,16 @@ Lookup::blank (Box b)
   return Stencil (b, scm_from_locale_string (""));
 }
 
+Stencil
+Lookup::circle (Real rad, Real thick, bool filled)
+{
+  Box b (Interval (-rad, rad), Interval (-rad, rad));
+  return Stencil (b, scm_list_4 (ly_symbol2scm ("circle"),
+                                 scm_from_double (rad),
+                                 scm_from_double (thick),
+                                 scm_from_bool (filled)));
+}
+
 Stencil
 Lookup::filled_box (Box b)
 {
@@ -254,7 +250,11 @@ Lookup::round_filled_polygon (vector<Offset> const &points,
   if (points.size () == 0)
     return Stencil ();
   if (points.size () == 1)
-    return dot (points[0], 0.5 * blotdiameter);
+    {
+      Stencil circ = circle (0.5 * blotdiameter, 0, true);
+      circ.translate (points[0]);
+      return circ;
+    }
   if (points.size () == 2)
     return Line_interface::make_line (blotdiameter, points[0], points[1]);
 
index 7d491e56885128b320a0073d820c26c58454c489..a06e7b158c724e54f4393e1e142657526bbad8c3 100644 (file)
@@ -171,14 +171,6 @@ bind def
        grestore
 } bind def
 
-/draw_dot % radius x y draw_dot
-{
-       rmoveto
-       currentpoint
-       3 2 roll
-       0 360 arc closepath stroke_and_fill
-} bind def
-
 /draw_circle % filled? radius thickness draw_circle
 {
        setlinewidth    % f? r
index 3e022f9678f30a134dd7aa0c8ee98b401cbce1c2..c3a835534d7029318a18e25fe3dcd2f5817901f0 100644 (file)
@@ -26,7 +26,6 @@ defined in the output modules (@file{output-*.scm})."
     char
     circle
     dashed-line
-    dot
     draw-line
     ellipse
     embedded-ps
index c4a15c52532ab34f65d6397253bca74aae0a84ca..48b7f7a3f30d2c1c9427aaba9a0531594ada0511 100644 (file)
@@ -92,9 +92,6 @@
    off
    phase))
 
-(define (dot x y radius)
-  (ly:format " ~4l draw_dot" (list radius x y)))
-
 (define (draw-line thick x1 y1 x2 y2)
   (ly:format "~4f ~4f ~4f ~4f ~4f draw_line"
          (- x2 x1) (- y2 y1)