mirror of
https://github.com/penpot/penpot.git
synced 2025-01-24 23:49:45 -05:00
Add missing arity for transform method.
This commit is contained in:
parent
1abc0e4239
commit
f406ec2621
1 changed files with 7 additions and 4 deletions
|
@ -78,7 +78,10 @@
|
|||
|
||||
(defn translate
|
||||
"Apply translate transformation to the matrix."
|
||||
[m pt]
|
||||
(assoc m
|
||||
:tx (+ (:tx m) (* (:x pt) (:a m)) (* (:y pt) (:b m)))
|
||||
:ty (+ (:ty m) (* (:x pt) (:c m)) (* (:y pt) (:d m)))))
|
||||
([m pt]
|
||||
(let [pt (gpt/-point pt)]
|
||||
(assoc m
|
||||
:tx (+ (:tx m) (* (:x pt) (:a m)) (* (:y pt) (:b m)))
|
||||
:ty (+ (:ty m) (* (:x pt) (:c m)) (* (:y pt) (:d m))))))
|
||||
([m x y]
|
||||
(translate m (gpt/point x y))))
|
||||
|
|
Loading…
Add table
Reference in a new issue