                 return
             }
 
-            NSColor.whiteColor().setFill()
-            NSRectFill(NSRect(origin: CGPoint(), size: size))
-
-            CGContextScaleCTM(context, size.width / CGFloat(currentSize.0), size.height / CGFloat(currentSize.1))
+            CGContextClearRect(context, CGRect(origin: CGPoint(), size: size))
 
 
-            NSColor.grayColor().setFill()
-            NSColor.grayColor().set()
+            CGContextTranslateCTM(context,
+                (size.width -  CGFloat(currentScaled.0)) / 2,
+                (size.height - CGFloat(currentScaled.1)) / 2)
+            CGContextScaleCTM(context, CGFloat(currentScaled.0 / currentSize.0), CGFloat(currentScaled.1 / currentSize.1))
+
+
+            CGContextSetRGBFillColor(context, 1, 1, 1, 1)
+            CGContextFillRect(context, CGRect(x: 0, y: 0, width: currentSize.0, height: currentSize.1))
+
+            CGContextSetRGBFillColor(context, 0.5,0.5,0.5,1)
+            CGContextSetRGBStrokeColor(context, 0.5,0.5,0.5,1)
+
             CGContextSetLineWidth(context, 9)
             for path in paths {
                 path.draw(context)

final public class SnapshotCollector : RuntimeListener {

    private let maxSize : (Int, Int)
    private var currentSize : (Int, Int) = (0,0)
    private var currentScaled : (Double, Double) = (0,0)
    private(set) var snapshots = [InstructionNodeKey:NSImage]()
    private(set) var instructions = Set<InstructionNodeKey>()


    func imageFor(key: InstructionNodeKey) -> NSImage {
        guard let image = snapshots[key] else {
            let image = NSImage(size: NSSize(width: CGFloat(maxSize.0), height: CGFloat(maxSize.1)))
            snapshots[key] = image
            return image
        }
