Hey all,

Spent most of yesterday trying to draw a chessboard on a paintable canvas, however I'm stuck after drawing the lines of the grid...I mean the grid is there but its all one colour (the background colour of the panel)! The fn that draws the lines is simply this:

(defn draw-grid [c g]
  (let [w (width c)
        h (height c)]
    (doseq [x (range 0 w 50)]
      (.drawLine g x 0 x h))
    (doseq [y (range 0 h 50)]
        (.drawLine g 0 y w y))))

Does anyone have any suggestions as to how to do the black-white alteration on the grid? I know how to do it imperatively using loop(s) and a couple of flags but I'm really struggling to tweak the 'draw-grid' accordingly to paint the colours as well...

Any seesaw gurus? -> please help...

cheers,
Jim

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to