 ;; Pro: Learned a bit about clojure list comprehensions
 ;; Con: This file is turning into something like a little monster
 
-(defn assoc-map [img-vector indices-to-colors]
+(defn assoc-map [img-vector indices-to-colors paste-transparent-pixels]
   (loop [img img-vector
          keys-to-assoc (vec (keys indices-to-colors))]
     (if (empty? keys-to-assoc)

              blit-x (- doc-x offset-x)
              blit-y (- doc-y offset-y)]
          (clear-preview-canvas)
          (set! (.-fillStyle preview-context) (get-in @app [:tools :paint-color]))
          (when (not selection-was-pasted)
            (.fillRect preview-context
               (* x1 zoom-factor)

     :image-data image-data}))


(defn paste-image [app owner doc-x doc-y sub-image paste-transparent-pixels]
  (let [main-image (canvas/get-current-pixels @app)
        main-image-width (get-in @app [:main-app :canvas-width])
        main-image-height (get-in @app [:main-app :canvas-height])
