web_sys/features/
gen_SvgBoundingBoxOptions.rs1#![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 = SVGBoundingBoxOptions)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `SvgBoundingBoxOptions` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"]
12 pub type SvgBoundingBoxOptions;
13 #[doc = "Get the `clipped` field of this object."]
14 #[doc = ""]
15 #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"]
16 #[wasm_bindgen(method, getter = "clipped")]
17 pub fn get_clipped(this: &SvgBoundingBoxOptions) -> Option<bool>;
18 #[doc = "Change the `clipped` field of this object."]
19 #[doc = ""]
20 #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"]
21 #[wasm_bindgen(method, setter = "clipped")]
22 pub fn set_clipped(this: &SvgBoundingBoxOptions, val: bool);
23 #[doc = "Get the `fill` field of this object."]
24 #[doc = ""]
25 #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"]
26 #[wasm_bindgen(method, getter = "fill")]
27 pub fn get_fill(this: &SvgBoundingBoxOptions) -> Option<bool>;
28 #[doc = "Change the `fill` field of this object."]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"]
31 #[wasm_bindgen(method, setter = "fill")]
32 pub fn set_fill(this: &SvgBoundingBoxOptions, val: bool);
33 #[doc = "Get the `markers` field of this object."]
34 #[doc = ""]
35 #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"]
36 #[wasm_bindgen(method, getter = "markers")]
37 pub fn get_markers(this: &SvgBoundingBoxOptions) -> Option<bool>;
38 #[doc = "Change the `markers` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"]
41 #[wasm_bindgen(method, setter = "markers")]
42 pub fn set_markers(this: &SvgBoundingBoxOptions, val: bool);
43 #[doc = "Get the `stroke` field of this object."]
44 #[doc = ""]
45 #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"]
46 #[wasm_bindgen(method, getter = "stroke")]
47 pub fn get_stroke(this: &SvgBoundingBoxOptions) -> Option<bool>;
48 #[doc = "Change the `stroke` field of this object."]
49 #[doc = ""]
50 #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"]
51 #[wasm_bindgen(method, setter = "stroke")]
52 pub fn set_stroke(this: &SvgBoundingBoxOptions, val: bool);
53}
54impl SvgBoundingBoxOptions {
55 #[doc = "Construct a new `SvgBoundingBoxOptions`."]
56 #[doc = ""]
57 #[doc = "*This API requires the following crate features to be activated: `SvgBoundingBoxOptions`*"]
58 pub fn new() -> Self {
59 #[allow(unused_mut)]
60 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
61 ret
62 }
63 #[deprecated = "Use `set_clipped()` instead."]
64 pub fn clipped(&mut self, val: bool) -> &mut Self {
65 self.set_clipped(val);
66 self
67 }
68 #[deprecated = "Use `set_fill()` instead."]
69 pub fn fill(&mut self, val: bool) -> &mut Self {
70 self.set_fill(val);
71 self
72 }
73 #[deprecated = "Use `set_markers()` instead."]
74 pub fn markers(&mut self, val: bool) -> &mut Self {
75 self.set_markers(val);
76 self
77 }
78 #[deprecated = "Use `set_stroke()` instead."]
79 pub fn stroke(&mut self, val: bool) -> &mut Self {
80 self.set_stroke(val);
81 self
82 }
83}
84impl Default for SvgBoundingBoxOptions {
85 fn default() -> Self {
86 Self::new()
87 }
88}