1 | #![allow (unused_imports)] |
2 | #![allow (clippy::all)] |
3 | use super::*; |
4 | use wasm_bindgen::prelude::*; |
5 | #[wasm_bindgen ] |
6 | unsafeextern "C" { |
7 | # [wasm_bindgen (extends = :: js_sys :: Object , js_name = OffscreenCanvasRenderingContext2D , typescript_type = "OffscreenCanvasRenderingContext2D" )] |
8 | #[derive (Debug, Clone, PartialEq, Eq)] |
9 | #[doc = "The `OffscreenCanvasRenderingContext2d` class." ] |
10 | #[doc = "" ] |
11 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D)" ] |
12 | #[doc = "" ] |
13 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
14 | pub type OffscreenCanvasRenderingContext2d; |
15 | #[cfg (feature = "OffscreenCanvas" )] |
16 | # [wasm_bindgen (structural , method , getter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = canvas)] |
17 | #[doc = "Getter for the `canvas` field of this object." ] |
18 | #[doc = "" ] |
19 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/canvas)" ] |
20 | #[doc = "" ] |
21 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvas`, `OffscreenCanvasRenderingContext2d`*" ] |
22 | pub unsafefn canvas(this: &OffscreenCanvasRenderingContext2d) -> OffscreenCanvas; |
23 | # [wasm_bindgen (structural , method , getter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = globalAlpha)] |
24 | #[doc = "Getter for the `globalAlpha` field of this object." ] |
25 | #[doc = "" ] |
26 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/globalAlpha)" ] |
27 | #[doc = "" ] |
28 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
29 | pub unsafefn global_alpha(this: &OffscreenCanvasRenderingContext2d) -> f64; |
30 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = globalAlpha)] |
31 | #[doc = "Setter for the `globalAlpha` field of this object." ] |
32 | #[doc = "" ] |
33 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/globalAlpha)" ] |
34 | #[doc = "" ] |
35 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
36 | pub unsafefn set_global_alpha(this: &OffscreenCanvasRenderingContext2d, value: f64); |
37 | # [wasm_bindgen (structural , catch , method , getter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = globalCompositeOperation)] |
38 | #[doc = "Getter for the `globalCompositeOperation` field of this object." ] |
39 | #[doc = "" ] |
40 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/globalCompositeOperation)" ] |
41 | #[doc = "" ] |
42 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
43 | pub unsafefn global_composite_operation( |
44 | this: &OffscreenCanvasRenderingContext2d, |
45 | ) -> Result<::alloc::string::String, JsValue>; |
46 | # [wasm_bindgen (structural , catch , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = globalCompositeOperation)] |
47 | #[doc = "Setter for the `globalCompositeOperation` field of this object." ] |
48 | #[doc = "" ] |
49 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/globalCompositeOperation)" ] |
50 | #[doc = "" ] |
51 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
52 | pub unsafefn set_global_composite_operation( |
53 | this: &OffscreenCanvasRenderingContext2d, |
54 | value: &str, |
55 | ) -> Result<(), JsValue>; |
56 | # [wasm_bindgen (structural , method , getter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = strokeStyle)] |
57 | #[doc = "Getter for the `strokeStyle` field of this object." ] |
58 | #[doc = "" ] |
59 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/strokeStyle)" ] |
60 | #[doc = "" ] |
61 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
62 | pub unsafefn stroke_style(this: &OffscreenCanvasRenderingContext2d) -> ::wasm_bindgen::JsValue; |
63 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = strokeStyle)] |
64 | #[doc = "Setter for the `strokeStyle` field of this object." ] |
65 | #[doc = "" ] |
66 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/strokeStyle)" ] |
67 | #[doc = "" ] |
68 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
69 | #[deprecated ] |
70 | pub unsafefn set_stroke_style( |
71 | this: &OffscreenCanvasRenderingContext2d, |
72 | value: &::wasm_bindgen::JsValue, |
73 | ); |
74 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = strokeStyle)] |
75 | #[doc = "Setter for the `strokeStyle` field of this object." ] |
76 | #[doc = "" ] |
77 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/strokeStyle)" ] |
78 | #[doc = "" ] |
79 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
80 | pub unsafefn set_stroke_style_str(this: &OffscreenCanvasRenderingContext2d, value: &str); |
81 | #[cfg (feature = "CanvasGradient" )] |
82 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = strokeStyle)] |
83 | #[doc = "Setter for the `strokeStyle` field of this object." ] |
84 | #[doc = "" ] |
85 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/strokeStyle)" ] |
86 | #[doc = "" ] |
87 | #[doc = "*This API requires the following crate features to be activated: `CanvasGradient`, `OffscreenCanvasRenderingContext2d`*" ] |
88 | pub fn set_stroke_style_canvas_gradient( |
89 | this: &OffscreenCanvasRenderingContext2d, |
90 | value: &CanvasGradient, |
91 | ); |
92 | #[cfg (feature = "CanvasPattern" )] |
93 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = strokeStyle)] |
94 | #[doc = "Setter for the `strokeStyle` field of this object." ] |
95 | #[doc = "" ] |
96 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/strokeStyle)" ] |
97 | #[doc = "" ] |
98 | #[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `OffscreenCanvasRenderingContext2d`*" ] |
99 | pub fn set_stroke_style_canvas_pattern( |
100 | this: &OffscreenCanvasRenderingContext2d, |
101 | value: &CanvasPattern, |
102 | ); |
103 | # [wasm_bindgen (structural , method , getter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = fillStyle)] |
104 | #[doc = "Getter for the `fillStyle` field of this object." ] |
105 | #[doc = "" ] |
106 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fillStyle)" ] |
107 | #[doc = "" ] |
108 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
109 | pub unsafefn fill_style(this: &OffscreenCanvasRenderingContext2d) -> ::wasm_bindgen::JsValue; |
110 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = fillStyle)] |
111 | #[doc = "Setter for the `fillStyle` field of this object." ] |
112 | #[doc = "" ] |
113 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fillStyle)" ] |
114 | #[doc = "" ] |
115 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
116 | #[deprecated ] |
117 | pub unsafefn set_fill_style( |
118 | this: &OffscreenCanvasRenderingContext2d, |
119 | value: &::wasm_bindgen::JsValue, |
120 | ); |
121 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = fillStyle)] |
122 | #[doc = "Setter for the `fillStyle` field of this object." ] |
123 | #[doc = "" ] |
124 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fillStyle)" ] |
125 | #[doc = "" ] |
126 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
127 | pub unsafefn set_fill_style_str(this: &OffscreenCanvasRenderingContext2d, value: &str); |
128 | #[cfg (feature = "CanvasGradient" )] |
129 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = fillStyle)] |
130 | #[doc = "Setter for the `fillStyle` field of this object." ] |
131 | #[doc = "" ] |
132 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fillStyle)" ] |
133 | #[doc = "" ] |
134 | #[doc = "*This API requires the following crate features to be activated: `CanvasGradient`, `OffscreenCanvasRenderingContext2d`*" ] |
135 | pub fn set_fill_style_canvas_gradient( |
136 | this: &OffscreenCanvasRenderingContext2d, |
137 | value: &CanvasGradient, |
138 | ); |
139 | #[cfg (feature = "CanvasPattern" )] |
140 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = fillStyle)] |
141 | #[doc = "Setter for the `fillStyle` field of this object." ] |
142 | #[doc = "" ] |
143 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fillStyle)" ] |
144 | #[doc = "" ] |
145 | #[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `OffscreenCanvasRenderingContext2d`*" ] |
146 | pub fn set_fill_style_canvas_pattern( |
147 | this: &OffscreenCanvasRenderingContext2d, |
148 | value: &CanvasPattern, |
149 | ); |
150 | # [wasm_bindgen (structural , method , getter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = filter)] |
151 | #[doc = "Getter for the `filter` field of this object." ] |
152 | #[doc = "" ] |
153 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/filter)" ] |
154 | #[doc = "" ] |
155 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
156 | pub unsafefn filter(this: &OffscreenCanvasRenderingContext2d) -> ::alloc::string::String; |
157 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = filter)] |
158 | #[doc = "Setter for the `filter` field of this object." ] |
159 | #[doc = "" ] |
160 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/filter)" ] |
161 | #[doc = "" ] |
162 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
163 | pub unsafefn set_filter(this: &OffscreenCanvasRenderingContext2d, value: &str); |
164 | # [wasm_bindgen (structural , method , getter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = imageSmoothingEnabled)] |
165 | #[doc = "Getter for the `imageSmoothingEnabled` field of this object." ] |
166 | #[doc = "" ] |
167 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/imageSmoothingEnabled)" ] |
168 | #[doc = "" ] |
169 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
170 | pub unsafefn image_smoothing_enabled(this: &OffscreenCanvasRenderingContext2d) -> bool; |
171 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = imageSmoothingEnabled)] |
172 | #[doc = "Setter for the `imageSmoothingEnabled` field of this object." ] |
173 | #[doc = "" ] |
174 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/imageSmoothingEnabled)" ] |
175 | #[doc = "" ] |
176 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
177 | pub unsafefn set_image_smoothing_enabled(this: &OffscreenCanvasRenderingContext2d, value: bool); |
178 | # [wasm_bindgen (structural , method , getter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = lineWidth)] |
179 | #[doc = "Getter for the `lineWidth` field of this object." ] |
180 | #[doc = "" ] |
181 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/lineWidth)" ] |
182 | #[doc = "" ] |
183 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
184 | pub unsafefn line_width(this: &OffscreenCanvasRenderingContext2d) -> f64; |
185 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = lineWidth)] |
186 | #[doc = "Setter for the `lineWidth` field of this object." ] |
187 | #[doc = "" ] |
188 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/lineWidth)" ] |
189 | #[doc = "" ] |
190 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
191 | pub unsafefn set_line_width(this: &OffscreenCanvasRenderingContext2d, value: f64); |
192 | # [wasm_bindgen (structural , method , getter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = lineCap)] |
193 | #[doc = "Getter for the `lineCap` field of this object." ] |
194 | #[doc = "" ] |
195 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/lineCap)" ] |
196 | #[doc = "" ] |
197 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
198 | pub unsafefn line_cap(this: &OffscreenCanvasRenderingContext2d) -> ::alloc::string::String; |
199 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = lineCap)] |
200 | #[doc = "Setter for the `lineCap` field of this object." ] |
201 | #[doc = "" ] |
202 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/lineCap)" ] |
203 | #[doc = "" ] |
204 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
205 | pub unsafefn set_line_cap(this: &OffscreenCanvasRenderingContext2d, value: &str); |
206 | # [wasm_bindgen (structural , method , getter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = lineJoin)] |
207 | #[doc = "Getter for the `lineJoin` field of this object." ] |
208 | #[doc = "" ] |
209 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/lineJoin)" ] |
210 | #[doc = "" ] |
211 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
212 | pub unsafefn line_join(this: &OffscreenCanvasRenderingContext2d) -> ::alloc::string::String; |
213 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = lineJoin)] |
214 | #[doc = "Setter for the `lineJoin` field of this object." ] |
215 | #[doc = "" ] |
216 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/lineJoin)" ] |
217 | #[doc = "" ] |
218 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
219 | pub unsafefn set_line_join(this: &OffscreenCanvasRenderingContext2d, value: &str); |
220 | # [wasm_bindgen (structural , method , getter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = miterLimit)] |
221 | #[doc = "Getter for the `miterLimit` field of this object." ] |
222 | #[doc = "" ] |
223 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/miterLimit)" ] |
224 | #[doc = "" ] |
225 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
226 | pub unsafefn miter_limit(this: &OffscreenCanvasRenderingContext2d) -> f64; |
227 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = miterLimit)] |
228 | #[doc = "Setter for the `miterLimit` field of this object." ] |
229 | #[doc = "" ] |
230 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/miterLimit)" ] |
231 | #[doc = "" ] |
232 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
233 | pub unsafefn set_miter_limit(this: &OffscreenCanvasRenderingContext2d, value: f64); |
234 | # [wasm_bindgen (structural , method , getter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = lineDashOffset)] |
235 | #[doc = "Getter for the `lineDashOffset` field of this object." ] |
236 | #[doc = "" ] |
237 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/lineDashOffset)" ] |
238 | #[doc = "" ] |
239 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
240 | pub unsafefn line_dash_offset(this: &OffscreenCanvasRenderingContext2d) -> f64; |
241 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = lineDashOffset)] |
242 | #[doc = "Setter for the `lineDashOffset` field of this object." ] |
243 | #[doc = "" ] |
244 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/lineDashOffset)" ] |
245 | #[doc = "" ] |
246 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
247 | pub unsafefn set_line_dash_offset(this: &OffscreenCanvasRenderingContext2d, value: f64); |
248 | # [wasm_bindgen (structural , method , getter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = shadowOffsetX)] |
249 | #[doc = "Getter for the `shadowOffsetX` field of this object." ] |
250 | #[doc = "" ] |
251 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/shadowOffsetX)" ] |
252 | #[doc = "" ] |
253 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
254 | pub unsafefn shadow_offset_x(this: &OffscreenCanvasRenderingContext2d) -> f64; |
255 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = shadowOffsetX)] |
256 | #[doc = "Setter for the `shadowOffsetX` field of this object." ] |
257 | #[doc = "" ] |
258 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/shadowOffsetX)" ] |
259 | #[doc = "" ] |
260 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
261 | pub unsafefn set_shadow_offset_x(this: &OffscreenCanvasRenderingContext2d, value: f64); |
262 | # [wasm_bindgen (structural , method , getter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = shadowOffsetY)] |
263 | #[doc = "Getter for the `shadowOffsetY` field of this object." ] |
264 | #[doc = "" ] |
265 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/shadowOffsetY)" ] |
266 | #[doc = "" ] |
267 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
268 | pub unsafefn shadow_offset_y(this: &OffscreenCanvasRenderingContext2d) -> f64; |
269 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = shadowOffsetY)] |
270 | #[doc = "Setter for the `shadowOffsetY` field of this object." ] |
271 | #[doc = "" ] |
272 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/shadowOffsetY)" ] |
273 | #[doc = "" ] |
274 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
275 | pub unsafefn set_shadow_offset_y(this: &OffscreenCanvasRenderingContext2d, value: f64); |
276 | # [wasm_bindgen (structural , method , getter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = shadowBlur)] |
277 | #[doc = "Getter for the `shadowBlur` field of this object." ] |
278 | #[doc = "" ] |
279 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/shadowBlur)" ] |
280 | #[doc = "" ] |
281 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
282 | pub unsafefn shadow_blur(this: &OffscreenCanvasRenderingContext2d) -> f64; |
283 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = shadowBlur)] |
284 | #[doc = "Setter for the `shadowBlur` field of this object." ] |
285 | #[doc = "" ] |
286 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/shadowBlur)" ] |
287 | #[doc = "" ] |
288 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
289 | pub unsafefn set_shadow_blur(this: &OffscreenCanvasRenderingContext2d, value: f64); |
290 | # [wasm_bindgen (structural , method , getter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = shadowColor)] |
291 | #[doc = "Getter for the `shadowColor` field of this object." ] |
292 | #[doc = "" ] |
293 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/shadowColor)" ] |
294 | #[doc = "" ] |
295 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
296 | pub unsafefn shadow_color(this: &OffscreenCanvasRenderingContext2d) -> ::alloc::string::String; |
297 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = shadowColor)] |
298 | #[doc = "Setter for the `shadowColor` field of this object." ] |
299 | #[doc = "" ] |
300 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/shadowColor)" ] |
301 | #[doc = "" ] |
302 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
303 | pub unsafefn set_shadow_color(this: &OffscreenCanvasRenderingContext2d, value: &str); |
304 | # [wasm_bindgen (structural , method , getter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = font)] |
305 | #[doc = "Getter for the `font` field of this object." ] |
306 | #[doc = "" ] |
307 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/font)" ] |
308 | #[doc = "" ] |
309 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
310 | pub unsafefn font(this: &OffscreenCanvasRenderingContext2d) -> ::alloc::string::String; |
311 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = font)] |
312 | #[doc = "Setter for the `font` field of this object." ] |
313 | #[doc = "" ] |
314 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/font)" ] |
315 | #[doc = "" ] |
316 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
317 | pub unsafefn set_font(this: &OffscreenCanvasRenderingContext2d, value: &str); |
318 | # [wasm_bindgen (structural , method , getter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = textAlign)] |
319 | #[doc = "Getter for the `textAlign` field of this object." ] |
320 | #[doc = "" ] |
321 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/textAlign)" ] |
322 | #[doc = "" ] |
323 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
324 | pub unsafefn text_align(this: &OffscreenCanvasRenderingContext2d) -> ::alloc::string::String; |
325 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = textAlign)] |
326 | #[doc = "Setter for the `textAlign` field of this object." ] |
327 | #[doc = "" ] |
328 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/textAlign)" ] |
329 | #[doc = "" ] |
330 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
331 | pub unsafefn set_text_align(this: &OffscreenCanvasRenderingContext2d, value: &str); |
332 | # [wasm_bindgen (structural , method , getter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = textBaseline)] |
333 | #[doc = "Getter for the `textBaseline` field of this object." ] |
334 | #[doc = "" ] |
335 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/textBaseline)" ] |
336 | #[doc = "" ] |
337 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
338 | pub unsafefn text_baseline(this: &OffscreenCanvasRenderingContext2d) -> ::alloc::string::String; |
339 | # [wasm_bindgen (structural , method , setter , js_class = "OffscreenCanvasRenderingContext2D" , js_name = textBaseline)] |
340 | #[doc = "Setter for the `textBaseline` field of this object." ] |
341 | #[doc = "" ] |
342 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/textBaseline)" ] |
343 | #[doc = "" ] |
344 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
345 | pub unsafefn set_text_baseline(this: &OffscreenCanvasRenderingContext2d, value: &str); |
346 | #[cfg (feature = "HtmlImageElement" )] |
347 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
348 | #[doc = "The `drawImage()` method." ] |
349 | #[doc = "" ] |
350 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
351 | #[doc = "" ] |
352 | #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`, `OffscreenCanvasRenderingContext2d`*" ] |
353 | pub unsafefn draw_image_with_html_image_element( |
354 | this: &OffscreenCanvasRenderingContext2d, |
355 | image: &HtmlImageElement, |
356 | dx: f64, |
357 | dy: f64, |
358 | ) -> Result<(), JsValue>; |
359 | #[cfg (feature = "SvgImageElement" )] |
360 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
361 | #[doc = "The `drawImage()` method." ] |
362 | #[doc = "" ] |
363 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
364 | #[doc = "" ] |
365 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `SvgImageElement`*" ] |
366 | pub fn draw_image_with_svg_image_element( |
367 | this: &OffscreenCanvasRenderingContext2d, |
368 | image: &SvgImageElement, |
369 | dx: f64, |
370 | dy: f64, |
371 | ) -> Result<(), JsValue>; |
372 | #[cfg (feature = "HtmlCanvasElement" )] |
373 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
374 | #[doc = "The `drawImage()` method." ] |
375 | #[doc = "" ] |
376 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
377 | #[doc = "" ] |
378 | #[doc = "*This API requires the following crate features to be activated: `HtmlCanvasElement`, `OffscreenCanvasRenderingContext2d`*" ] |
379 | pub unsafefn draw_image_with_html_canvas_element( |
380 | this: &OffscreenCanvasRenderingContext2d, |
381 | image: &HtmlCanvasElement, |
382 | dx: f64, |
383 | dy: f64, |
384 | ) -> Result<(), JsValue>; |
385 | #[cfg (feature = "HtmlVideoElement" )] |
386 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
387 | #[doc = "The `drawImage()` method." ] |
388 | #[doc = "" ] |
389 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
390 | #[doc = "" ] |
391 | #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`, `OffscreenCanvasRenderingContext2d`*" ] |
392 | pub unsafefn draw_image_with_html_video_element( |
393 | this: &OffscreenCanvasRenderingContext2d, |
394 | image: &HtmlVideoElement, |
395 | dx: f64, |
396 | dy: f64, |
397 | ) -> Result<(), JsValue>; |
398 | #[cfg (feature = "ImageBitmap" )] |
399 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
400 | #[doc = "The `drawImage()` method." ] |
401 | #[doc = "" ] |
402 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
403 | #[doc = "" ] |
404 | #[doc = "*This API requires the following crate features to be activated: `ImageBitmap`, `OffscreenCanvasRenderingContext2d`*" ] |
405 | pub unsafefn draw_image_with_image_bitmap( |
406 | this: &OffscreenCanvasRenderingContext2d, |
407 | image: &ImageBitmap, |
408 | dx: f64, |
409 | dy: f64, |
410 | ) -> Result<(), JsValue>; |
411 | #[cfg (feature = "OffscreenCanvas" )] |
412 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
413 | #[doc = "The `drawImage()` method." ] |
414 | #[doc = "" ] |
415 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
416 | #[doc = "" ] |
417 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvas`, `OffscreenCanvasRenderingContext2d`*" ] |
418 | pub unsafefn draw_image_with_offscreen_canvas( |
419 | this: &OffscreenCanvasRenderingContext2d, |
420 | image: &OffscreenCanvas, |
421 | dx: f64, |
422 | dy: f64, |
423 | ) -> Result<(), JsValue>; |
424 | #[cfg (web_sys_unstable_apis)] |
425 | #[cfg (feature = "VideoFrame" )] |
426 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
427 | #[doc = "The `drawImage()` method." ] |
428 | #[doc = "" ] |
429 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
430 | #[doc = "" ] |
431 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `VideoFrame`*" ] |
432 | #[doc = "" ] |
433 | #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as" ] |
434 | #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*" ] |
435 | pub fn draw_image_with_video_frame( |
436 | this: &OffscreenCanvasRenderingContext2d, |
437 | image: &VideoFrame, |
438 | dx: f64, |
439 | dy: f64, |
440 | ) -> Result<(), JsValue>; |
441 | #[cfg (feature = "HtmlImageElement" )] |
442 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
443 | #[doc = "The `drawImage()` method." ] |
444 | #[doc = "" ] |
445 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
446 | #[doc = "" ] |
447 | #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`, `OffscreenCanvasRenderingContext2d`*" ] |
448 | pub unsafefn draw_image_with_html_image_element_and_dw_and_dh( |
449 | this: &OffscreenCanvasRenderingContext2d, |
450 | image: &HtmlImageElement, |
451 | dx: f64, |
452 | dy: f64, |
453 | dw: f64, |
454 | dh: f64, |
455 | ) -> Result<(), JsValue>; |
456 | #[cfg (feature = "SvgImageElement" )] |
457 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
458 | #[doc = "The `drawImage()` method." ] |
459 | #[doc = "" ] |
460 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
461 | #[doc = "" ] |
462 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `SvgImageElement`*" ] |
463 | pub fn draw_image_with_svg_image_element_and_dw_and_dh( |
464 | this: &OffscreenCanvasRenderingContext2d, |
465 | image: &SvgImageElement, |
466 | dx: f64, |
467 | dy: f64, |
468 | dw: f64, |
469 | dh: f64, |
470 | ) -> Result<(), JsValue>; |
471 | #[cfg (feature = "HtmlCanvasElement" )] |
472 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
473 | #[doc = "The `drawImage()` method." ] |
474 | #[doc = "" ] |
475 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
476 | #[doc = "" ] |
477 | #[doc = "*This API requires the following crate features to be activated: `HtmlCanvasElement`, `OffscreenCanvasRenderingContext2d`*" ] |
478 | pub unsafefn draw_image_with_html_canvas_element_and_dw_and_dh( |
479 | this: &OffscreenCanvasRenderingContext2d, |
480 | image: &HtmlCanvasElement, |
481 | dx: f64, |
482 | dy: f64, |
483 | dw: f64, |
484 | dh: f64, |
485 | ) -> Result<(), JsValue>; |
486 | #[cfg (feature = "HtmlVideoElement" )] |
487 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
488 | #[doc = "The `drawImage()` method." ] |
489 | #[doc = "" ] |
490 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
491 | #[doc = "" ] |
492 | #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`, `OffscreenCanvasRenderingContext2d`*" ] |
493 | pub unsafefn draw_image_with_html_video_element_and_dw_and_dh( |
494 | this: &OffscreenCanvasRenderingContext2d, |
495 | image: &HtmlVideoElement, |
496 | dx: f64, |
497 | dy: f64, |
498 | dw: f64, |
499 | dh: f64, |
500 | ) -> Result<(), JsValue>; |
501 | #[cfg (feature = "ImageBitmap" )] |
502 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
503 | #[doc = "The `drawImage()` method." ] |
504 | #[doc = "" ] |
505 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
506 | #[doc = "" ] |
507 | #[doc = "*This API requires the following crate features to be activated: `ImageBitmap`, `OffscreenCanvasRenderingContext2d`*" ] |
508 | pub unsafefn draw_image_with_image_bitmap_and_dw_and_dh( |
509 | this: &OffscreenCanvasRenderingContext2d, |
510 | image: &ImageBitmap, |
511 | dx: f64, |
512 | dy: f64, |
513 | dw: f64, |
514 | dh: f64, |
515 | ) -> Result<(), JsValue>; |
516 | #[cfg (feature = "OffscreenCanvas" )] |
517 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
518 | #[doc = "The `drawImage()` method." ] |
519 | #[doc = "" ] |
520 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
521 | #[doc = "" ] |
522 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvas`, `OffscreenCanvasRenderingContext2d`*" ] |
523 | pub unsafefn draw_image_with_offscreen_canvas_and_dw_and_dh( |
524 | this: &OffscreenCanvasRenderingContext2d, |
525 | image: &OffscreenCanvas, |
526 | dx: f64, |
527 | dy: f64, |
528 | dw: f64, |
529 | dh: f64, |
530 | ) -> Result<(), JsValue>; |
531 | #[cfg (web_sys_unstable_apis)] |
532 | #[cfg (feature = "VideoFrame" )] |
533 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
534 | #[doc = "The `drawImage()` method." ] |
535 | #[doc = "" ] |
536 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
537 | #[doc = "" ] |
538 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `VideoFrame`*" ] |
539 | #[doc = "" ] |
540 | #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as" ] |
541 | #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*" ] |
542 | pub fn draw_image_with_video_frame_and_dw_and_dh( |
543 | this: &OffscreenCanvasRenderingContext2d, |
544 | image: &VideoFrame, |
545 | dx: f64, |
546 | dy: f64, |
547 | dw: f64, |
548 | dh: f64, |
549 | ) -> Result<(), JsValue>; |
550 | #[cfg (feature = "HtmlImageElement" )] |
551 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
552 | #[doc = "The `drawImage()` method." ] |
553 | #[doc = "" ] |
554 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
555 | #[doc = "" ] |
556 | #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`, `OffscreenCanvasRenderingContext2d`*" ] |
557 | pub unsafefn draw_image_with_html_image_element_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh( |
558 | this: &OffscreenCanvasRenderingContext2d, |
559 | image: &HtmlImageElement, |
560 | sx: f64, |
561 | sy: f64, |
562 | sw: f64, |
563 | sh: f64, |
564 | dx: f64, |
565 | dy: f64, |
566 | dw: f64, |
567 | dh: f64, |
568 | ) -> Result<(), JsValue>; |
569 | #[cfg (feature = "SvgImageElement" )] |
570 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
571 | #[doc = "The `drawImage()` method." ] |
572 | #[doc = "" ] |
573 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
574 | #[doc = "" ] |
575 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `SvgImageElement`*" ] |
576 | pub fn draw_image_with_svg_image_element_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh( |
577 | this: &OffscreenCanvasRenderingContext2d, |
578 | image: &SvgImageElement, |
579 | sx: f64, |
580 | sy: f64, |
581 | sw: f64, |
582 | sh: f64, |
583 | dx: f64, |
584 | dy: f64, |
585 | dw: f64, |
586 | dh: f64, |
587 | ) -> Result<(), JsValue>; |
588 | #[cfg (feature = "HtmlCanvasElement" )] |
589 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
590 | #[doc = "The `drawImage()` method." ] |
591 | #[doc = "" ] |
592 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
593 | #[doc = "" ] |
594 | #[doc = "*This API requires the following crate features to be activated: `HtmlCanvasElement`, `OffscreenCanvasRenderingContext2d`*" ] |
595 | pub unsafefn draw_image_with_html_canvas_element_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh( |
596 | this: &OffscreenCanvasRenderingContext2d, |
597 | image: &HtmlCanvasElement, |
598 | sx: f64, |
599 | sy: f64, |
600 | sw: f64, |
601 | sh: f64, |
602 | dx: f64, |
603 | dy: f64, |
604 | dw: f64, |
605 | dh: f64, |
606 | ) -> Result<(), JsValue>; |
607 | #[cfg (feature = "HtmlVideoElement" )] |
608 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
609 | #[doc = "The `drawImage()` method." ] |
610 | #[doc = "" ] |
611 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
612 | #[doc = "" ] |
613 | #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`, `OffscreenCanvasRenderingContext2d`*" ] |
614 | pub unsafefn draw_image_with_html_video_element_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh( |
615 | this: &OffscreenCanvasRenderingContext2d, |
616 | image: &HtmlVideoElement, |
617 | sx: f64, |
618 | sy: f64, |
619 | sw: f64, |
620 | sh: f64, |
621 | dx: f64, |
622 | dy: f64, |
623 | dw: f64, |
624 | dh: f64, |
625 | ) -> Result<(), JsValue>; |
626 | #[cfg (feature = "ImageBitmap" )] |
627 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
628 | #[doc = "The `drawImage()` method." ] |
629 | #[doc = "" ] |
630 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
631 | #[doc = "" ] |
632 | #[doc = "*This API requires the following crate features to be activated: `ImageBitmap`, `OffscreenCanvasRenderingContext2d`*" ] |
633 | pub unsafefn draw_image_with_image_bitmap_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh( |
634 | this: &OffscreenCanvasRenderingContext2d, |
635 | image: &ImageBitmap, |
636 | sx: f64, |
637 | sy: f64, |
638 | sw: f64, |
639 | sh: f64, |
640 | dx: f64, |
641 | dy: f64, |
642 | dw: f64, |
643 | dh: f64, |
644 | ) -> Result<(), JsValue>; |
645 | #[cfg (feature = "OffscreenCanvas" )] |
646 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
647 | #[doc = "The `drawImage()` method." ] |
648 | #[doc = "" ] |
649 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
650 | #[doc = "" ] |
651 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvas`, `OffscreenCanvasRenderingContext2d`*" ] |
652 | pub unsafefn draw_image_with_offscreen_canvas_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh( |
653 | this: &OffscreenCanvasRenderingContext2d, |
654 | image: &OffscreenCanvas, |
655 | sx: f64, |
656 | sy: f64, |
657 | sw: f64, |
658 | sh: f64, |
659 | dx: f64, |
660 | dy: f64, |
661 | dw: f64, |
662 | dh: f64, |
663 | ) -> Result<(), JsValue>; |
664 | #[cfg (web_sys_unstable_apis)] |
665 | #[cfg (feature = "VideoFrame" )] |
666 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = drawImage)] |
667 | #[doc = "The `drawImage()` method." ] |
668 | #[doc = "" ] |
669 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)" ] |
670 | #[doc = "" ] |
671 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `VideoFrame`*" ] |
672 | #[doc = "" ] |
673 | #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as" ] |
674 | #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*" ] |
675 | pub fn draw_image_with_video_frame_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh( |
676 | this: &OffscreenCanvasRenderingContext2d, |
677 | image: &VideoFrame, |
678 | sx: f64, |
679 | sy: f64, |
680 | sw: f64, |
681 | sh: f64, |
682 | dx: f64, |
683 | dy: f64, |
684 | dw: f64, |
685 | dh: f64, |
686 | ) -> Result<(), JsValue>; |
687 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = beginPath)] |
688 | #[doc = "The `beginPath()` method." ] |
689 | #[doc = "" ] |
690 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/beginPath)" ] |
691 | #[doc = "" ] |
692 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
693 | pub unsafefn begin_path(this: &OffscreenCanvasRenderingContext2d); |
694 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = clip)] |
695 | #[doc = "The `clip()` method." ] |
696 | #[doc = "" ] |
697 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/clip)" ] |
698 | #[doc = "" ] |
699 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
700 | pub unsafefn clip(this: &OffscreenCanvasRenderingContext2d); |
701 | #[cfg (feature = "CanvasWindingRule" )] |
702 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = clip)] |
703 | #[doc = "The `clip()` method." ] |
704 | #[doc = "" ] |
705 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/clip)" ] |
706 | #[doc = "" ] |
707 | #[doc = "*This API requires the following crate features to be activated: `CanvasWindingRule`, `OffscreenCanvasRenderingContext2d`*" ] |
708 | pub fn clip_with_canvas_winding_rule( |
709 | this: &OffscreenCanvasRenderingContext2d, |
710 | winding: CanvasWindingRule, |
711 | ); |
712 | #[cfg (feature = "Path2d" )] |
713 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = clip)] |
714 | #[doc = "The `clip()` method." ] |
715 | #[doc = "" ] |
716 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/clip)" ] |
717 | #[doc = "" ] |
718 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `Path2d`*" ] |
719 | pub fn clip_with_path_2d(this: &OffscreenCanvasRenderingContext2d, path: &Path2d); |
720 | #[cfg (all(feature = "CanvasWindingRule" , feature = "Path2d" ,))] |
721 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = clip)] |
722 | #[doc = "The `clip()` method." ] |
723 | #[doc = "" ] |
724 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/clip)" ] |
725 | #[doc = "" ] |
726 | #[doc = "*This API requires the following crate features to be activated: `CanvasWindingRule`, `OffscreenCanvasRenderingContext2d`, `Path2d`*" ] |
727 | pub fn clip_with_path_2d_and_winding( |
728 | this: &OffscreenCanvasRenderingContext2d, |
729 | path: &Path2d, |
730 | winding: CanvasWindingRule, |
731 | ); |
732 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = fill)] |
733 | #[doc = "The `fill()` method." ] |
734 | #[doc = "" ] |
735 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fill)" ] |
736 | #[doc = "" ] |
737 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
738 | pub unsafefn fill(this: &OffscreenCanvasRenderingContext2d); |
739 | #[cfg (feature = "CanvasWindingRule" )] |
740 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = fill)] |
741 | #[doc = "The `fill()` method." ] |
742 | #[doc = "" ] |
743 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fill)" ] |
744 | #[doc = "" ] |
745 | #[doc = "*This API requires the following crate features to be activated: `CanvasWindingRule`, `OffscreenCanvasRenderingContext2d`*" ] |
746 | pub fn fill_with_canvas_winding_rule( |
747 | this: &OffscreenCanvasRenderingContext2d, |
748 | winding: CanvasWindingRule, |
749 | ); |
750 | #[cfg (feature = "Path2d" )] |
751 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = fill)] |
752 | #[doc = "The `fill()` method." ] |
753 | #[doc = "" ] |
754 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fill)" ] |
755 | #[doc = "" ] |
756 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `Path2d`*" ] |
757 | pub fn fill_with_path_2d(this: &OffscreenCanvasRenderingContext2d, path: &Path2d); |
758 | #[cfg (all(feature = "CanvasWindingRule" , feature = "Path2d" ,))] |
759 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = fill)] |
760 | #[doc = "The `fill()` method." ] |
761 | #[doc = "" ] |
762 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fill)" ] |
763 | #[doc = "" ] |
764 | #[doc = "*This API requires the following crate features to be activated: `CanvasWindingRule`, `OffscreenCanvasRenderingContext2d`, `Path2d`*" ] |
765 | pub fn fill_with_path_2d_and_winding( |
766 | this: &OffscreenCanvasRenderingContext2d, |
767 | path: &Path2d, |
768 | winding: CanvasWindingRule, |
769 | ); |
770 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = isPointInPath)] |
771 | #[doc = "The `isPointInPath()` method." ] |
772 | #[doc = "" ] |
773 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/isPointInPath)" ] |
774 | #[doc = "" ] |
775 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
776 | pub unsafefn is_point_in_path_with_f64( |
777 | this: &OffscreenCanvasRenderingContext2d, |
778 | x: f64, |
779 | y: f64, |
780 | ) -> bool; |
781 | #[cfg (feature = "CanvasWindingRule" )] |
782 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = isPointInPath)] |
783 | #[doc = "The `isPointInPath()` method." ] |
784 | #[doc = "" ] |
785 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/isPointInPath)" ] |
786 | #[doc = "" ] |
787 | #[doc = "*This API requires the following crate features to be activated: `CanvasWindingRule`, `OffscreenCanvasRenderingContext2d`*" ] |
788 | pub fn is_point_in_path_with_f64_and_canvas_winding_rule( |
789 | this: &OffscreenCanvasRenderingContext2d, |
790 | x: f64, |
791 | y: f64, |
792 | winding: CanvasWindingRule, |
793 | ) -> bool; |
794 | #[cfg (feature = "Path2d" )] |
795 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = isPointInPath)] |
796 | #[doc = "The `isPointInPath()` method." ] |
797 | #[doc = "" ] |
798 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/isPointInPath)" ] |
799 | #[doc = "" ] |
800 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `Path2d`*" ] |
801 | pub fn is_point_in_path_with_path_2d_and_f64( |
802 | this: &OffscreenCanvasRenderingContext2d, |
803 | path: &Path2d, |
804 | x: f64, |
805 | y: f64, |
806 | ) -> bool; |
807 | #[cfg (all(feature = "CanvasWindingRule" , feature = "Path2d" ,))] |
808 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = isPointInPath)] |
809 | #[doc = "The `isPointInPath()` method." ] |
810 | #[doc = "" ] |
811 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/isPointInPath)" ] |
812 | #[doc = "" ] |
813 | #[doc = "*This API requires the following crate features to be activated: `CanvasWindingRule`, `OffscreenCanvasRenderingContext2d`, `Path2d`*" ] |
814 | pub fn is_point_in_path_with_path_2d_and_f64_and_winding( |
815 | this: &OffscreenCanvasRenderingContext2d, |
816 | path: &Path2d, |
817 | x: f64, |
818 | y: f64, |
819 | winding: CanvasWindingRule, |
820 | ) -> bool; |
821 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = isPointInStroke)] |
822 | #[doc = "The `isPointInStroke()` method." ] |
823 | #[doc = "" ] |
824 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/isPointInStroke)" ] |
825 | #[doc = "" ] |
826 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
827 | pub unsafefn is_point_in_stroke_with_x_and_y( |
828 | this: &OffscreenCanvasRenderingContext2d, |
829 | x: f64, |
830 | y: f64, |
831 | ) -> bool; |
832 | #[cfg (feature = "Path2d" )] |
833 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = isPointInStroke)] |
834 | #[doc = "The `isPointInStroke()` method." ] |
835 | #[doc = "" ] |
836 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/isPointInStroke)" ] |
837 | #[doc = "" ] |
838 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `Path2d`*" ] |
839 | pub fn is_point_in_stroke_with_path_and_x_and_y( |
840 | this: &OffscreenCanvasRenderingContext2d, |
841 | path: &Path2d, |
842 | x: f64, |
843 | y: f64, |
844 | ) -> bool; |
845 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = stroke)] |
846 | #[doc = "The `stroke()` method." ] |
847 | #[doc = "" ] |
848 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/stroke)" ] |
849 | #[doc = "" ] |
850 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
851 | pub unsafefn stroke(this: &OffscreenCanvasRenderingContext2d); |
852 | #[cfg (feature = "Path2d" )] |
853 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = stroke)] |
854 | #[doc = "The `stroke()` method." ] |
855 | #[doc = "" ] |
856 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/stroke)" ] |
857 | #[doc = "" ] |
858 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `Path2d`*" ] |
859 | pub fn stroke_with_path(this: &OffscreenCanvasRenderingContext2d, path: &Path2d); |
860 | #[cfg (feature = "CanvasGradient" )] |
861 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = createLinearGradient)] |
862 | #[doc = "The `createLinearGradient()` method." ] |
863 | #[doc = "" ] |
864 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createLinearGradient)" ] |
865 | #[doc = "" ] |
866 | #[doc = "*This API requires the following crate features to be activated: `CanvasGradient`, `OffscreenCanvasRenderingContext2d`*" ] |
867 | pub fn create_linear_gradient( |
868 | this: &OffscreenCanvasRenderingContext2d, |
869 | x0: f64, |
870 | y0: f64, |
871 | x1: f64, |
872 | y1: f64, |
873 | ) -> CanvasGradient; |
874 | #[cfg (all(feature = "CanvasPattern" , feature = "HtmlImageElement" ,))] |
875 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = createPattern)] |
876 | #[doc = "The `createPattern()` method." ] |
877 | #[doc = "" ] |
878 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createPattern)" ] |
879 | #[doc = "" ] |
880 | #[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `HtmlImageElement`, `OffscreenCanvasRenderingContext2d`*" ] |
881 | pub fn create_pattern_with_html_image_element( |
882 | this: &OffscreenCanvasRenderingContext2d, |
883 | image: &HtmlImageElement, |
884 | repetition: &str, |
885 | ) -> Result<Option<CanvasPattern>, JsValue>; |
886 | #[cfg (all(feature = "CanvasPattern" , feature = "SvgImageElement" ,))] |
887 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = createPattern)] |
888 | #[doc = "The `createPattern()` method." ] |
889 | #[doc = "" ] |
890 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createPattern)" ] |
891 | #[doc = "" ] |
892 | #[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `OffscreenCanvasRenderingContext2d`, `SvgImageElement`*" ] |
893 | pub fn create_pattern_with_svg_image_element( |
894 | this: &OffscreenCanvasRenderingContext2d, |
895 | image: &SvgImageElement, |
896 | repetition: &str, |
897 | ) -> Result<Option<CanvasPattern>, JsValue>; |
898 | #[cfg (all(feature = "CanvasPattern" , feature = "HtmlCanvasElement" ,))] |
899 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = createPattern)] |
900 | #[doc = "The `createPattern()` method." ] |
901 | #[doc = "" ] |
902 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createPattern)" ] |
903 | #[doc = "" ] |
904 | #[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `HtmlCanvasElement`, `OffscreenCanvasRenderingContext2d`*" ] |
905 | pub fn create_pattern_with_html_canvas_element( |
906 | this: &OffscreenCanvasRenderingContext2d, |
907 | image: &HtmlCanvasElement, |
908 | repetition: &str, |
909 | ) -> Result<Option<CanvasPattern>, JsValue>; |
910 | #[cfg (all(feature = "CanvasPattern" , feature = "HtmlVideoElement" ,))] |
911 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = createPattern)] |
912 | #[doc = "The `createPattern()` method." ] |
913 | #[doc = "" ] |
914 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createPattern)" ] |
915 | #[doc = "" ] |
916 | #[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `HtmlVideoElement`, `OffscreenCanvasRenderingContext2d`*" ] |
917 | pub fn create_pattern_with_html_video_element( |
918 | this: &OffscreenCanvasRenderingContext2d, |
919 | image: &HtmlVideoElement, |
920 | repetition: &str, |
921 | ) -> Result<Option<CanvasPattern>, JsValue>; |
922 | #[cfg (all(feature = "CanvasPattern" , feature = "ImageBitmap" ,))] |
923 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = createPattern)] |
924 | #[doc = "The `createPattern()` method." ] |
925 | #[doc = "" ] |
926 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createPattern)" ] |
927 | #[doc = "" ] |
928 | #[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `ImageBitmap`, `OffscreenCanvasRenderingContext2d`*" ] |
929 | pub fn create_pattern_with_image_bitmap( |
930 | this: &OffscreenCanvasRenderingContext2d, |
931 | image: &ImageBitmap, |
932 | repetition: &str, |
933 | ) -> Result<Option<CanvasPattern>, JsValue>; |
934 | #[cfg (all(feature = "CanvasPattern" , feature = "OffscreenCanvas" ,))] |
935 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = createPattern)] |
936 | #[doc = "The `createPattern()` method." ] |
937 | #[doc = "" ] |
938 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createPattern)" ] |
939 | #[doc = "" ] |
940 | #[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `OffscreenCanvas`, `OffscreenCanvasRenderingContext2d`*" ] |
941 | pub fn create_pattern_with_offscreen_canvas( |
942 | this: &OffscreenCanvasRenderingContext2d, |
943 | image: &OffscreenCanvas, |
944 | repetition: &str, |
945 | ) -> Result<Option<CanvasPattern>, JsValue>; |
946 | #[cfg (web_sys_unstable_apis)] |
947 | #[cfg (all(feature = "CanvasPattern" , feature = "VideoFrame" ,))] |
948 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = createPattern)] |
949 | #[doc = "The `createPattern()` method." ] |
950 | #[doc = "" ] |
951 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createPattern)" ] |
952 | #[doc = "" ] |
953 | #[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `OffscreenCanvasRenderingContext2d`, `VideoFrame`*" ] |
954 | #[doc = "" ] |
955 | #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as" ] |
956 | #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*" ] |
957 | pub fn create_pattern_with_video_frame( |
958 | this: &OffscreenCanvasRenderingContext2d, |
959 | image: &VideoFrame, |
960 | repetition: &str, |
961 | ) -> Result<Option<CanvasPattern>, JsValue>; |
962 | #[cfg (feature = "CanvasGradient" )] |
963 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = createRadialGradient)] |
964 | #[doc = "The `createRadialGradient()` method." ] |
965 | #[doc = "" ] |
966 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createRadialGradient)" ] |
967 | #[doc = "" ] |
968 | #[doc = "*This API requires the following crate features to be activated: `CanvasGradient`, `OffscreenCanvasRenderingContext2d`*" ] |
969 | pub fn create_radial_gradient( |
970 | this: &OffscreenCanvasRenderingContext2d, |
971 | x0: f64, |
972 | y0: f64, |
973 | r0: f64, |
974 | x1: f64, |
975 | y1: f64, |
976 | r1: f64, |
977 | ) -> Result<CanvasGradient, JsValue>; |
978 | #[cfg (feature = "ImageData" )] |
979 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = createImageData)] |
980 | #[doc = "The `createImageData()` method." ] |
981 | #[doc = "" ] |
982 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createImageData)" ] |
983 | #[doc = "" ] |
984 | #[doc = "*This API requires the following crate features to be activated: `ImageData`, `OffscreenCanvasRenderingContext2d`*" ] |
985 | pub unsafefn create_image_data_with_sw_and_sh( |
986 | this: &OffscreenCanvasRenderingContext2d, |
987 | sw: f64, |
988 | sh: f64, |
989 | ) -> Result<ImageData, JsValue>; |
990 | #[cfg (feature = "ImageData" )] |
991 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = createImageData)] |
992 | #[doc = "The `createImageData()` method." ] |
993 | #[doc = "" ] |
994 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createImageData)" ] |
995 | #[doc = "" ] |
996 | #[doc = "*This API requires the following crate features to be activated: `ImageData`, `OffscreenCanvasRenderingContext2d`*" ] |
997 | pub unsafefn create_image_data_with_imagedata( |
998 | this: &OffscreenCanvasRenderingContext2d, |
999 | imagedata: &ImageData, |
1000 | ) -> Result<ImageData, JsValue>; |
1001 | #[cfg (feature = "ImageData" )] |
1002 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = getImageData)] |
1003 | #[doc = "The `getImageData()` method." ] |
1004 | #[doc = "" ] |
1005 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/getImageData)" ] |
1006 | #[doc = "" ] |
1007 | #[doc = "*This API requires the following crate features to be activated: `ImageData`, `OffscreenCanvasRenderingContext2d`*" ] |
1008 | pub unsafefn get_image_data( |
1009 | this: &OffscreenCanvasRenderingContext2d, |
1010 | sx: f64, |
1011 | sy: f64, |
1012 | sw: f64, |
1013 | sh: f64, |
1014 | ) -> Result<ImageData, JsValue>; |
1015 | #[cfg (feature = "ImageData" )] |
1016 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = putImageData)] |
1017 | #[doc = "The `putImageData()` method." ] |
1018 | #[doc = "" ] |
1019 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/putImageData)" ] |
1020 | #[doc = "" ] |
1021 | #[doc = "*This API requires the following crate features to be activated: `ImageData`, `OffscreenCanvasRenderingContext2d`*" ] |
1022 | pub unsafefn put_image_data( |
1023 | this: &OffscreenCanvasRenderingContext2d, |
1024 | imagedata: &ImageData, |
1025 | dx: f64, |
1026 | dy: f64, |
1027 | ) -> Result<(), JsValue>; |
1028 | #[cfg (feature = "ImageData" )] |
1029 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = putImageData)] |
1030 | #[doc = "The `putImageData()` method." ] |
1031 | #[doc = "" ] |
1032 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/putImageData)" ] |
1033 | #[doc = "" ] |
1034 | #[doc = "*This API requires the following crate features to be activated: `ImageData`, `OffscreenCanvasRenderingContext2d`*" ] |
1035 | pub unsafefn put_image_data_with_dirty_x_and_dirty_y_and_dirty_width_and_dirty_height( |
1036 | this: &OffscreenCanvasRenderingContext2d, |
1037 | imagedata: &ImageData, |
1038 | dx: f64, |
1039 | dy: f64, |
1040 | dirty_x: f64, |
1041 | dirty_y: f64, |
1042 | dirty_width: f64, |
1043 | dirty_height: f64, |
1044 | ) -> Result<(), JsValue>; |
1045 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = arc)] |
1046 | #[doc = "The `arc()` method." ] |
1047 | #[doc = "" ] |
1048 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/arc)" ] |
1049 | #[doc = "" ] |
1050 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1051 | pub unsafefn arc( |
1052 | this: &OffscreenCanvasRenderingContext2d, |
1053 | x: f64, |
1054 | y: f64, |
1055 | radius: f64, |
1056 | start_angle: f64, |
1057 | end_angle: f64, |
1058 | ) -> Result<(), JsValue>; |
1059 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = arc)] |
1060 | #[doc = "The `arc()` method." ] |
1061 | #[doc = "" ] |
1062 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/arc)" ] |
1063 | #[doc = "" ] |
1064 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1065 | pub unsafefn arc_with_anticlockwise( |
1066 | this: &OffscreenCanvasRenderingContext2d, |
1067 | x: f64, |
1068 | y: f64, |
1069 | radius: f64, |
1070 | start_angle: f64, |
1071 | end_angle: f64, |
1072 | anticlockwise: bool, |
1073 | ) -> Result<(), JsValue>; |
1074 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = arcTo)] |
1075 | #[doc = "The `arcTo()` method." ] |
1076 | #[doc = "" ] |
1077 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/arcTo)" ] |
1078 | #[doc = "" ] |
1079 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1080 | pub unsafefn arc_to( |
1081 | this: &OffscreenCanvasRenderingContext2d, |
1082 | x1: f64, |
1083 | y1: f64, |
1084 | x2: f64, |
1085 | y2: f64, |
1086 | radius: f64, |
1087 | ) -> Result<(), JsValue>; |
1088 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = bezierCurveTo)] |
1089 | #[doc = "The `bezierCurveTo()` method." ] |
1090 | #[doc = "" ] |
1091 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/bezierCurveTo)" ] |
1092 | #[doc = "" ] |
1093 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1094 | pub unsafefn bezier_curve_to( |
1095 | this: &OffscreenCanvasRenderingContext2d, |
1096 | cp1x: f64, |
1097 | cp1y: f64, |
1098 | cp2x: f64, |
1099 | cp2y: f64, |
1100 | x: f64, |
1101 | y: f64, |
1102 | ); |
1103 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = closePath)] |
1104 | #[doc = "The `closePath()` method." ] |
1105 | #[doc = "" ] |
1106 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/closePath)" ] |
1107 | #[doc = "" ] |
1108 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1109 | pub unsafefn close_path(this: &OffscreenCanvasRenderingContext2d); |
1110 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = ellipse)] |
1111 | #[doc = "The `ellipse()` method." ] |
1112 | #[doc = "" ] |
1113 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/ellipse)" ] |
1114 | #[doc = "" ] |
1115 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1116 | pub unsafefn ellipse( |
1117 | this: &OffscreenCanvasRenderingContext2d, |
1118 | x: f64, |
1119 | y: f64, |
1120 | radius_x: f64, |
1121 | radius_y: f64, |
1122 | rotation: f64, |
1123 | start_angle: f64, |
1124 | end_angle: f64, |
1125 | ) -> Result<(), JsValue>; |
1126 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = ellipse)] |
1127 | #[doc = "The `ellipse()` method." ] |
1128 | #[doc = "" ] |
1129 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/ellipse)" ] |
1130 | #[doc = "" ] |
1131 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1132 | pub unsafefn ellipse_with_anticlockwise( |
1133 | this: &OffscreenCanvasRenderingContext2d, |
1134 | x: f64, |
1135 | y: f64, |
1136 | radius_x: f64, |
1137 | radius_y: f64, |
1138 | rotation: f64, |
1139 | start_angle: f64, |
1140 | end_angle: f64, |
1141 | anticlockwise: bool, |
1142 | ) -> Result<(), JsValue>; |
1143 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = lineTo)] |
1144 | #[doc = "The `lineTo()` method." ] |
1145 | #[doc = "" ] |
1146 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/lineTo)" ] |
1147 | #[doc = "" ] |
1148 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1149 | pub unsafefn line_to(this: &OffscreenCanvasRenderingContext2d, x: f64, y: f64); |
1150 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = moveTo)] |
1151 | #[doc = "The `moveTo()` method." ] |
1152 | #[doc = "" ] |
1153 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/moveTo)" ] |
1154 | #[doc = "" ] |
1155 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1156 | pub unsafefn move_to(this: &OffscreenCanvasRenderingContext2d, x: f64, y: f64); |
1157 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = quadraticCurveTo)] |
1158 | #[doc = "The `quadraticCurveTo()` method." ] |
1159 | #[doc = "" ] |
1160 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/quadraticCurveTo)" ] |
1161 | #[doc = "" ] |
1162 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1163 | pub unsafefn quadratic_curve_to( |
1164 | this: &OffscreenCanvasRenderingContext2d, |
1165 | cpx: f64, |
1166 | cpy: f64, |
1167 | x: f64, |
1168 | y: f64, |
1169 | ); |
1170 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = rect)] |
1171 | #[doc = "The `rect()` method." ] |
1172 | #[doc = "" ] |
1173 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/rect)" ] |
1174 | #[doc = "" ] |
1175 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1176 | pub unsafefn rect(this: &OffscreenCanvasRenderingContext2d, x: f64, y: f64, w: f64, h: f64); |
1177 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = roundRect)] |
1178 | #[doc = "The `roundRect()` method." ] |
1179 | #[doc = "" ] |
1180 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/roundRect)" ] |
1181 | #[doc = "" ] |
1182 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1183 | pub unsafefn round_rect( |
1184 | this: &OffscreenCanvasRenderingContext2d, |
1185 | x: f64, |
1186 | y: f64, |
1187 | w: f64, |
1188 | h: f64, |
1189 | ) -> Result<(), JsValue>; |
1190 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = roundRect)] |
1191 | #[doc = "The `roundRect()` method." ] |
1192 | #[doc = "" ] |
1193 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/roundRect)" ] |
1194 | #[doc = "" ] |
1195 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1196 | pub unsafefn round_rect_with_f64( |
1197 | this: &OffscreenCanvasRenderingContext2d, |
1198 | x: f64, |
1199 | y: f64, |
1200 | w: f64, |
1201 | h: f64, |
1202 | radii: f64, |
1203 | ) -> Result<(), JsValue>; |
1204 | #[cfg (feature = "DomPointInit" )] |
1205 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = roundRect)] |
1206 | #[doc = "The `roundRect()` method." ] |
1207 | #[doc = "" ] |
1208 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/roundRect)" ] |
1209 | #[doc = "" ] |
1210 | #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `OffscreenCanvasRenderingContext2d`*" ] |
1211 | pub fn round_rect_with_dom_point_init( |
1212 | this: &OffscreenCanvasRenderingContext2d, |
1213 | x: f64, |
1214 | y: f64, |
1215 | w: f64, |
1216 | h: f64, |
1217 | radii: &DomPointInit, |
1218 | ) -> Result<(), JsValue>; |
1219 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = roundRect)] |
1220 | #[doc = "The `roundRect()` method." ] |
1221 | #[doc = "" ] |
1222 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/roundRect)" ] |
1223 | #[doc = "" ] |
1224 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1225 | pub unsafefn round_rect_with_f64_sequence( |
1226 | this: &OffscreenCanvasRenderingContext2d, |
1227 | x: f64, |
1228 | y: f64, |
1229 | w: f64, |
1230 | h: f64, |
1231 | radii: &::wasm_bindgen::JsValue, |
1232 | ) -> Result<(), JsValue>; |
1233 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = roundRect)] |
1234 | #[doc = "The `roundRect()` method." ] |
1235 | #[doc = "" ] |
1236 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/roundRect)" ] |
1237 | #[doc = "" ] |
1238 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1239 | pub unsafefn round_rect_with_dom_point_init_sequence( |
1240 | this: &OffscreenCanvasRenderingContext2d, |
1241 | x: f64, |
1242 | y: f64, |
1243 | w: f64, |
1244 | h: f64, |
1245 | radii: &::wasm_bindgen::JsValue, |
1246 | ) -> Result<(), JsValue>; |
1247 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = getLineDash)] |
1248 | #[doc = "The `getLineDash()` method." ] |
1249 | #[doc = "" ] |
1250 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/getLineDash)" ] |
1251 | #[doc = "" ] |
1252 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1253 | pub unsafefn get_line_dash(this: &OffscreenCanvasRenderingContext2d) -> ::js_sys::Array; |
1254 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = setLineDash)] |
1255 | #[doc = "The `setLineDash()` method." ] |
1256 | #[doc = "" ] |
1257 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/setLineDash)" ] |
1258 | #[doc = "" ] |
1259 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1260 | pub unsafefn set_line_dash( |
1261 | this: &OffscreenCanvasRenderingContext2d, |
1262 | segments: &::wasm_bindgen::JsValue, |
1263 | ) -> Result<(), JsValue>; |
1264 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = clearRect)] |
1265 | #[doc = "The `clearRect()` method." ] |
1266 | #[doc = "" ] |
1267 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/clearRect)" ] |
1268 | #[doc = "" ] |
1269 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1270 | pub unsafefn clear_rect(this: &OffscreenCanvasRenderingContext2d, x: f64, y: f64, w: f64, h: f64); |
1271 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = fillRect)] |
1272 | #[doc = "The `fillRect()` method." ] |
1273 | #[doc = "" ] |
1274 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fillRect)" ] |
1275 | #[doc = "" ] |
1276 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1277 | pub unsafefn fill_rect(this: &OffscreenCanvasRenderingContext2d, x: f64, y: f64, w: f64, h: f64); |
1278 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = strokeRect)] |
1279 | #[doc = "The `strokeRect()` method." ] |
1280 | #[doc = "" ] |
1281 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/strokeRect)" ] |
1282 | #[doc = "" ] |
1283 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1284 | pub unsafefn stroke_rect(this: &OffscreenCanvasRenderingContext2d, x: f64, y: f64, w: f64, h: f64); |
1285 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = reset)] |
1286 | #[doc = "The `reset()` method." ] |
1287 | #[doc = "" ] |
1288 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/reset)" ] |
1289 | #[doc = "" ] |
1290 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1291 | pub unsafefn reset(this: &OffscreenCanvasRenderingContext2d); |
1292 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = restore)] |
1293 | #[doc = "The `restore()` method." ] |
1294 | #[doc = "" ] |
1295 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/restore)" ] |
1296 | #[doc = "" ] |
1297 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1298 | pub unsafefn restore(this: &OffscreenCanvasRenderingContext2d); |
1299 | # [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = save)] |
1300 | #[doc = "The `save()` method." ] |
1301 | #[doc = "" ] |
1302 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/save)" ] |
1303 | #[doc = "" ] |
1304 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1305 | pub unsafefn save(this: &OffscreenCanvasRenderingContext2d); |
1306 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = fillText)] |
1307 | #[doc = "The `fillText()` method." ] |
1308 | #[doc = "" ] |
1309 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fillText)" ] |
1310 | #[doc = "" ] |
1311 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1312 | pub unsafefn fill_text( |
1313 | this: &OffscreenCanvasRenderingContext2d, |
1314 | text: &str, |
1315 | x: f64, |
1316 | y: f64, |
1317 | ) -> Result<(), JsValue>; |
1318 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = fillText)] |
1319 | #[doc = "The `fillText()` method." ] |
1320 | #[doc = "" ] |
1321 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fillText)" ] |
1322 | #[doc = "" ] |
1323 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1324 | pub unsafefn fill_text_with_max_width( |
1325 | this: &OffscreenCanvasRenderingContext2d, |
1326 | text: &str, |
1327 | x: f64, |
1328 | y: f64, |
1329 | max_width: f64, |
1330 | ) -> Result<(), JsValue>; |
1331 | #[cfg (feature = "TextMetrics" )] |
1332 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = measureText)] |
1333 | #[doc = "The `measureText()` method." ] |
1334 | #[doc = "" ] |
1335 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/measureText)" ] |
1336 | #[doc = "" ] |
1337 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `TextMetrics`*" ] |
1338 | pub fn measure_text( |
1339 | this: &OffscreenCanvasRenderingContext2d, |
1340 | text: &str, |
1341 | ) -> Result<TextMetrics, JsValue>; |
1342 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = strokeText)] |
1343 | #[doc = "The `strokeText()` method." ] |
1344 | #[doc = "" ] |
1345 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/strokeText)" ] |
1346 | #[doc = "" ] |
1347 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1348 | pub unsafefn stroke_text( |
1349 | this: &OffscreenCanvasRenderingContext2d, |
1350 | text: &str, |
1351 | x: f64, |
1352 | y: f64, |
1353 | ) -> Result<(), JsValue>; |
1354 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = strokeText)] |
1355 | #[doc = "The `strokeText()` method." ] |
1356 | #[doc = "" ] |
1357 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/strokeText)" ] |
1358 | #[doc = "" ] |
1359 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1360 | pub unsafefn stroke_text_with_max_width( |
1361 | this: &OffscreenCanvasRenderingContext2d, |
1362 | text: &str, |
1363 | x: f64, |
1364 | y: f64, |
1365 | max_width: f64, |
1366 | ) -> Result<(), JsValue>; |
1367 | #[cfg (feature = "DomMatrix" )] |
1368 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = getTransform)] |
1369 | #[doc = "The `getTransform()` method." ] |
1370 | #[doc = "" ] |
1371 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/getTransform)" ] |
1372 | #[doc = "" ] |
1373 | #[doc = "*This API requires the following crate features to be activated: `DomMatrix`, `OffscreenCanvasRenderingContext2d`*" ] |
1374 | pub fn get_transform(this: &OffscreenCanvasRenderingContext2d) -> Result<DomMatrix, JsValue>; |
1375 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = resetTransform)] |
1376 | #[doc = "The `resetTransform()` method." ] |
1377 | #[doc = "" ] |
1378 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/resetTransform)" ] |
1379 | #[doc = "" ] |
1380 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1381 | pub unsafefn reset_transform(this: &OffscreenCanvasRenderingContext2d) -> Result<(), JsValue>; |
1382 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = rotate)] |
1383 | #[doc = "The `rotate()` method." ] |
1384 | #[doc = "" ] |
1385 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/rotate)" ] |
1386 | #[doc = "" ] |
1387 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1388 | pub unsafefn rotate(this: &OffscreenCanvasRenderingContext2d, angle: f64) -> Result<(), JsValue>; |
1389 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = scale)] |
1390 | #[doc = "The `scale()` method." ] |
1391 | #[doc = "" ] |
1392 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/scale)" ] |
1393 | #[doc = "" ] |
1394 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1395 | pub unsafefn scale(this: &OffscreenCanvasRenderingContext2d, x: f64, y: f64) -> Result<(), JsValue>; |
1396 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = setTransform)] |
1397 | #[doc = "The `setTransform()` method." ] |
1398 | #[doc = "" ] |
1399 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/setTransform)" ] |
1400 | #[doc = "" ] |
1401 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1402 | pub unsafefn set_transform( |
1403 | this: &OffscreenCanvasRenderingContext2d, |
1404 | a: f64, |
1405 | b: f64, |
1406 | c: f64, |
1407 | d: f64, |
1408 | e: f64, |
1409 | f: f64, |
1410 | ) -> Result<(), JsValue>; |
1411 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = setTransform)] |
1412 | #[doc = "The `setTransform()` method." ] |
1413 | #[doc = "" ] |
1414 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/setTransform)" ] |
1415 | #[doc = "" ] |
1416 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1417 | pub unsafefn set_transform_with_default_dom_matrix_2d_init( |
1418 | this: &OffscreenCanvasRenderingContext2d, |
1419 | ) -> Result<(), JsValue>; |
1420 | #[cfg (feature = "DomMatrix2dInit" )] |
1421 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = setTransform)] |
1422 | #[doc = "The `setTransform()` method." ] |
1423 | #[doc = "" ] |
1424 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/setTransform)" ] |
1425 | #[doc = "" ] |
1426 | #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`, `OffscreenCanvasRenderingContext2d`*" ] |
1427 | pub fn set_transform_with_dom_matrix_2d_init( |
1428 | this: &OffscreenCanvasRenderingContext2d, |
1429 | transform: &DomMatrix2dInit, |
1430 | ) -> Result<(), JsValue>; |
1431 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = transform)] |
1432 | #[doc = "The `transform()` method." ] |
1433 | #[doc = "" ] |
1434 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/transform)" ] |
1435 | #[doc = "" ] |
1436 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1437 | pub unsafefn transform( |
1438 | this: &OffscreenCanvasRenderingContext2d, |
1439 | a: f64, |
1440 | b: f64, |
1441 | c: f64, |
1442 | d: f64, |
1443 | e: f64, |
1444 | f: f64, |
1445 | ) -> Result<(), JsValue>; |
1446 | # [wasm_bindgen (catch , method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = translate)] |
1447 | #[doc = "The `translate()` method." ] |
1448 | #[doc = "" ] |
1449 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/translate)" ] |
1450 | #[doc = "" ] |
1451 | #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*" ] |
1452 | pub unsafefn translate( |
1453 | this: &OffscreenCanvasRenderingContext2d, |
1454 | x: f64, |
1455 | y: f64, |
1456 | ) -> Result<(), JsValue>; |
1457 | } |
1458 | |