/
SVGGraphicsElement.cljs
38 lines (29 loc) · 1.08 KB
/
SVGGraphicsElement.cljs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
(ns web.svg.SVGGraphicsElement
"The SVGGraphicsElement interface represents SVG elements whose
purpose is to directly render graphics into a group."
(:refer-clojure :exclude []))
(defn get-b-box
"Method.
The SVGGraphicsElement.getBBox() allows us to determine the coordinates
the smallest rectangle in which the object fits. The coordinates
are with respect to the current svg space, i.e. after the application
all geometry attributes on all the elements contained in the
element.
`let bboxRect = object.getBBox();`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/SVGGraphicsElement/getBBox`"
[this ]
(-> this (.getBBox)))
(defn transform
"Property.
An SVGAnimatedTransformList reflecting the computed value of
transform property and its corresponding transform attribute
the given element."
[this]
(-> this (.transform)))
(defn set-transform!
"Property.
An SVGAnimatedTransformList reflecting the computed value of
transform property and its corresponding transform attribute
the given element."
[this val]
(aset this "transform" val))