com.phronemophobic.clj-media.java2d

graphics->media

(graphics->media drawf coll)(graphics->media drawf {:keys [fps width height], :as opts} coll)

Creates a media by calling drawf with a Graphics2D and each element of coll. drawf should draw the current frame. The return value is ignored.

The following options are available: :fps frames per second. default: 24. :width width of the media. default: 100. :height height of the media. default 100.

Example:

(graphics->media (fn ^Graphics2D g frameno (.setColor g Color/white) (.fillRect g 0 0 100 100) (.setColor g Color/black) (.drawString g "Hello World" 5 50)) (range 24))