Skip to content

Instantly share code, notes, and snippets.

@alamar
Created December 12, 2011 20:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save alamar/1469066 to your computer and use it in GitHub Desktop.
Save alamar/1469066 to your computer and use it in GitHub Desktop.
a slow cycle
(defn color [r g b]
(Color. r g b 0xFF))
(def white (.getRGB (color 0xFF 0xFF 0xFF)))
(defn create-image [w h]
(let [image (BufferedImage. w h BufferedImage/TYPE_INT_RGB)]
(doseq [x (range w) y (range h)]
(.setRGB image x y white))
image))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment