mirror of
https://github.com/penpot/penpot.git
synced 2025-01-08 07:50:43 -05:00
17 lines
308 B
Clojure
17 lines
308 B
Clojure
(ns uxbox.svg)
|
|
|
|
(defn translate
|
|
[x y]
|
|
(str "translate(" x "," y ")"))
|
|
|
|
(defn rotate
|
|
[d]
|
|
(str "rotate(" d ")"))
|
|
|
|
(defn transform
|
|
[{:keys [center] :as opts}]
|
|
(let [r (get opts :rotate 0)
|
|
{:keys [x y]} center]
|
|
(str (translate x y)
|
|
(rotate r)
|
|
(translate (- x) (- y)))))
|