web_sys/features/
gen_ImageBitmapOptions.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 = ImageBitmapOptions)]
8 #[derive(Debug, Clone, PartialEq, Eq)]
9 #[doc = "The `ImageBitmapOptions` dictionary."]
10 #[doc = ""]
11 #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"]
12 pub type ImageBitmapOptions;
13 #[cfg(feature = "ColorSpaceConversion")]
14 #[doc = "Get the `colorSpaceConversion` field of this object."]
15 #[doc = ""]
16 #[doc = "*This API requires the following crate features to be activated: `ColorSpaceConversion`, `ImageBitmapOptions`*"]
17 #[wasm_bindgen(method, getter = "colorSpaceConversion")]
18 pub fn get_color_space_conversion(this: &ImageBitmapOptions) -> Option<ColorSpaceConversion>;
19 #[cfg(feature = "ColorSpaceConversion")]
20 #[doc = "Change the `colorSpaceConversion` field of this object."]
21 #[doc = ""]
22 #[doc = "*This API requires the following crate features to be activated: `ColorSpaceConversion`, `ImageBitmapOptions`*"]
23 #[wasm_bindgen(method, setter = "colorSpaceConversion")]
24 pub fn set_color_space_conversion(this: &ImageBitmapOptions, val: ColorSpaceConversion);
25 #[cfg(feature = "ImageOrientation")]
26 #[doc = "Get the `imageOrientation` field of this object."]
27 #[doc = ""]
28 #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `ImageOrientation`*"]
29 #[wasm_bindgen(method, getter = "imageOrientation")]
30 pub fn get_image_orientation(this: &ImageBitmapOptions) -> Option<ImageOrientation>;
31 #[cfg(feature = "ImageOrientation")]
32 #[doc = "Change the `imageOrientation` field of this object."]
33 #[doc = ""]
34 #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `ImageOrientation`*"]
35 #[wasm_bindgen(method, setter = "imageOrientation")]
36 pub fn set_image_orientation(this: &ImageBitmapOptions, val: ImageOrientation);
37 #[cfg(feature = "PremultiplyAlpha")]
38 #[doc = "Get the `premultiplyAlpha` field of this object."]
39 #[doc = ""]
40 #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `PremultiplyAlpha`*"]
41 #[wasm_bindgen(method, getter = "premultiplyAlpha")]
42 pub fn get_premultiply_alpha(this: &ImageBitmapOptions) -> Option<PremultiplyAlpha>;
43 #[cfg(feature = "PremultiplyAlpha")]
44 #[doc = "Change the `premultiplyAlpha` field of this object."]
45 #[doc = ""]
46 #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `PremultiplyAlpha`*"]
47 #[wasm_bindgen(method, setter = "premultiplyAlpha")]
48 pub fn set_premultiply_alpha(this: &ImageBitmapOptions, val: PremultiplyAlpha);
49 #[doc = "Get the `resizeHeight` field of this object."]
50 #[doc = ""]
51 #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"]
52 #[wasm_bindgen(method, getter = "resizeHeight")]
53 pub fn get_resize_height(this: &ImageBitmapOptions) -> Option<u32>;
54 #[doc = "Change the `resizeHeight` field of this object."]
55 #[doc = ""]
56 #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"]
57 #[wasm_bindgen(method, setter = "resizeHeight")]
58 pub fn set_resize_height(this: &ImageBitmapOptions, val: u32);
59 #[cfg(feature = "ResizeQuality")]
60 #[doc = "Get the `resizeQuality` field of this object."]
61 #[doc = ""]
62 #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `ResizeQuality`*"]
63 #[wasm_bindgen(method, getter = "resizeQuality")]
64 pub fn get_resize_quality(this: &ImageBitmapOptions) -> Option<ResizeQuality>;
65 #[cfg(feature = "ResizeQuality")]
66 #[doc = "Change the `resizeQuality` field of this object."]
67 #[doc = ""]
68 #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`, `ResizeQuality`*"]
69 #[wasm_bindgen(method, setter = "resizeQuality")]
70 pub fn set_resize_quality(this: &ImageBitmapOptions, val: ResizeQuality);
71 #[doc = "Get the `resizeWidth` field of this object."]
72 #[doc = ""]
73 #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"]
74 #[wasm_bindgen(method, getter = "resizeWidth")]
75 pub fn get_resize_width(this: &ImageBitmapOptions) -> Option<u32>;
76 #[doc = "Change the `resizeWidth` field of this object."]
77 #[doc = ""]
78 #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"]
79 #[wasm_bindgen(method, setter = "resizeWidth")]
80 pub fn set_resize_width(this: &ImageBitmapOptions, val: u32);
81}
82impl ImageBitmapOptions {
83 #[doc = "Construct a new `ImageBitmapOptions`."]
84 #[doc = ""]
85 #[doc = "*This API requires the following crate features to be activated: `ImageBitmapOptions`*"]
86 pub fn new() -> Self {
87 #[allow(unused_mut)]
88 let mut ret: Self = ::wasm_bindgen::JsCast::unchecked_into(::js_sys::Object::new());
89 ret
90 }
91 #[cfg(feature = "ColorSpaceConversion")]
92 #[deprecated = "Use `set_color_space_conversion()` instead."]
93 pub fn color_space_conversion(&mut self, val: ColorSpaceConversion) -> &mut Self {
94 self.set_color_space_conversion(val);
95 self
96 }
97 #[cfg(feature = "ImageOrientation")]
98 #[deprecated = "Use `set_image_orientation()` instead."]
99 pub fn image_orientation(&mut self, val: ImageOrientation) -> &mut Self {
100 self.set_image_orientation(val);
101 self
102 }
103 #[cfg(feature = "PremultiplyAlpha")]
104 #[deprecated = "Use `set_premultiply_alpha()` instead."]
105 pub fn premultiply_alpha(&mut self, val: PremultiplyAlpha) -> &mut Self {
106 self.set_premultiply_alpha(val);
107 self
108 }
109 #[deprecated = "Use `set_resize_height()` instead."]
110 pub fn resize_height(&mut self, val: u32) -> &mut Self {
111 self.set_resize_height(val);
112 self
113 }
114 #[cfg(feature = "ResizeQuality")]
115 #[deprecated = "Use `set_resize_quality()` instead."]
116 pub fn resize_quality(&mut self, val: ResizeQuality) -> &mut Self {
117 self.set_resize_quality(val);
118 self
119 }
120 #[deprecated = "Use `set_resize_width()` instead."]
121 pub fn resize_width(&mut self, val: u32) -> &mut Self {
122 self.set_resize_width(val);
123 self
124 }
125}
126impl Default for ImageBitmapOptions {
127 fn default() -> Self {
128 Self::new()
129 }
130}