-
Notifications
You must be signed in to change notification settings - Fork 0
/
SVGGeometryElement.cljs
86 lines (61 loc) · 2.86 KB
/
SVGGeometryElement.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
(ns web.svg.SVGGeometryElement
"The SVGGeometryElement interface represents SVG elements whose
is defined by geometry with an equivalent path, and which can
filled and stroked. This includes paths and the basic shapes."
(:refer-clojure :exclude []))
(defn is-point-in-fill
"Method.
The SVGGeometryElement.isPointInFill() method determines whether
given point is within the fill shape of an element. Normal hit
rules apply; the value of the `pointer-events` property on the
determines whether a point is considered to be within the fill.
point argument is interpreted as a point in the local coordiante
of the element.
`boolean someElement.isPointInFill(DOMPointInit point);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/isPointInFill`"
[this & args]
(-> this .-isPointInFill (.apply this (clj->js args))))
(defn is-point-in-stroke
"Method.
The SVGGeometryElement.isPointInStroke() method determines whether
given point is within the stroke shape of an element. Normal
testing rules apply; the value of the `pointer-events` property
the element determines whether a point is considered to be within
stroke. The point argument is interpreted as a point in the local
system of the element.
`boolean someElement.isPointInStroke(DOMPointInit point);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/isPointInStroke`"
[this & args]
(-> this .-isPointInStroke (.apply this (clj->js args))))
(defn get-total-length
"Method.
The SVGGeometryElement.getTotalLength() method returns the user
computed value for the total length of the path in user units.
`float someElement.getTotalLength();`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/getTotalLength`"
[this ]
(-> this (.getTotalLength)))
(defn get-point-at-length
"Method.
The SVGGeometryElement.getPointAtLength() method returns the
at a given distance along the path.
`DOMPoint someElement.getPointAtLength(float distance);`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/getPointAtLength`"
[this & args]
(-> this .-getPointAtLength (.apply this (clj->js args))))
(defn path-length
"Property.
The SVGGeometryElement.pathLength property reflects the pathLength
and returns the total length of the path, in user units.
`var pathLength = someElement.pathLength;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/pathLength`"
[this]
(-> this (.-pathLength)))
(defn set-path-length!
"Property.
The SVGGeometryElement.pathLength property reflects the pathLength
and returns the total length of the path, in user units.
`var pathLength = someElement.pathLength;`
See also: `https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/pathLength`"
[this val]
(aset this "pathLength" val))