diff doodle/fig/select_tool.d @ 81:d92b9f04b1e8

Bed time
author "David Bryant <bagnose@gmail.com>"
date Mon, 16 Aug 2010 00:04:27 +0930
parents b759414d2b72
children cdd4fc728d94
line wrap: on
line diff
--- a/doodle/fig/select_tool.d	Sun Aug 15 23:43:04 2010 +0930
+++ b/doodle/fig/select_tool.d	Mon Aug 16 00:04:27 2010 +0930
@@ -4,10 +4,6 @@
     import doodle.dia.tool;
 }
 
-private {
-    import doodle.tk.cairo;
-}
-
 final class SelectTool : Tool {
     this() {
         super("Select");
@@ -49,37 +45,19 @@
 
     override void draw(in Rectangle screenDamage, scope Drawable screenDrawable) const {
         if (_active) {
-            /*
-               screenCr.save; {
-               screenCr.setSourceRgba(0.0, 0.0, 0.8, 0.3);
-               rectangle(screenCr, Rectangle(_currentPoint, _anchorPoint));
-               screenCr.fill();
-               } screenCr.restore();
-             */
-
             screenDrawable.pushState; {
+                screenDrawable.setLineStyle(Drawable.LineStyle.DASHED);
                 screenDrawable.setLineWidth(LINE_WIDTH);
                 screenDrawable.setColor(Color(0.0, 0.0, 0.5, 1.0));
                 screenDrawable.drawRectangle(Rectangle(_currentPoint, _anchorPoint), false);
             } screenDrawable.popState;
-
-            /*
-            screenCr.save(); {
-                double[] dashes = [ 4.0, 4.0 ];
-                screenCr.setDash(dashes, 0.0);
-                screenCr.setSourceRgba(0.0, 0.0, 0.5, 1.0);
-                screenCr.setLineWidth(LINE_WIDTH);
-                rectangle(screenCr, Rectangle(_currentPoint, _anchorPoint));
-                screenCr.stroke;
-            } screenCr.restore;
-            */
         }
     }
 
     private {
         bool _active;
         Point _currentPoint;
-        Point _anchorPoint;      // Pixel
+        Point _anchorPoint;
         static immutable double LINE_WIDTH = 1.0;
     }
 }