I am a Clojure newbie, I want to draw a line and circle on the screen, and it should be anti-aliasing, how to do it? if someone can paste some sample codes to me?
A
Take a look at Quil. https://github.com/quil/quil
It is based on Processing http://processing.org and is easy to get working.
I think this does what you want...adapted from the example:
(ns foo
(:use quil.core))
(defn setup []
(smooth) ;;Turn on anti-aliasing
(frame-rate 10) ;;Set framerate to 10 FPS
(background 200)) ;;Set the background colour to
;; a nice shade of grey.
(defn draw []
(stroke 0) ;;Set the stroke colour to a black
(stroke-weight 3) ;;Set the stroke thickness to 3
(line 10 10 50 50)
(line 20 20 100 50))
(defsketch example ;;Define a new sketch named example
:title "foo" ;;Set the title of the sketch
:setup setup ;;Specify the setup fn
:draw draw ;;Specify the draw fn
:size [323 200])