Swing 使用抗锯齿绘制线

Swing 使用抗锯齿绘制线,swing,clojure,Swing,Clojure,我是一个Clojure新手,我想在屏幕上画一条线和一个圆,它应该是反锯齿的,怎么做?如果有人可以粘贴一些样本代码给我 另一个问题,我定义了一个地图: (def {:a 1, :b 2, :c 3}, i try to change it to be {:a 1, :b 99, :c 3}, 怎么做?看看奎尔 它基于加工,易于工作 我想这正是你想要的…改编自以下示例: (ns foo (:use quil.core)) (defn setup [] (smooth)

我是一个Clojure新手,我想在屏幕上画一条线和一个圆,它应该是反锯齿的,怎么做?如果有人可以粘贴一些样本代码给我

另一个问题,我定义了一个地图:

(def {:a 1, :b 2, :c 3}, i try to change it to be {:a 1, :b 99, :c 3},
怎么做?

看看奎尔

它基于加工,易于工作

我想这正是你想要的…改编自以下示例:

(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])