web_sys/features/
gen_DomQuadInit.rs

1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7    # [wasm_bindgen (extends = :: js_sys :: Object , js_name = DOMQuadInit)]
8    #[derive(Debug, Clone, PartialEq, Eq)]
9    #[doc = "The `DomQuadInit` dictionary."]
10    #[doc = ""]
11    #[doc = "*This API requires the following crate features to be activated: `DomQuadInit`*"]
12    pub type DomQuadInit;
13    #[cfg(feature = "DomPointInit")]
14    #[doc = "Get the `p1` field of this object."]
15    #[doc = ""]
16    #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"]
17    #[wasm_bindgen(method, getter = "p1")]
18    pub fn get_p1(this: &DomQuadInit) -> Option<DomPointInit>;
19    #[cfg(feature = "DomPointInit")]
20    #[doc = "Change the `p1` field of this object."]
21    #[doc = ""]
22    #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"]
23    #[wasm_bindgen(method, setter = "p1")]
24    pub fn set_p1(this: &DomQuadInit, val: &DomPointInit);
25    #[cfg(feature = "DomPointInit")]
26    #[doc = "Get the `p2` field of this object."]
27    #[doc = ""]
28    #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"]
29    #[wasm_bindgen(method, getter = "p2")]
30    pub fn get_p2(this: &DomQuadInit) -> Option<DomPointInit>;
31    #[cfg(feature = "DomPointInit")]
32    #[doc = "Change the `p2` field of this object."]
33    #[doc = ""]
34    #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"]
35    #[wasm_bindgen(method, setter = "p2")]
36    pub fn set_p2(this: &DomQuadInit, val: &DomPointInit);
37    #[cfg(feature = "DomPointInit")]
38    #[doc = "Get the `p3` field of this object."]
39    #[doc = ""]
40    #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"]
41    #[wasm_bindgen(method, getter = "p3")]
42    pub fn get_p3(this: &DomQuadInit) -> Option<DomPointInit>;
43    #[cfg(feature = "DomPointInit")]
44    #[doc = "Change the `p3` field of this object."]
45    #[doc = ""]
46    #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"]
47    #[wasm_bindgen(method, setter = "p3")]
48    pub fn set_p3(this: &DomQuadInit, val: &DomPointInit);
49    #[cfg(feature = "DomPointInit")]
50    #[doc = "Get the `p4` field of this object."]
51    #[doc = ""]
52    #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"]
53    #[wasm_bindgen(method, getter = "p4")]
54    pub fn get_p4(this: &DomQuadInit) -> Option<DomPointInit>;
55    #[cfg(feature = "DomPointInit")]
56    #[doc = "Change the `p4` field of this object."]
57    #[doc = ""]
58    #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"]
59    #[wasm_bindgen(method, setter = "p4")]
60    pub fn set_p4(this: &DomQuadInit, val: &DomPointInit);
61}
62impl DomQuadInit {
63    #[doc = "Construct a new `DomQuadInit`."]
64    #[doc = ""]
65    #[doc = "*This API requires the following crate features to be activated: `DomQuadInit`*"]
66    pub fn new() -> Self {
67        #[allow(unused_mut)]
68        let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
69        ret
70    }
71    #[cfg(feature = "DomPointInit")]
72    #[deprecated = "Use `set_p1()` instead."]
73    pub fn p1(&mut self, val: &DomPointInit) -> &mut Self {
74        self.set_p1(val);
75        self
76    }
77    #[cfg(feature = "DomPointInit")]
78    #[deprecated = "Use `set_p2()` instead."]
79    pub fn p2(&mut self, val: &DomPointInit) -> &mut Self {
80        self.set_p2(val);
81        self
82    }
83    #[cfg(feature = "DomPointInit")]
84    #[deprecated = "Use `set_p3()` instead."]
85    pub fn p3(&mut self, val: &DomPointInit) -> &mut Self {
86        self.set_p3(val);
87        self
88    }
89    #[cfg(feature = "DomPointInit")]
90    #[deprecated = "Use `set_p4()` instead."]
91    pub fn p4(&mut self, val: &DomPointInit) -> &mut Self {
92        self.set_p4(val);
93        self
94    }
95}
96impl Default for DomQuadInit {
97    fn default() -> Self {
98        Self::new()
99    }
100}