Skip to content

Commit

Permalink
[#15] text drawing function
Browse files Browse the repository at this point in the history
  • Loading branch information
jfacorro committed Nov 24, 2018
1 parent 3aa5a68 commit d21ca53
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/doodler/core.clje
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,19 @@
#erl[(- x (erlang/div w 2)) (- y (erlang/div h 2))]
#erl[w h]))

(defn point
[x y]
(wxDC/drawPoint *canvas* (tuple x y)))

(defn rect
([x y w h]
(wxDC/drawRectangle *canvas* #erl[x y] #erl[w h]))
([x y w h r]
(wxDC/drawRoundedRectangle *canvas* #erl[x y] #erl[w h] r)))

(defn point
[x y]
(wxDC/drawPoint *canvas* (tuple x y)))
(defn text
[s x y]
(wxDC/drawText *canvas* s #erl[x y]))

(defn width
[]
Expand Down

0 comments on commit d21ca53

Please sign in to comment.