(diff-translate point origin-vector target-vector)
Return a point translated by the vector difference of target and origin as the translation (both orign and target are vectors drawn from (0,0)).
Return a point translated by the vector difference of target and origin as the translation (both orign and target are vectors drawn from (0,0)).
(diff-translate-rect rect origin target)
Return a rectangle translated by the vector difference of target - origin.
Return a rectangle translated by the vector difference of target - origin.
(draw-rect ctx rect style)
Draw a rectangle with a style (:solid-white, :solid-black, :solid, or :dashed)
Draw a rectangle with a style (:solid-white, :solid-black, :solid, or :dashed)
(event->dom-coords evt dom-ele)
Translate a javascript evt to a clj {:x x :y y} map within the given dom element.
Translate a javascript evt to a clj {:x x :y y} map within the given dom element.
(height rect)
(inside-rect? rect coords)
Check if the rectangle (with :ul and :lr) contains the given coord (:x :y)
Check if the rectangle (with :ul and :lr) contains the given coord (:x :y)
(max-rect bounding-rect aspect-ratio)
Return the largest rectangle that fits in bounding-rect but has the given aspect ratio (w/h)
Return the largest rectangle that fits in bounding-rect but has the given aspect ratio (w/h)
(new-handle {:keys [x y] :as point} sz)
Creates a new control handle, centered at point, of size sz
Creates a new control handle, centered at point, of size sz
(rect-midpoint rect)
(width rect)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close