diff doodle/dia/grid_layer.d @ 41:f2e4e1d29b98

Bah
author daveb
date Tue, 01 Jun 2010 17:21:01 +0930
parents 452915ecd1f4
children 1b4c9ba58673
line wrap: on
line diff
--- a/doodle/dia/grid_layer.d	Mon Apr 12 14:01:54 2010 +0930
+++ b/doodle/dia/grid_layer.d	Tue Jun 01 17:21:01 2010 +0930
@@ -47,11 +47,9 @@
             {
                 // vertical grid lines
                 double x = start(model_damage.min_corner.x, mSpacing);
-                double y0 = model_damage.min_corner.y;
-                double y1 = model_damage.max_corner.y;
 
                 for (;;) {
-                    vline(model_cr, x, y0, y1);
+                    vline(model_cr, x, model_damage.min_corner.y, model_damage.max_corner.y);
 
                     // Ensure 1 pixel wide FIXME is this naughty? We are sneaking
                     // through cairo to mix model and pixel coordinates...
@@ -71,12 +69,11 @@
             {
                 // horizontal grid lines
                 double y = start(model_damage.min_corner.y, mSpacing);
-                double x0 = model_damage.min_corner.x;
-                double x1 = model_damage.max_corner.x;
 
                 for (;;) {
-                    hline(model_cr, y, x0, x1);
+                    hline(model_cr, y, model_damage.min_corner.x, model_damage.max_corner.x);
 
+                    // FIXME?
                     model_cr.save(); {
                         model_cr.scale(1.0 / xx, 1.0 / yy);
                         model_cr.stroke();
@@ -99,7 +96,7 @@
         mZoomValid = true;
 
         // FIXME compute spacing properly
-        mSpacing = 10.0 / mZoom;        // mm
+        mSpacing = 20.0 / mZoom;        // mm
     }
 
     // FIXME use inout parameter?