Skip to content

Commit

Permalink
[#54] Add image example
Browse files Browse the repository at this point in the history
  • Loading branch information
jfacorro committed Oct 23, 2023
1 parent 83db16d commit f9c674f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/doodler/examples/image.clje
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
;; Source: https://github.com/quil/quil/blob/master/README.md
(ns doodler.examples.image
(:require [doodler.core :as d]))

(defn setup
[]
(d/frame-rate 60))

(defn draw []
(d/background 200)
(d/text (str (d/current-frame-rate)) 0 10)
(let [img (d/load-image "resources/pacman.png")]
(d/image img 10 10 50 50)))

(d/defsketch sketch
:title "Load image"
:size [323 200]
:setup setup
:draw draw
:features [:resizable :keep-on-top]
:bgcolor [200])

0 comments on commit f9c674f

Please sign in to comment.