1 #![allow(unused_imports)]
2 use super::*;
3 use wasm_bindgen::prelude::*;
4 #[wasm_bindgen]
5 extern "C" {
6     # [wasm_bindgen (extends = :: js_sys :: Object , js_name = DOMQuadInit)]
7     #[derive(Debug, Clone, PartialEq, Eq)]
8     #[doc = "The `DomQuadInit` dictionary."]
9     #[doc = ""]
10     #[doc = "*This API requires the following crate features to be activated: `DomQuadInit`*"]
11     pub type DomQuadInit;
12 }
13 impl DomQuadInit {
14     #[doc = "Construct a new `DomQuadInit`."]
15     #[doc = ""]
16     #[doc = "*This API requires the following crate features to be activated: `DomQuadInit`*"]
new() -> Self17     pub fn new() -> Self {
18         #[allow(unused_mut)]
19         let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
20         ret
21     }
22     #[cfg(feature = "DomPointInit")]
23     #[doc = "Change the `p1` field of this object."]
24     #[doc = ""]
25     #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"]
p1(&mut self, val: &DomPointInit) -> &mut Self26     pub fn p1(&mut self, val: &DomPointInit) -> &mut Self {
27         use wasm_bindgen::JsValue;
28         let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("p1"), &JsValue::from(val));
29         debug_assert!(
30             r.is_ok(),
31             "setting properties should never fail on our dictionary objects"
32         );
33         let _ = r;
34         self
35     }
36     #[cfg(feature = "DomPointInit")]
37     #[doc = "Change the `p2` field of this object."]
38     #[doc = ""]
39     #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"]
p2(&mut self, val: &DomPointInit) -> &mut Self40     pub fn p2(&mut self, val: &DomPointInit) -> &mut Self {
41         use wasm_bindgen::JsValue;
42         let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("p2"), &JsValue::from(val));
43         debug_assert!(
44             r.is_ok(),
45             "setting properties should never fail on our dictionary objects"
46         );
47         let _ = r;
48         self
49     }
50     #[cfg(feature = "DomPointInit")]
51     #[doc = "Change the `p3` field of this object."]
52     #[doc = ""]
53     #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"]
p3(&mut self, val: &DomPointInit) -> &mut Self54     pub fn p3(&mut self, val: &DomPointInit) -> &mut Self {
55         use wasm_bindgen::JsValue;
56         let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("p3"), &JsValue::from(val));
57         debug_assert!(
58             r.is_ok(),
59             "setting properties should never fail on our dictionary objects"
60         );
61         let _ = r;
62         self
63     }
64     #[cfg(feature = "DomPointInit")]
65     #[doc = "Change the `p4` field of this object."]
66     #[doc = ""]
67     #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `DomQuadInit`*"]
p4(&mut self, val: &DomPointInit) -> &mut Self68     pub fn p4(&mut self, val: &DomPointInit) -> &mut Self {
69         use wasm_bindgen::JsValue;
70         let r = ::js_sys::Reflect::set(self.as_ref(), &JsValue::from("p4"), &JsValue::from(val));
71         debug_assert!(
72             r.is_ok(),
73             "setting properties should never fail on our dictionary objects"
74         );
75         let _ = r;
76         self
77     }
78 }
79