1.2.3-SNAPSHOT permalink Arrow_down_16x16

with-translation

incanter.processing

  • (with-translation sketch translation-vector & body)
Performs body with translation, restores current transformation on exit.

0 Examples top

Log in to add / edit an example.

See Also top

Log in to add a see also.

Plus_12x12 Minus_12x12 Source incanter/processing.clj:1408 top

(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#))))
Vars in incanter.processing/with-translation: defmacro apply concat let list seq vector
Used in 0 other vars

Comments top

No comments for with-translation. Log in to add a comment.