(defmacro with-translation
"Performs body with translation, restores current transformation on exit."
([^PApplet sketch translation-vector & body]
`(let [tr# ~translation-vector
sk# ~sketch]
(push-matrix sk#)
(translate sk# tr#)
~@body
(pop-matrix sk#))))
Comments top
No comments for with-translation. Log in to add a comment.