0.1.0-SNAPSHOT permalink Arrow_down_16x16

paint-donut

clj-swing.example

  • (paint-donut g)

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source clj_swing/example.clj:21 top

(defn paint-donut [g]
  (let [width 360
	height 310
	ellipse (new java.awt.geom.Ellipse2D$Double 0 0 80 130)
	at (AffineTransform/getTranslateInstance (/ width 2) (/ height 2))]
    (doto g
      (.setStroke (BasicStroke. 1))
      (.setColor (. Color gray)))
    (doseq [i (range 0 361 5)]
      (.rotate g (Math/toRadians i))
      (.draw g (.createTransformedShape at ellipse)))))
Vars in clj-swing.example/paint-donut: defn doseq doto let
Used in 0 other vars

Comments top

No comments for paint-donut. Log in to add a comment.