         pointsColors.append((p,c))
     }
     
-    for x in 0...Int(b.width) {
-        for y in 0...Int(b.height) {
+    for x in 0...w-1 {
+        for y in 0...h-1 {
             
             var dmin = CGFloat.max
             var color = NSColor.clearColor()
             
             for (p,c) in pointsColors {
-                let d = hypot(p.x-x, p.y-y)
+                let d = hypot(p.x - x, p.y - y)
                 if d < dmin {
                     dmin = d
                     color = c

    }
    
    for (p,_) in pointsColors {
        let rect = R(p.x-2, p.y-2, 4, 4)
        b.ellipse(rect, stroke:"black", fill:"black")
    }
    

    
    b.image(fromPath: "/Users/nst/Projects/BitmapCanvas/files/switzerland.gif", P(0,0))
    
    b.text("2016-02-28 \"Pas de spéculation sur les denrées alimentaires\"", P(5,220))
    
    let values : [Double] = results.flatMap { (k,v) in v as? Double }
    
