Refactor shapes attributes handling.

This commit is contained in:
Andrey Antukh 2017-01-05 23:21:05 +01:00
parent b3d995de53
commit 28d18a07a0
No known key found for this signature in database
GPG key ID: 4DFEBCB8316A8B95
14 changed files with 440 additions and 543 deletions

View file

@ -31,6 +31,7 @@
;; --- Rect Shape
(defn- rotate
;; TODO: revisit, i'm not sure if this function is duplicated.
[mt {:keys [x1 y1 x2 y2 width height rotation] :as shape}]
(let [x-center (+ x1 (/ width 2))
y-center (+ y1 (/ height 2))