                           (update-size)))))
   size-atom)
 
-(defn reflect-changes [canvas screen-state]
-  (add-watch screen-state "display"
-    (fn [_ _ _ new-state]
-      (.repaint canvas))))     
-
-(defn main-canvas [screen-state]
+(defn display-follow [canvas reference]
+  (add-watch reference "display"
+    (fn [_ _ _ _]
+      (.repaint canvas))))
+
+(defn main-canvas [screen-state visible-tiles]
   (doto
     (proxy [Canvas] []
-      (paint [^Graphics g] (paint-screen this screen-state)))
+      (paint [^Graphics g] (paint-screen this screen-state visible-tiles)))
     (.setBackground Color/BLACK)))
     
 (defn main-frame []

                   (int 0)
                   (int (- (:height @screen-state) 10))))))
  
(defn paint-screen [canvas screen-state]
  (paint-tiles canvas screen-state))

(defn handle-drags [component position-atom]
  (let [drag-origin (atom nil)
        mouse-adapter

                           RenderingHints/VALUE_ANTIALIAS_ON
                           RenderingHints/VALUE_ANTIALIAS_OFF)))))
       
(defn paint-tiles [^Graphics2D g visible-tiles]
  (doseq [[[nx ny nz nt nc nzoom] tagged-image] visible-tiles]
    (let [[x y] (tile-to-pixels [nx ny] [512 512])]
      (when tagged-image
        (.drawImage g (awt-image tagged-image)
                    x y nil)))))

(defn paint-screen [canvas screen-state visible-tiles]
  (let [g (.getGraphics canvas)
        image @slide-explorer.image/image]
    (doto g
      (.translate (:x @screen-state) (:y @screen-state))
      enable-anti-aliasing
      (paint-tiles @visible-tiles)
      (.translate (- (:x @screen-state)) (- (:y @screen-state)))
      (.setColor (Color. 0x00A08F))
      (.fillOval (- (+ (/ (:width @screen-state) 2)
                       (:x @screen-state))
