Skip to main content

web_sys/features/
gen_SvgGeometryElement.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    #[wasm_bindgen(
8        extends = "SvgGraphicsElement",
9        extends = "SvgElement",
10        extends = "Element",
11        extends = "Node",
12        extends = "EventTarget",
13        extends = "::js_sys::Object",
14        js_name = "SVGGeometryElement",
15        typescript_type = "SVGGeometryElement"
16    )]
17    #[derive(Debug, Clone, PartialEq, Eq)]
18    #[doc = "The `SvgGeometryElement` class."]
19    #[doc = ""]
20    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement)"]
21    #[doc = ""]
22    #[doc = "*This API requires the following crate features to be activated: `SvgGeometryElement`*"]
23    pub type SvgGeometryElement;
24    #[cfg(feature = "SvgAnimatedNumber")]
25    #[wasm_bindgen(
26        method,
27        getter,
28        js_class = "SVGGeometryElement",
29        js_name = "pathLength"
30    )]
31    #[doc = "Getter for the `pathLength` field of this object."]
32    #[doc = ""]
33    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/pathLength)"]
34    #[doc = ""]
35    #[doc = "*This API requires the following crate features to be activated: `SvgAnimatedNumber`, `SvgGeometryElement`*"]
36    pub fn path_length(this: &SvgGeometryElement) -> SvgAnimatedNumber;
37    #[cfg(feature = "SvgPoint")]
38    #[wasm_bindgen(
39        catch,
40        method,
41        js_class = "SVGGeometryElement",
42        js_name = "getPointAtLength"
43    )]
44    #[doc = "The `getPointAtLength()` method."]
45    #[doc = ""]
46    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/getPointAtLength)"]
47    #[doc = ""]
48    #[doc = "*This API requires the following crate features to be activated: `SvgGeometryElement`, `SvgPoint`*"]
49    pub fn get_point_at_length(
50        this: &SvgGeometryElement,
51        distance: f32,
52    ) -> Result<SvgPoint, JsValue>;
53    #[wasm_bindgen(method, js_class = "SVGGeometryElement", js_name = "getTotalLength")]
54    #[doc = "The `getTotalLength()` method."]
55    #[doc = ""]
56    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/getTotalLength)"]
57    #[doc = ""]
58    #[doc = "*This API requires the following crate features to be activated: `SvgGeometryElement`*"]
59    pub fn get_total_length(this: &SvgGeometryElement) -> f32;
60    #[wasm_bindgen(method, js_class = "SVGGeometryElement", js_name = "isPointInFill")]
61    #[doc = "The `isPointInFill()` method."]
62    #[doc = ""]
63    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/isPointInFill)"]
64    #[doc = ""]
65    #[doc = "*This API requires the following crate features to be activated: `SvgGeometryElement`*"]
66    pub fn is_point_in_fill(this: &SvgGeometryElement) -> bool;
67    #[cfg(feature = "DomPointInit")]
68    #[wasm_bindgen(method, js_class = "SVGGeometryElement", js_name = "isPointInFill")]
69    #[doc = "The `isPointInFill()` method."]
70    #[doc = ""]
71    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/isPointInFill)"]
72    #[doc = ""]
73    #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `SvgGeometryElement`*"]
74    pub fn is_point_in_fill_with_point(this: &SvgGeometryElement, point: &DomPointInit) -> bool;
75    #[wasm_bindgen(method, js_class = "SVGGeometryElement", js_name = "isPointInStroke")]
76    #[doc = "The `isPointInStroke()` method."]
77    #[doc = ""]
78    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/isPointInStroke)"]
79    #[doc = ""]
80    #[doc = "*This API requires the following crate features to be activated: `SvgGeometryElement`*"]
81    pub fn is_point_in_stroke(this: &SvgGeometryElement) -> bool;
82    #[cfg(feature = "DomPointInit")]
83    #[wasm_bindgen(method, js_class = "SVGGeometryElement", js_name = "isPointInStroke")]
84    #[doc = "The `isPointInStroke()` method."]
85    #[doc = ""]
86    #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/SVGGeometryElement/isPointInStroke)"]
87    #[doc = ""]
88    #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `SvgGeometryElement`*"]
89    pub fn is_point_in_stroke_with_point(this: &SvgGeometryElement, point: &DomPointInit) -> bool;
90}