1#![allow(unused_imports)]
2#![allow(clippy::all)]
3use super::*;
4use wasm_bindgen::prelude::*;
5#[wasm_bindgen]
6extern "C" {
7 #[wasm_bindgen(
8 extends = "::js_sys::Object",
9 js_name = "OffscreenCanvasRenderingContext2D",
10 typescript_type = "OffscreenCanvasRenderingContext2D"
11 )]
12 #[derive(Debug, Clone, PartialEq, Eq)]
13 #[doc = "The `OffscreenCanvasRenderingContext2d` class."]
14 #[doc = ""]
15 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D)"]
16 #[doc = ""]
17 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
18 pub type OffscreenCanvasRenderingContext2d;
19 #[cfg(feature = "OffscreenCanvas")]
20 #[wasm_bindgen(
21 method,
22 getter,
23 js_class = "OffscreenCanvasRenderingContext2D",
24 js_name = "canvas"
25 )]
26 #[doc = "Getter for the `canvas` field of this object."]
27 #[doc = ""]
28 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/canvas)"]
29 #[doc = ""]
30 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvas`, `OffscreenCanvasRenderingContext2d`*"]
31 pub fn canvas(this: &OffscreenCanvasRenderingContext2d) -> OffscreenCanvas;
32 #[wasm_bindgen(
33 method,
34 getter,
35 js_class = "OffscreenCanvasRenderingContext2D",
36 js_name = "globalAlpha"
37 )]
38 #[doc = "Getter for the `globalAlpha` field of this object."]
39 #[doc = ""]
40 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/globalAlpha)"]
41 #[doc = ""]
42 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
43 pub fn global_alpha(this: &OffscreenCanvasRenderingContext2d) -> f64;
44 #[wasm_bindgen(
45 method,
46 setter,
47 js_class = "OffscreenCanvasRenderingContext2D",
48 js_name = "globalAlpha"
49 )]
50 #[doc = "Setter for the `globalAlpha` field of this object."]
51 #[doc = ""]
52 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/globalAlpha)"]
53 #[doc = ""]
54 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
55 pub fn set_global_alpha(this: &OffscreenCanvasRenderingContext2d, value: f64);
56 #[wasm_bindgen(
57 catch,
58 method,
59 getter,
60 js_class = "OffscreenCanvasRenderingContext2D",
61 js_name = "globalCompositeOperation"
62 )]
63 #[doc = "Getter for the `globalCompositeOperation` field of this object."]
64 #[doc = ""]
65 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/globalCompositeOperation)"]
66 #[doc = ""]
67 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
68 pub fn global_composite_operation(
69 this: &OffscreenCanvasRenderingContext2d,
70 ) -> Result<::alloc::string::String, JsValue>;
71 #[wasm_bindgen(
72 catch,
73 method,
74 setter,
75 js_class = "OffscreenCanvasRenderingContext2D",
76 js_name = "globalCompositeOperation"
77 )]
78 #[doc = "Setter for the `globalCompositeOperation` field of this object."]
79 #[doc = ""]
80 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/globalCompositeOperation)"]
81 #[doc = ""]
82 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
83 pub fn set_global_composite_operation(
84 this: &OffscreenCanvasRenderingContext2d,
85 value: &str,
86 ) -> Result<(), JsValue>;
87 #[wasm_bindgen(
88 method,
89 getter,
90 js_class = "OffscreenCanvasRenderingContext2D",
91 js_name = "strokeStyle"
92 )]
93 #[doc = "Getter for the `strokeStyle` field of this object."]
94 #[doc = ""]
95 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/strokeStyle)"]
96 #[doc = ""]
97 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
98 pub fn stroke_style(this: &OffscreenCanvasRenderingContext2d) -> ::wasm_bindgen::JsValue;
99 #[wasm_bindgen(
100 method,
101 setter,
102 js_class = "OffscreenCanvasRenderingContext2D",
103 js_name = "strokeStyle"
104 )]
105 #[doc = "Setter for the `strokeStyle` field of this object."]
106 #[doc = ""]
107 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/strokeStyle)"]
108 #[doc = ""]
109 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
110 #[deprecated]
111 pub fn set_stroke_style(
112 this: &OffscreenCanvasRenderingContext2d,
113 value: &::wasm_bindgen::JsValue,
114 );
115 #[wasm_bindgen(
116 method,
117 setter,
118 js_class = "OffscreenCanvasRenderingContext2D",
119 js_name = "strokeStyle"
120 )]
121 #[doc = "Setter for the `strokeStyle` field of this object."]
122 #[doc = ""]
123 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/strokeStyle)"]
124 #[doc = ""]
125 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
126 pub fn set_stroke_style_str(this: &OffscreenCanvasRenderingContext2d, value: &str);
127 #[cfg(feature = "CanvasGradient")]
128 #[wasm_bindgen(
129 method,
130 setter,
131 js_class = "OffscreenCanvasRenderingContext2D",
132 js_name = "strokeStyle"
133 )]
134 #[doc = "Setter for the `strokeStyle` field of this object."]
135 #[doc = ""]
136 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/strokeStyle)"]
137 #[doc = ""]
138 #[doc = "*This API requires the following crate features to be activated: `CanvasGradient`, `OffscreenCanvasRenderingContext2d`*"]
139 pub fn set_stroke_style_canvas_gradient(
140 this: &OffscreenCanvasRenderingContext2d,
141 value: &CanvasGradient,
142 );
143 #[cfg(feature = "CanvasPattern")]
144 #[wasm_bindgen(
145 method,
146 setter,
147 js_class = "OffscreenCanvasRenderingContext2D",
148 js_name = "strokeStyle"
149 )]
150 #[doc = "Setter for the `strokeStyle` field of this object."]
151 #[doc = ""]
152 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/strokeStyle)"]
153 #[doc = ""]
154 #[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `OffscreenCanvasRenderingContext2d`*"]
155 pub fn set_stroke_style_canvas_pattern(
156 this: &OffscreenCanvasRenderingContext2d,
157 value: &CanvasPattern,
158 );
159 #[wasm_bindgen(
160 method,
161 getter,
162 js_class = "OffscreenCanvasRenderingContext2D",
163 js_name = "fillStyle"
164 )]
165 #[doc = "Getter for the `fillStyle` field of this object."]
166 #[doc = ""]
167 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fillStyle)"]
168 #[doc = ""]
169 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
170 pub fn fill_style(this: &OffscreenCanvasRenderingContext2d) -> ::wasm_bindgen::JsValue;
171 #[wasm_bindgen(
172 method,
173 setter,
174 js_class = "OffscreenCanvasRenderingContext2D",
175 js_name = "fillStyle"
176 )]
177 #[doc = "Setter for the `fillStyle` field of this object."]
178 #[doc = ""]
179 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fillStyle)"]
180 #[doc = ""]
181 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
182 #[deprecated]
183 pub fn set_fill_style(
184 this: &OffscreenCanvasRenderingContext2d,
185 value: &::wasm_bindgen::JsValue,
186 );
187 #[wasm_bindgen(
188 method,
189 setter,
190 js_class = "OffscreenCanvasRenderingContext2D",
191 js_name = "fillStyle"
192 )]
193 #[doc = "Setter for the `fillStyle` field of this object."]
194 #[doc = ""]
195 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fillStyle)"]
196 #[doc = ""]
197 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
198 pub fn set_fill_style_str(this: &OffscreenCanvasRenderingContext2d, value: &str);
199 #[cfg(feature = "CanvasGradient")]
200 #[wasm_bindgen(
201 method,
202 setter,
203 js_class = "OffscreenCanvasRenderingContext2D",
204 js_name = "fillStyle"
205 )]
206 #[doc = "Setter for the `fillStyle` field of this object."]
207 #[doc = ""]
208 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fillStyle)"]
209 #[doc = ""]
210 #[doc = "*This API requires the following crate features to be activated: `CanvasGradient`, `OffscreenCanvasRenderingContext2d`*"]
211 pub fn set_fill_style_canvas_gradient(
212 this: &OffscreenCanvasRenderingContext2d,
213 value: &CanvasGradient,
214 );
215 #[cfg(feature = "CanvasPattern")]
216 #[wasm_bindgen(
217 method,
218 setter,
219 js_class = "OffscreenCanvasRenderingContext2D",
220 js_name = "fillStyle"
221 )]
222 #[doc = "Setter for the `fillStyle` field of this object."]
223 #[doc = ""]
224 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fillStyle)"]
225 #[doc = ""]
226 #[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `OffscreenCanvasRenderingContext2d`*"]
227 pub fn set_fill_style_canvas_pattern(
228 this: &OffscreenCanvasRenderingContext2d,
229 value: &CanvasPattern,
230 );
231 #[wasm_bindgen(
232 method,
233 getter,
234 js_class = "OffscreenCanvasRenderingContext2D",
235 js_name = "filter"
236 )]
237 #[doc = "Getter for the `filter` field of this object."]
238 #[doc = ""]
239 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/filter)"]
240 #[doc = ""]
241 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
242 pub fn filter(this: &OffscreenCanvasRenderingContext2d) -> ::alloc::string::String;
243 #[wasm_bindgen(
244 method,
245 setter,
246 js_class = "OffscreenCanvasRenderingContext2D",
247 js_name = "filter"
248 )]
249 #[doc = "Setter for the `filter` field of this object."]
250 #[doc = ""]
251 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/filter)"]
252 #[doc = ""]
253 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
254 pub fn set_filter(this: &OffscreenCanvasRenderingContext2d, value: &str);
255 #[wasm_bindgen(
256 method,
257 getter,
258 js_class = "OffscreenCanvasRenderingContext2D",
259 js_name = "imageSmoothingEnabled"
260 )]
261 #[doc = "Getter for the `imageSmoothingEnabled` field of this object."]
262 #[doc = ""]
263 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/imageSmoothingEnabled)"]
264 #[doc = ""]
265 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
266 pub fn image_smoothing_enabled(this: &OffscreenCanvasRenderingContext2d) -> bool;
267 #[wasm_bindgen(
268 method,
269 setter,
270 js_class = "OffscreenCanvasRenderingContext2D",
271 js_name = "imageSmoothingEnabled"
272 )]
273 #[doc = "Setter for the `imageSmoothingEnabled` field of this object."]
274 #[doc = ""]
275 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/imageSmoothingEnabled)"]
276 #[doc = ""]
277 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
278 pub fn set_image_smoothing_enabled(this: &OffscreenCanvasRenderingContext2d, value: bool);
279 #[wasm_bindgen(
280 method,
281 getter,
282 js_class = "OffscreenCanvasRenderingContext2D",
283 js_name = "lineWidth"
284 )]
285 #[doc = "Getter for the `lineWidth` field of this object."]
286 #[doc = ""]
287 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/lineWidth)"]
288 #[doc = ""]
289 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
290 pub fn line_width(this: &OffscreenCanvasRenderingContext2d) -> f64;
291 #[wasm_bindgen(
292 method,
293 setter,
294 js_class = "OffscreenCanvasRenderingContext2D",
295 js_name = "lineWidth"
296 )]
297 #[doc = "Setter for the `lineWidth` field of this object."]
298 #[doc = ""]
299 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/lineWidth)"]
300 #[doc = ""]
301 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
302 pub fn set_line_width(this: &OffscreenCanvasRenderingContext2d, value: f64);
303 #[wasm_bindgen(
304 method,
305 getter,
306 js_class = "OffscreenCanvasRenderingContext2D",
307 js_name = "lineCap"
308 )]
309 #[doc = "Getter for the `lineCap` field of this object."]
310 #[doc = ""]
311 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/lineCap)"]
312 #[doc = ""]
313 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
314 pub fn line_cap(this: &OffscreenCanvasRenderingContext2d) -> ::alloc::string::String;
315 #[wasm_bindgen(
316 method,
317 setter,
318 js_class = "OffscreenCanvasRenderingContext2D",
319 js_name = "lineCap"
320 )]
321 #[doc = "Setter for the `lineCap` field of this object."]
322 #[doc = ""]
323 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/lineCap)"]
324 #[doc = ""]
325 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
326 pub fn set_line_cap(this: &OffscreenCanvasRenderingContext2d, value: &str);
327 #[wasm_bindgen(
328 method,
329 getter,
330 js_class = "OffscreenCanvasRenderingContext2D",
331 js_name = "lineJoin"
332 )]
333 #[doc = "Getter for the `lineJoin` field of this object."]
334 #[doc = ""]
335 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/lineJoin)"]
336 #[doc = ""]
337 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
338 pub fn line_join(this: &OffscreenCanvasRenderingContext2d) -> ::alloc::string::String;
339 #[wasm_bindgen(
340 method,
341 setter,
342 js_class = "OffscreenCanvasRenderingContext2D",
343 js_name = "lineJoin"
344 )]
345 #[doc = "Setter for the `lineJoin` field of this object."]
346 #[doc = ""]
347 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/lineJoin)"]
348 #[doc = ""]
349 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
350 pub fn set_line_join(this: &OffscreenCanvasRenderingContext2d, value: &str);
351 #[wasm_bindgen(
352 method,
353 getter,
354 js_class = "OffscreenCanvasRenderingContext2D",
355 js_name = "miterLimit"
356 )]
357 #[doc = "Getter for the `miterLimit` field of this object."]
358 #[doc = ""]
359 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/miterLimit)"]
360 #[doc = ""]
361 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
362 pub fn miter_limit(this: &OffscreenCanvasRenderingContext2d) -> f64;
363 #[wasm_bindgen(
364 method,
365 setter,
366 js_class = "OffscreenCanvasRenderingContext2D",
367 js_name = "miterLimit"
368 )]
369 #[doc = "Setter for the `miterLimit` field of this object."]
370 #[doc = ""]
371 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/miterLimit)"]
372 #[doc = ""]
373 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
374 pub fn set_miter_limit(this: &OffscreenCanvasRenderingContext2d, value: f64);
375 #[wasm_bindgen(
376 method,
377 getter,
378 js_class = "OffscreenCanvasRenderingContext2D",
379 js_name = "lineDashOffset"
380 )]
381 #[doc = "Getter for the `lineDashOffset` field of this object."]
382 #[doc = ""]
383 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/lineDashOffset)"]
384 #[doc = ""]
385 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
386 pub fn line_dash_offset(this: &OffscreenCanvasRenderingContext2d) -> f64;
387 #[wasm_bindgen(
388 method,
389 setter,
390 js_class = "OffscreenCanvasRenderingContext2D",
391 js_name = "lineDashOffset"
392 )]
393 #[doc = "Setter for the `lineDashOffset` field of this object."]
394 #[doc = ""]
395 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/lineDashOffset)"]
396 #[doc = ""]
397 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
398 pub fn set_line_dash_offset(this: &OffscreenCanvasRenderingContext2d, value: f64);
399 #[wasm_bindgen(
400 method,
401 getter,
402 js_class = "OffscreenCanvasRenderingContext2D",
403 js_name = "shadowOffsetX"
404 )]
405 #[doc = "Getter for the `shadowOffsetX` field of this object."]
406 #[doc = ""]
407 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/shadowOffsetX)"]
408 #[doc = ""]
409 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
410 pub fn shadow_offset_x(this: &OffscreenCanvasRenderingContext2d) -> f64;
411 #[wasm_bindgen(
412 method,
413 setter,
414 js_class = "OffscreenCanvasRenderingContext2D",
415 js_name = "shadowOffsetX"
416 )]
417 #[doc = "Setter for the `shadowOffsetX` field of this object."]
418 #[doc = ""]
419 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/shadowOffsetX)"]
420 #[doc = ""]
421 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
422 pub fn set_shadow_offset_x(this: &OffscreenCanvasRenderingContext2d, value: f64);
423 #[wasm_bindgen(
424 method,
425 getter,
426 js_class = "OffscreenCanvasRenderingContext2D",
427 js_name = "shadowOffsetY"
428 )]
429 #[doc = "Getter for the `shadowOffsetY` field of this object."]
430 #[doc = ""]
431 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/shadowOffsetY)"]
432 #[doc = ""]
433 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
434 pub fn shadow_offset_y(this: &OffscreenCanvasRenderingContext2d) -> f64;
435 #[wasm_bindgen(
436 method,
437 setter,
438 js_class = "OffscreenCanvasRenderingContext2D",
439 js_name = "shadowOffsetY"
440 )]
441 #[doc = "Setter for the `shadowOffsetY` field of this object."]
442 #[doc = ""]
443 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/shadowOffsetY)"]
444 #[doc = ""]
445 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
446 pub fn set_shadow_offset_y(this: &OffscreenCanvasRenderingContext2d, value: f64);
447 #[wasm_bindgen(
448 method,
449 getter,
450 js_class = "OffscreenCanvasRenderingContext2D",
451 js_name = "shadowBlur"
452 )]
453 #[doc = "Getter for the `shadowBlur` field of this object."]
454 #[doc = ""]
455 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/shadowBlur)"]
456 #[doc = ""]
457 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
458 pub fn shadow_blur(this: &OffscreenCanvasRenderingContext2d) -> f64;
459 #[wasm_bindgen(
460 method,
461 setter,
462 js_class = "OffscreenCanvasRenderingContext2D",
463 js_name = "shadowBlur"
464 )]
465 #[doc = "Setter for the `shadowBlur` field of this object."]
466 #[doc = ""]
467 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/shadowBlur)"]
468 #[doc = ""]
469 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
470 pub fn set_shadow_blur(this: &OffscreenCanvasRenderingContext2d, value: f64);
471 #[wasm_bindgen(
472 method,
473 getter,
474 js_class = "OffscreenCanvasRenderingContext2D",
475 js_name = "shadowColor"
476 )]
477 #[doc = "Getter for the `shadowColor` field of this object."]
478 #[doc = ""]
479 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/shadowColor)"]
480 #[doc = ""]
481 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
482 pub fn shadow_color(this: &OffscreenCanvasRenderingContext2d) -> ::alloc::string::String;
483 #[wasm_bindgen(
484 method,
485 setter,
486 js_class = "OffscreenCanvasRenderingContext2D",
487 js_name = "shadowColor"
488 )]
489 #[doc = "Setter for the `shadowColor` field of this object."]
490 #[doc = ""]
491 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/shadowColor)"]
492 #[doc = ""]
493 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
494 pub fn set_shadow_color(this: &OffscreenCanvasRenderingContext2d, value: &str);
495 #[wasm_bindgen(
496 method,
497 getter,
498 js_class = "OffscreenCanvasRenderingContext2D",
499 js_name = "font"
500 )]
501 #[doc = "Getter for the `font` field of this object."]
502 #[doc = ""]
503 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/font)"]
504 #[doc = ""]
505 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
506 pub fn font(this: &OffscreenCanvasRenderingContext2d) -> ::alloc::string::String;
507 #[wasm_bindgen(
508 method,
509 setter,
510 js_class = "OffscreenCanvasRenderingContext2D",
511 js_name = "font"
512 )]
513 #[doc = "Setter for the `font` field of this object."]
514 #[doc = ""]
515 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/font)"]
516 #[doc = ""]
517 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
518 pub fn set_font(this: &OffscreenCanvasRenderingContext2d, value: &str);
519 #[wasm_bindgen(
520 method,
521 getter,
522 js_class = "OffscreenCanvasRenderingContext2D",
523 js_name = "textAlign"
524 )]
525 #[doc = "Getter for the `textAlign` field of this object."]
526 #[doc = ""]
527 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/textAlign)"]
528 #[doc = ""]
529 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
530 pub fn text_align(this: &OffscreenCanvasRenderingContext2d) -> ::alloc::string::String;
531 #[wasm_bindgen(
532 method,
533 setter,
534 js_class = "OffscreenCanvasRenderingContext2D",
535 js_name = "textAlign"
536 )]
537 #[doc = "Setter for the `textAlign` field of this object."]
538 #[doc = ""]
539 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/textAlign)"]
540 #[doc = ""]
541 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
542 pub fn set_text_align(this: &OffscreenCanvasRenderingContext2d, value: &str);
543 #[wasm_bindgen(
544 method,
545 getter,
546 js_class = "OffscreenCanvasRenderingContext2D",
547 js_name = "textBaseline"
548 )]
549 #[doc = "Getter for the `textBaseline` field of this object."]
550 #[doc = ""]
551 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/textBaseline)"]
552 #[doc = ""]
553 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
554 pub fn text_baseline(this: &OffscreenCanvasRenderingContext2d) -> ::alloc::string::String;
555 #[wasm_bindgen(
556 method,
557 setter,
558 js_class = "OffscreenCanvasRenderingContext2D",
559 js_name = "textBaseline"
560 )]
561 #[doc = "Setter for the `textBaseline` field of this object."]
562 #[doc = ""]
563 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/textBaseline)"]
564 #[doc = ""]
565 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
566 pub fn set_text_baseline(this: &OffscreenCanvasRenderingContext2d, value: &str);
567 #[cfg(feature = "HtmlImageElement")]
568 #[wasm_bindgen(
569 catch,
570 method,
571 js_class = "OffscreenCanvasRenderingContext2D",
572 js_name = "drawImage"
573 )]
574 #[doc = "The `drawImage()` method."]
575 #[doc = ""]
576 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
577 #[doc = ""]
578 #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`, `OffscreenCanvasRenderingContext2d`*"]
579 pub fn draw_image_with_html_image_element(
580 this: &OffscreenCanvasRenderingContext2d,
581 image: &HtmlImageElement,
582 dx: f64,
583 dy: f64,
584 ) -> Result<(), JsValue>;
585 #[cfg(feature = "SvgImageElement")]
586 #[wasm_bindgen(
587 catch,
588 method,
589 js_class = "OffscreenCanvasRenderingContext2D",
590 js_name = "drawImage"
591 )]
592 #[doc = "The `drawImage()` method."]
593 #[doc = ""]
594 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
595 #[doc = ""]
596 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `SvgImageElement`*"]
597 pub fn draw_image_with_svg_image_element(
598 this: &OffscreenCanvasRenderingContext2d,
599 image: &SvgImageElement,
600 dx: f64,
601 dy: f64,
602 ) -> Result<(), JsValue>;
603 #[cfg(feature = "HtmlCanvasElement")]
604 #[wasm_bindgen(
605 catch,
606 method,
607 js_class = "OffscreenCanvasRenderingContext2D",
608 js_name = "drawImage"
609 )]
610 #[doc = "The `drawImage()` method."]
611 #[doc = ""]
612 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
613 #[doc = ""]
614 #[doc = "*This API requires the following crate features to be activated: `HtmlCanvasElement`, `OffscreenCanvasRenderingContext2d`*"]
615 pub fn draw_image_with_html_canvas_element(
616 this: &OffscreenCanvasRenderingContext2d,
617 image: &HtmlCanvasElement,
618 dx: f64,
619 dy: f64,
620 ) -> Result<(), JsValue>;
621 #[cfg(feature = "HtmlVideoElement")]
622 #[wasm_bindgen(
623 catch,
624 method,
625 js_class = "OffscreenCanvasRenderingContext2D",
626 js_name = "drawImage"
627 )]
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: `HtmlVideoElement`, `OffscreenCanvasRenderingContext2d`*"]
633 pub fn draw_image_with_html_video_element(
634 this: &OffscreenCanvasRenderingContext2d,
635 image: &HtmlVideoElement,
636 dx: f64,
637 dy: f64,
638 ) -> Result<(), JsValue>;
639 #[cfg(feature = "ImageBitmap")]
640 #[wasm_bindgen(
641 catch,
642 method,
643 js_class = "OffscreenCanvasRenderingContext2D",
644 js_name = "drawImage"
645 )]
646 #[doc = "The `drawImage()` method."]
647 #[doc = ""]
648 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
649 #[doc = ""]
650 #[doc = "*This API requires the following crate features to be activated: `ImageBitmap`, `OffscreenCanvasRenderingContext2d`*"]
651 pub fn draw_image_with_image_bitmap(
652 this: &OffscreenCanvasRenderingContext2d,
653 image: &ImageBitmap,
654 dx: f64,
655 dy: f64,
656 ) -> Result<(), JsValue>;
657 #[cfg(feature = "OffscreenCanvas")]
658 #[wasm_bindgen(
659 catch,
660 method,
661 js_class = "OffscreenCanvasRenderingContext2D",
662 js_name = "drawImage"
663 )]
664 #[doc = "The `drawImage()` method."]
665 #[doc = ""]
666 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
667 #[doc = ""]
668 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvas`, `OffscreenCanvasRenderingContext2d`*"]
669 pub fn draw_image_with_offscreen_canvas(
670 this: &OffscreenCanvasRenderingContext2d,
671 image: &OffscreenCanvas,
672 dx: f64,
673 dy: f64,
674 ) -> Result<(), JsValue>;
675 #[cfg(feature = "VideoFrame")]
676 #[wasm_bindgen(
677 catch,
678 method,
679 js_class = "OffscreenCanvasRenderingContext2D",
680 js_name = "drawImage"
681 )]
682 #[doc = "The `drawImage()` method."]
683 #[doc = ""]
684 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
685 #[doc = ""]
686 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `VideoFrame`*"]
687 pub fn draw_image_with_video_frame(
688 this: &OffscreenCanvasRenderingContext2d,
689 image: &VideoFrame,
690 dx: f64,
691 dy: f64,
692 ) -> Result<(), JsValue>;
693 #[cfg(feature = "HtmlImageElement")]
694 #[wasm_bindgen(
695 catch,
696 method,
697 js_class = "OffscreenCanvasRenderingContext2D",
698 js_name = "drawImage"
699 )]
700 #[doc = "The `drawImage()` method."]
701 #[doc = ""]
702 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
703 #[doc = ""]
704 #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`, `OffscreenCanvasRenderingContext2d`*"]
705 pub fn draw_image_with_html_image_element_and_dw_and_dh(
706 this: &OffscreenCanvasRenderingContext2d,
707 image: &HtmlImageElement,
708 dx: f64,
709 dy: f64,
710 dw: f64,
711 dh: f64,
712 ) -> Result<(), JsValue>;
713 #[cfg(feature = "SvgImageElement")]
714 #[wasm_bindgen(
715 catch,
716 method,
717 js_class = "OffscreenCanvasRenderingContext2D",
718 js_name = "drawImage"
719 )]
720 #[doc = "The `drawImage()` method."]
721 #[doc = ""]
722 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
723 #[doc = ""]
724 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `SvgImageElement`*"]
725 pub fn draw_image_with_svg_image_element_and_dw_and_dh(
726 this: &OffscreenCanvasRenderingContext2d,
727 image: &SvgImageElement,
728 dx: f64,
729 dy: f64,
730 dw: f64,
731 dh: f64,
732 ) -> Result<(), JsValue>;
733 #[cfg(feature = "HtmlCanvasElement")]
734 #[wasm_bindgen(
735 catch,
736 method,
737 js_class = "OffscreenCanvasRenderingContext2D",
738 js_name = "drawImage"
739 )]
740 #[doc = "The `drawImage()` method."]
741 #[doc = ""]
742 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
743 #[doc = ""]
744 #[doc = "*This API requires the following crate features to be activated: `HtmlCanvasElement`, `OffscreenCanvasRenderingContext2d`*"]
745 pub fn draw_image_with_html_canvas_element_and_dw_and_dh(
746 this: &OffscreenCanvasRenderingContext2d,
747 image: &HtmlCanvasElement,
748 dx: f64,
749 dy: f64,
750 dw: f64,
751 dh: f64,
752 ) -> Result<(), JsValue>;
753 #[cfg(feature = "HtmlVideoElement")]
754 #[wasm_bindgen(
755 catch,
756 method,
757 js_class = "OffscreenCanvasRenderingContext2D",
758 js_name = "drawImage"
759 )]
760 #[doc = "The `drawImage()` method."]
761 #[doc = ""]
762 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
763 #[doc = ""]
764 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`, `OffscreenCanvasRenderingContext2d`*"]
765 pub fn draw_image_with_html_video_element_and_dw_and_dh(
766 this: &OffscreenCanvasRenderingContext2d,
767 image: &HtmlVideoElement,
768 dx: f64,
769 dy: f64,
770 dw: f64,
771 dh: f64,
772 ) -> Result<(), JsValue>;
773 #[cfg(feature = "ImageBitmap")]
774 #[wasm_bindgen(
775 catch,
776 method,
777 js_class = "OffscreenCanvasRenderingContext2D",
778 js_name = "drawImage"
779 )]
780 #[doc = "The `drawImage()` method."]
781 #[doc = ""]
782 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
783 #[doc = ""]
784 #[doc = "*This API requires the following crate features to be activated: `ImageBitmap`, `OffscreenCanvasRenderingContext2d`*"]
785 pub fn draw_image_with_image_bitmap_and_dw_and_dh(
786 this: &OffscreenCanvasRenderingContext2d,
787 image: &ImageBitmap,
788 dx: f64,
789 dy: f64,
790 dw: f64,
791 dh: f64,
792 ) -> Result<(), JsValue>;
793 #[cfg(feature = "OffscreenCanvas")]
794 #[wasm_bindgen(
795 catch,
796 method,
797 js_class = "OffscreenCanvasRenderingContext2D",
798 js_name = "drawImage"
799 )]
800 #[doc = "The `drawImage()` method."]
801 #[doc = ""]
802 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
803 #[doc = ""]
804 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvas`, `OffscreenCanvasRenderingContext2d`*"]
805 pub fn draw_image_with_offscreen_canvas_and_dw_and_dh(
806 this: &OffscreenCanvasRenderingContext2d,
807 image: &OffscreenCanvas,
808 dx: f64,
809 dy: f64,
810 dw: f64,
811 dh: f64,
812 ) -> Result<(), JsValue>;
813 #[cfg(feature = "VideoFrame")]
814 #[wasm_bindgen(
815 catch,
816 method,
817 js_class = "OffscreenCanvasRenderingContext2D",
818 js_name = "drawImage"
819 )]
820 #[doc = "The `drawImage()` method."]
821 #[doc = ""]
822 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
823 #[doc = ""]
824 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `VideoFrame`*"]
825 pub fn draw_image_with_video_frame_and_dw_and_dh(
826 this: &OffscreenCanvasRenderingContext2d,
827 image: &VideoFrame,
828 dx: f64,
829 dy: f64,
830 dw: f64,
831 dh: f64,
832 ) -> Result<(), JsValue>;
833 #[cfg(feature = "HtmlImageElement")]
834 #[wasm_bindgen(
835 catch,
836 method,
837 js_class = "OffscreenCanvasRenderingContext2D",
838 js_name = "drawImage"
839 )]
840 #[doc = "The `drawImage()` method."]
841 #[doc = ""]
842 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
843 #[doc = ""]
844 #[doc = "*This API requires the following crate features to be activated: `HtmlImageElement`, `OffscreenCanvasRenderingContext2d`*"]
845 pub fn draw_image_with_html_image_element_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh(
846 this: &OffscreenCanvasRenderingContext2d,
847 image: &HtmlImageElement,
848 sx: f64,
849 sy: f64,
850 sw: f64,
851 sh: f64,
852 dx: f64,
853 dy: f64,
854 dw: f64,
855 dh: f64,
856 ) -> Result<(), JsValue>;
857 #[cfg(feature = "SvgImageElement")]
858 #[wasm_bindgen(
859 catch,
860 method,
861 js_class = "OffscreenCanvasRenderingContext2D",
862 js_name = "drawImage"
863 )]
864 #[doc = "The `drawImage()` method."]
865 #[doc = ""]
866 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
867 #[doc = ""]
868 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `SvgImageElement`*"]
869 pub fn draw_image_with_svg_image_element_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh(
870 this: &OffscreenCanvasRenderingContext2d,
871 image: &SvgImageElement,
872 sx: f64,
873 sy: f64,
874 sw: f64,
875 sh: f64,
876 dx: f64,
877 dy: f64,
878 dw: f64,
879 dh: f64,
880 ) -> Result<(), JsValue>;
881 #[cfg(feature = "HtmlCanvasElement")]
882 #[wasm_bindgen(
883 catch,
884 method,
885 js_class = "OffscreenCanvasRenderingContext2D",
886 js_name = "drawImage"
887 )]
888 #[doc = "The `drawImage()` method."]
889 #[doc = ""]
890 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
891 #[doc = ""]
892 #[doc = "*This API requires the following crate features to be activated: `HtmlCanvasElement`, `OffscreenCanvasRenderingContext2d`*"]
893 pub fn draw_image_with_html_canvas_element_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh(
894 this: &OffscreenCanvasRenderingContext2d,
895 image: &HtmlCanvasElement,
896 sx: f64,
897 sy: f64,
898 sw: f64,
899 sh: f64,
900 dx: f64,
901 dy: f64,
902 dw: f64,
903 dh: f64,
904 ) -> Result<(), JsValue>;
905 #[cfg(feature = "HtmlVideoElement")]
906 #[wasm_bindgen(
907 catch,
908 method,
909 js_class = "OffscreenCanvasRenderingContext2D",
910 js_name = "drawImage"
911 )]
912 #[doc = "The `drawImage()` method."]
913 #[doc = ""]
914 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
915 #[doc = ""]
916 #[doc = "*This API requires the following crate features to be activated: `HtmlVideoElement`, `OffscreenCanvasRenderingContext2d`*"]
917 pub fn draw_image_with_html_video_element_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh(
918 this: &OffscreenCanvasRenderingContext2d,
919 image: &HtmlVideoElement,
920 sx: f64,
921 sy: f64,
922 sw: f64,
923 sh: f64,
924 dx: f64,
925 dy: f64,
926 dw: f64,
927 dh: f64,
928 ) -> Result<(), JsValue>;
929 #[cfg(feature = "ImageBitmap")]
930 #[wasm_bindgen(
931 catch,
932 method,
933 js_class = "OffscreenCanvasRenderingContext2D",
934 js_name = "drawImage"
935 )]
936 #[doc = "The `drawImage()` method."]
937 #[doc = ""]
938 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
939 #[doc = ""]
940 #[doc = "*This API requires the following crate features to be activated: `ImageBitmap`, `OffscreenCanvasRenderingContext2d`*"]
941 pub fn draw_image_with_image_bitmap_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh(
942 this: &OffscreenCanvasRenderingContext2d,
943 image: &ImageBitmap,
944 sx: f64,
945 sy: f64,
946 sw: f64,
947 sh: f64,
948 dx: f64,
949 dy: f64,
950 dw: f64,
951 dh: f64,
952 ) -> Result<(), JsValue>;
953 #[cfg(feature = "OffscreenCanvas")]
954 #[wasm_bindgen(
955 catch,
956 method,
957 js_class = "OffscreenCanvasRenderingContext2D",
958 js_name = "drawImage"
959 )]
960 #[doc = "The `drawImage()` method."]
961 #[doc = ""]
962 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
963 #[doc = ""]
964 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvas`, `OffscreenCanvasRenderingContext2d`*"]
965 pub fn draw_image_with_offscreen_canvas_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh(
966 this: &OffscreenCanvasRenderingContext2d,
967 image: &OffscreenCanvas,
968 sx: f64,
969 sy: f64,
970 sw: f64,
971 sh: f64,
972 dx: f64,
973 dy: f64,
974 dw: f64,
975 dh: f64,
976 ) -> Result<(), JsValue>;
977 #[cfg(feature = "VideoFrame")]
978 #[wasm_bindgen(
979 catch,
980 method,
981 js_class = "OffscreenCanvasRenderingContext2D",
982 js_name = "drawImage"
983 )]
984 #[doc = "The `drawImage()` method."]
985 #[doc = ""]
986 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/drawImage)"]
987 #[doc = ""]
988 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `VideoFrame`*"]
989 pub fn draw_image_with_video_frame_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh(
990 this: &OffscreenCanvasRenderingContext2d,
991 image: &VideoFrame,
992 sx: f64,
993 sy: f64,
994 sw: f64,
995 sh: f64,
996 dx: f64,
997 dy: f64,
998 dw: f64,
999 dh: f64,
1000 ) -> Result<(), JsValue>;
1001 #[wasm_bindgen(
1002 method,
1003 js_class = "OffscreenCanvasRenderingContext2D",
1004 js_name = "beginPath"
1005 )]
1006 #[doc = "The `beginPath()` method."]
1007 #[doc = ""]
1008 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/beginPath)"]
1009 #[doc = ""]
1010 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1011 pub fn begin_path(this: &OffscreenCanvasRenderingContext2d);
1012 #[wasm_bindgen(method, js_class = "OffscreenCanvasRenderingContext2D")]
1013 #[doc = "The `clip()` method."]
1014 #[doc = ""]
1015 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/clip)"]
1016 #[doc = ""]
1017 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1018 pub fn clip(this: &OffscreenCanvasRenderingContext2d);
1019 #[cfg(feature = "CanvasWindingRule")]
1020 #[wasm_bindgen(
1021 method,
1022 js_class = "OffscreenCanvasRenderingContext2D",
1023 js_name = "clip"
1024 )]
1025 #[doc = "The `clip()` method."]
1026 #[doc = ""]
1027 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/clip)"]
1028 #[doc = ""]
1029 #[doc = "*This API requires the following crate features to be activated: `CanvasWindingRule`, `OffscreenCanvasRenderingContext2d`*"]
1030 pub fn clip_with_canvas_winding_rule(
1031 this: &OffscreenCanvasRenderingContext2d,
1032 winding: CanvasWindingRule,
1033 );
1034 #[cfg(feature = "Path2d")]
1035 #[wasm_bindgen(
1036 method,
1037 js_class = "OffscreenCanvasRenderingContext2D",
1038 js_name = "clip"
1039 )]
1040 #[doc = "The `clip()` method."]
1041 #[doc = ""]
1042 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/clip)"]
1043 #[doc = ""]
1044 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `Path2d`*"]
1045 pub fn clip_with_path_2d(this: &OffscreenCanvasRenderingContext2d, path: &Path2d);
1046 #[cfg(all(feature = "CanvasWindingRule", feature = "Path2d",))]
1047 #[wasm_bindgen(
1048 method,
1049 js_class = "OffscreenCanvasRenderingContext2D",
1050 js_name = "clip"
1051 )]
1052 #[doc = "The `clip()` method."]
1053 #[doc = ""]
1054 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/clip)"]
1055 #[doc = ""]
1056 #[doc = "*This API requires the following crate features to be activated: `CanvasWindingRule`, `OffscreenCanvasRenderingContext2d`, `Path2d`*"]
1057 pub fn clip_with_path_2d_and_winding(
1058 this: &OffscreenCanvasRenderingContext2d,
1059 path: &Path2d,
1060 winding: CanvasWindingRule,
1061 );
1062 #[wasm_bindgen(method, js_class = "OffscreenCanvasRenderingContext2D")]
1063 #[doc = "The `fill()` method."]
1064 #[doc = ""]
1065 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fill)"]
1066 #[doc = ""]
1067 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1068 pub fn fill(this: &OffscreenCanvasRenderingContext2d);
1069 #[cfg(feature = "CanvasWindingRule")]
1070 #[wasm_bindgen(
1071 method,
1072 js_class = "OffscreenCanvasRenderingContext2D",
1073 js_name = "fill"
1074 )]
1075 #[doc = "The `fill()` method."]
1076 #[doc = ""]
1077 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fill)"]
1078 #[doc = ""]
1079 #[doc = "*This API requires the following crate features to be activated: `CanvasWindingRule`, `OffscreenCanvasRenderingContext2d`*"]
1080 pub fn fill_with_canvas_winding_rule(
1081 this: &OffscreenCanvasRenderingContext2d,
1082 winding: CanvasWindingRule,
1083 );
1084 #[cfg(feature = "Path2d")]
1085 #[wasm_bindgen(
1086 method,
1087 js_class = "OffscreenCanvasRenderingContext2D",
1088 js_name = "fill"
1089 )]
1090 #[doc = "The `fill()` method."]
1091 #[doc = ""]
1092 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fill)"]
1093 #[doc = ""]
1094 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `Path2d`*"]
1095 pub fn fill_with_path_2d(this: &OffscreenCanvasRenderingContext2d, path: &Path2d);
1096 #[cfg(all(feature = "CanvasWindingRule", feature = "Path2d",))]
1097 #[wasm_bindgen(
1098 method,
1099 js_class = "OffscreenCanvasRenderingContext2D",
1100 js_name = "fill"
1101 )]
1102 #[doc = "The `fill()` method."]
1103 #[doc = ""]
1104 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fill)"]
1105 #[doc = ""]
1106 #[doc = "*This API requires the following crate features to be activated: `CanvasWindingRule`, `OffscreenCanvasRenderingContext2d`, `Path2d`*"]
1107 pub fn fill_with_path_2d_and_winding(
1108 this: &OffscreenCanvasRenderingContext2d,
1109 path: &Path2d,
1110 winding: CanvasWindingRule,
1111 );
1112 #[wasm_bindgen(
1113 method,
1114 js_class = "OffscreenCanvasRenderingContext2D",
1115 js_name = "isPointInPath"
1116 )]
1117 #[doc = "The `isPointInPath()` method."]
1118 #[doc = ""]
1119 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/isPointInPath)"]
1120 #[doc = ""]
1121 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1122 pub fn is_point_in_path_with_f64(
1123 this: &OffscreenCanvasRenderingContext2d,
1124 x: f64,
1125 y: f64,
1126 ) -> bool;
1127 #[cfg(feature = "CanvasWindingRule")]
1128 #[wasm_bindgen(
1129 method,
1130 js_class = "OffscreenCanvasRenderingContext2D",
1131 js_name = "isPointInPath"
1132 )]
1133 #[doc = "The `isPointInPath()` method."]
1134 #[doc = ""]
1135 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/isPointInPath)"]
1136 #[doc = ""]
1137 #[doc = "*This API requires the following crate features to be activated: `CanvasWindingRule`, `OffscreenCanvasRenderingContext2d`*"]
1138 pub fn is_point_in_path_with_f64_and_canvas_winding_rule(
1139 this: &OffscreenCanvasRenderingContext2d,
1140 x: f64,
1141 y: f64,
1142 winding: CanvasWindingRule,
1143 ) -> bool;
1144 #[cfg(feature = "Path2d")]
1145 #[wasm_bindgen(
1146 method,
1147 js_class = "OffscreenCanvasRenderingContext2D",
1148 js_name = "isPointInPath"
1149 )]
1150 #[doc = "The `isPointInPath()` method."]
1151 #[doc = ""]
1152 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/isPointInPath)"]
1153 #[doc = ""]
1154 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `Path2d`*"]
1155 pub fn is_point_in_path_with_path_2d_and_f64(
1156 this: &OffscreenCanvasRenderingContext2d,
1157 path: &Path2d,
1158 x: f64,
1159 y: f64,
1160 ) -> bool;
1161 #[cfg(all(feature = "CanvasWindingRule", feature = "Path2d",))]
1162 #[wasm_bindgen(
1163 method,
1164 js_class = "OffscreenCanvasRenderingContext2D",
1165 js_name = "isPointInPath"
1166 )]
1167 #[doc = "The `isPointInPath()` method."]
1168 #[doc = ""]
1169 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/isPointInPath)"]
1170 #[doc = ""]
1171 #[doc = "*This API requires the following crate features to be activated: `CanvasWindingRule`, `OffscreenCanvasRenderingContext2d`, `Path2d`*"]
1172 pub fn is_point_in_path_with_path_2d_and_f64_and_winding(
1173 this: &OffscreenCanvasRenderingContext2d,
1174 path: &Path2d,
1175 x: f64,
1176 y: f64,
1177 winding: CanvasWindingRule,
1178 ) -> bool;
1179 #[wasm_bindgen(
1180 method,
1181 js_class = "OffscreenCanvasRenderingContext2D",
1182 js_name = "isPointInStroke"
1183 )]
1184 #[doc = "The `isPointInStroke()` method."]
1185 #[doc = ""]
1186 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/isPointInStroke)"]
1187 #[doc = ""]
1188 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1189 pub fn is_point_in_stroke_with_x_and_y(
1190 this: &OffscreenCanvasRenderingContext2d,
1191 x: f64,
1192 y: f64,
1193 ) -> bool;
1194 #[cfg(feature = "Path2d")]
1195 #[wasm_bindgen(
1196 method,
1197 js_class = "OffscreenCanvasRenderingContext2D",
1198 js_name = "isPointInStroke"
1199 )]
1200 #[doc = "The `isPointInStroke()` method."]
1201 #[doc = ""]
1202 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/isPointInStroke)"]
1203 #[doc = ""]
1204 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `Path2d`*"]
1205 pub fn is_point_in_stroke_with_path_and_x_and_y(
1206 this: &OffscreenCanvasRenderingContext2d,
1207 path: &Path2d,
1208 x: f64,
1209 y: f64,
1210 ) -> bool;
1211 #[wasm_bindgen(method, js_class = "OffscreenCanvasRenderingContext2D")]
1212 #[doc = "The `stroke()` method."]
1213 #[doc = ""]
1214 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/stroke)"]
1215 #[doc = ""]
1216 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1217 pub fn stroke(this: &OffscreenCanvasRenderingContext2d);
1218 #[cfg(feature = "Path2d")]
1219 #[wasm_bindgen(
1220 method,
1221 js_class = "OffscreenCanvasRenderingContext2D",
1222 js_name = "stroke"
1223 )]
1224 #[doc = "The `stroke()` method."]
1225 #[doc = ""]
1226 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/stroke)"]
1227 #[doc = ""]
1228 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `Path2d`*"]
1229 pub fn stroke_with_path(this: &OffscreenCanvasRenderingContext2d, path: &Path2d);
1230 #[cfg(feature = "CanvasGradient")]
1231 #[wasm_bindgen(
1232 method,
1233 js_class = "OffscreenCanvasRenderingContext2D",
1234 js_name = "createLinearGradient"
1235 )]
1236 #[doc = "The `createLinearGradient()` method."]
1237 #[doc = ""]
1238 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createLinearGradient)"]
1239 #[doc = ""]
1240 #[doc = "*This API requires the following crate features to be activated: `CanvasGradient`, `OffscreenCanvasRenderingContext2d`*"]
1241 pub fn create_linear_gradient(
1242 this: &OffscreenCanvasRenderingContext2d,
1243 x0: f64,
1244 y0: f64,
1245 x1: f64,
1246 y1: f64,
1247 ) -> CanvasGradient;
1248 #[cfg(all(feature = "CanvasPattern", feature = "HtmlImageElement",))]
1249 #[wasm_bindgen(
1250 catch,
1251 method,
1252 js_class = "OffscreenCanvasRenderingContext2D",
1253 js_name = "createPattern"
1254 )]
1255 #[doc = "The `createPattern()` method."]
1256 #[doc = ""]
1257 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createPattern)"]
1258 #[doc = ""]
1259 #[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `HtmlImageElement`, `OffscreenCanvasRenderingContext2d`*"]
1260 pub fn create_pattern_with_html_image_element(
1261 this: &OffscreenCanvasRenderingContext2d,
1262 image: &HtmlImageElement,
1263 repetition: &str,
1264 ) -> Result<Option<CanvasPattern>, JsValue>;
1265 #[cfg(all(feature = "CanvasPattern", feature = "SvgImageElement",))]
1266 #[wasm_bindgen(
1267 catch,
1268 method,
1269 js_class = "OffscreenCanvasRenderingContext2D",
1270 js_name = "createPattern"
1271 )]
1272 #[doc = "The `createPattern()` method."]
1273 #[doc = ""]
1274 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createPattern)"]
1275 #[doc = ""]
1276 #[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `OffscreenCanvasRenderingContext2d`, `SvgImageElement`*"]
1277 pub fn create_pattern_with_svg_image_element(
1278 this: &OffscreenCanvasRenderingContext2d,
1279 image: &SvgImageElement,
1280 repetition: &str,
1281 ) -> Result<Option<CanvasPattern>, JsValue>;
1282 #[cfg(all(feature = "CanvasPattern", feature = "HtmlCanvasElement",))]
1283 #[wasm_bindgen(
1284 catch,
1285 method,
1286 js_class = "OffscreenCanvasRenderingContext2D",
1287 js_name = "createPattern"
1288 )]
1289 #[doc = "The `createPattern()` method."]
1290 #[doc = ""]
1291 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createPattern)"]
1292 #[doc = ""]
1293 #[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `HtmlCanvasElement`, `OffscreenCanvasRenderingContext2d`*"]
1294 pub fn create_pattern_with_html_canvas_element(
1295 this: &OffscreenCanvasRenderingContext2d,
1296 image: &HtmlCanvasElement,
1297 repetition: &str,
1298 ) -> Result<Option<CanvasPattern>, JsValue>;
1299 #[cfg(all(feature = "CanvasPattern", feature = "HtmlVideoElement",))]
1300 #[wasm_bindgen(
1301 catch,
1302 method,
1303 js_class = "OffscreenCanvasRenderingContext2D",
1304 js_name = "createPattern"
1305 )]
1306 #[doc = "The `createPattern()` method."]
1307 #[doc = ""]
1308 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createPattern)"]
1309 #[doc = ""]
1310 #[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `HtmlVideoElement`, `OffscreenCanvasRenderingContext2d`*"]
1311 pub fn create_pattern_with_html_video_element(
1312 this: &OffscreenCanvasRenderingContext2d,
1313 image: &HtmlVideoElement,
1314 repetition: &str,
1315 ) -> Result<Option<CanvasPattern>, JsValue>;
1316 #[cfg(all(feature = "CanvasPattern", feature = "ImageBitmap",))]
1317 #[wasm_bindgen(
1318 catch,
1319 method,
1320 js_class = "OffscreenCanvasRenderingContext2D",
1321 js_name = "createPattern"
1322 )]
1323 #[doc = "The `createPattern()` method."]
1324 #[doc = ""]
1325 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createPattern)"]
1326 #[doc = ""]
1327 #[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `ImageBitmap`, `OffscreenCanvasRenderingContext2d`*"]
1328 pub fn create_pattern_with_image_bitmap(
1329 this: &OffscreenCanvasRenderingContext2d,
1330 image: &ImageBitmap,
1331 repetition: &str,
1332 ) -> Result<Option<CanvasPattern>, JsValue>;
1333 #[cfg(all(feature = "CanvasPattern", feature = "OffscreenCanvas",))]
1334 #[wasm_bindgen(
1335 catch,
1336 method,
1337 js_class = "OffscreenCanvasRenderingContext2D",
1338 js_name = "createPattern"
1339 )]
1340 #[doc = "The `createPattern()` method."]
1341 #[doc = ""]
1342 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createPattern)"]
1343 #[doc = ""]
1344 #[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `OffscreenCanvas`, `OffscreenCanvasRenderingContext2d`*"]
1345 pub fn create_pattern_with_offscreen_canvas(
1346 this: &OffscreenCanvasRenderingContext2d,
1347 image: &OffscreenCanvas,
1348 repetition: &str,
1349 ) -> Result<Option<CanvasPattern>, JsValue>;
1350 #[cfg(all(feature = "CanvasPattern", feature = "VideoFrame",))]
1351 #[wasm_bindgen(
1352 catch,
1353 method,
1354 js_class = "OffscreenCanvasRenderingContext2D",
1355 js_name = "createPattern"
1356 )]
1357 #[doc = "The `createPattern()` method."]
1358 #[doc = ""]
1359 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createPattern)"]
1360 #[doc = ""]
1361 #[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `OffscreenCanvasRenderingContext2d`, `VideoFrame`*"]
1362 pub fn create_pattern_with_video_frame(
1363 this: &OffscreenCanvasRenderingContext2d,
1364 image: &VideoFrame,
1365 repetition: &str,
1366 ) -> Result<Option<CanvasPattern>, JsValue>;
1367 #[cfg(feature = "CanvasGradient")]
1368 #[wasm_bindgen(
1369 catch,
1370 method,
1371 js_class = "OffscreenCanvasRenderingContext2D",
1372 js_name = "createRadialGradient"
1373 )]
1374 #[doc = "The `createRadialGradient()` method."]
1375 #[doc = ""]
1376 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createRadialGradient)"]
1377 #[doc = ""]
1378 #[doc = "*This API requires the following crate features to be activated: `CanvasGradient`, `OffscreenCanvasRenderingContext2d`*"]
1379 pub fn create_radial_gradient(
1380 this: &OffscreenCanvasRenderingContext2d,
1381 x0: f64,
1382 y0: f64,
1383 r0: f64,
1384 x1: f64,
1385 y1: f64,
1386 r1: f64,
1387 ) -> Result<CanvasGradient, JsValue>;
1388 #[cfg(feature = "ImageData")]
1389 #[wasm_bindgen(
1390 catch,
1391 method,
1392 js_class = "OffscreenCanvasRenderingContext2D",
1393 js_name = "createImageData"
1394 )]
1395 #[doc = "The `createImageData()` method."]
1396 #[doc = ""]
1397 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createImageData)"]
1398 #[doc = ""]
1399 #[doc = "*This API requires the following crate features to be activated: `ImageData`, `OffscreenCanvasRenderingContext2d`*"]
1400 pub fn create_image_data_with_sw_and_sh(
1401 this: &OffscreenCanvasRenderingContext2d,
1402 sw: f64,
1403 sh: f64,
1404 ) -> Result<ImageData, JsValue>;
1405 #[cfg(feature = "ImageData")]
1406 #[wasm_bindgen(
1407 catch,
1408 method,
1409 js_class = "OffscreenCanvasRenderingContext2D",
1410 js_name = "createImageData"
1411 )]
1412 #[doc = "The `createImageData()` method."]
1413 #[doc = ""]
1414 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/createImageData)"]
1415 #[doc = ""]
1416 #[doc = "*This API requires the following crate features to be activated: `ImageData`, `OffscreenCanvasRenderingContext2d`*"]
1417 pub fn create_image_data_with_imagedata(
1418 this: &OffscreenCanvasRenderingContext2d,
1419 imagedata: &ImageData,
1420 ) -> Result<ImageData, JsValue>;
1421 #[cfg(not(web_sys_unstable_apis))]
1422 #[cfg(feature = "ImageData")]
1423 #[wasm_bindgen(
1424 catch,
1425 method,
1426 js_class = "OffscreenCanvasRenderingContext2D",
1427 js_name = "getImageData"
1428 )]
1429 #[doc = "The `getImageData()` method."]
1430 #[doc = ""]
1431 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/getImageData)"]
1432 #[doc = ""]
1433 #[doc = "*This API requires the following crate features to be activated: `ImageData`, `OffscreenCanvasRenderingContext2d`*"]
1434 pub fn get_image_data(
1435 this: &OffscreenCanvasRenderingContext2d,
1436 sx: f64,
1437 sy: f64,
1438 sw: f64,
1439 sh: f64,
1440 ) -> Result<ImageData, JsValue>;
1441 #[cfg(web_sys_unstable_apis)]
1442 #[cfg(feature = "ImageData")]
1443 #[wasm_bindgen(
1444 catch,
1445 method,
1446 js_class = "OffscreenCanvasRenderingContext2D",
1447 js_name = "getImageData"
1448 )]
1449 #[doc = "The `getImageData()` method."]
1450 #[doc = ""]
1451 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/getImageData)"]
1452 #[doc = ""]
1453 #[doc = "*This API requires the following crate features to be activated: `ImageData`, `OffscreenCanvasRenderingContext2d`*"]
1454 #[doc = ""]
1455 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
1456 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
1457 pub fn get_image_data(
1458 this: &OffscreenCanvasRenderingContext2d,
1459 sx: i32,
1460 sy: i32,
1461 sw: i32,
1462 sh: i32,
1463 ) -> Result<ImageData, JsValue>;
1464 #[cfg(not(web_sys_unstable_apis))]
1465 #[cfg(feature = "ImageData")]
1466 #[wasm_bindgen(
1467 catch,
1468 method,
1469 js_class = "OffscreenCanvasRenderingContext2D",
1470 js_name = "putImageData"
1471 )]
1472 #[doc = "The `putImageData()` method."]
1473 #[doc = ""]
1474 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/putImageData)"]
1475 #[doc = ""]
1476 #[doc = "*This API requires the following crate features to be activated: `ImageData`, `OffscreenCanvasRenderingContext2d`*"]
1477 pub fn put_image_data(
1478 this: &OffscreenCanvasRenderingContext2d,
1479 imagedata: &ImageData,
1480 dx: f64,
1481 dy: f64,
1482 ) -> Result<(), JsValue>;
1483 #[cfg(not(web_sys_unstable_apis))]
1484 #[cfg(feature = "ImageData")]
1485 #[wasm_bindgen(
1486 catch,
1487 method,
1488 js_class = "OffscreenCanvasRenderingContext2D",
1489 js_name = "putImageData"
1490 )]
1491 #[doc = "The `putImageData()` method."]
1492 #[doc = ""]
1493 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/putImageData)"]
1494 #[doc = ""]
1495 #[doc = "*This API requires the following crate features to be activated: `ImageData`, `OffscreenCanvasRenderingContext2d`*"]
1496 pub fn put_image_data_with_dirty_x_and_dirty_y_and_dirty_width_and_dirty_height(
1497 this: &OffscreenCanvasRenderingContext2d,
1498 imagedata: &ImageData,
1499 dx: f64,
1500 dy: f64,
1501 dirty_x: f64,
1502 dirty_y: f64,
1503 dirty_width: f64,
1504 dirty_height: f64,
1505 ) -> Result<(), JsValue>;
1506 #[cfg(web_sys_unstable_apis)]
1507 #[cfg(feature = "ImageData")]
1508 #[wasm_bindgen(
1509 catch,
1510 method,
1511 js_class = "OffscreenCanvasRenderingContext2D",
1512 js_name = "putImageData"
1513 )]
1514 #[doc = "The `putImageData()` method."]
1515 #[doc = ""]
1516 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/putImageData)"]
1517 #[doc = ""]
1518 #[doc = "*This API requires the following crate features to be activated: `ImageData`, `OffscreenCanvasRenderingContext2d`*"]
1519 #[doc = ""]
1520 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
1521 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
1522 pub fn put_image_data(
1523 this: &OffscreenCanvasRenderingContext2d,
1524 imagedata: &ImageData,
1525 dx: i32,
1526 dy: i32,
1527 ) -> Result<(), JsValue>;
1528 #[cfg(web_sys_unstable_apis)]
1529 #[cfg(feature = "ImageData")]
1530 #[wasm_bindgen(
1531 catch,
1532 method,
1533 js_class = "OffscreenCanvasRenderingContext2D",
1534 js_name = "putImageData"
1535 )]
1536 #[doc = "The `putImageData()` method."]
1537 #[doc = ""]
1538 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/putImageData)"]
1539 #[doc = ""]
1540 #[doc = "*This API requires the following crate features to be activated: `ImageData`, `OffscreenCanvasRenderingContext2d`*"]
1541 #[doc = ""]
1542 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
1543 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
1544 pub fn put_image_data_with_dirty_x_and_dirty_y_and_dirty_width_and_dirty_height(
1545 this: &OffscreenCanvasRenderingContext2d,
1546 imagedata: &ImageData,
1547 dx: i32,
1548 dy: i32,
1549 dirty_x: i32,
1550 dirty_y: i32,
1551 dirty_width: i32,
1552 dirty_height: i32,
1553 ) -> Result<(), JsValue>;
1554 #[wasm_bindgen(catch, method, js_class = "OffscreenCanvasRenderingContext2D")]
1555 #[doc = "The `arc()` method."]
1556 #[doc = ""]
1557 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/arc)"]
1558 #[doc = ""]
1559 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1560 pub fn arc(
1561 this: &OffscreenCanvasRenderingContext2d,
1562 x: f64,
1563 y: f64,
1564 radius: f64,
1565 start_angle: f64,
1566 end_angle: f64,
1567 ) -> Result<(), JsValue>;
1568 #[wasm_bindgen(
1569 catch,
1570 method,
1571 js_class = "OffscreenCanvasRenderingContext2D",
1572 js_name = "arc"
1573 )]
1574 #[doc = "The `arc()` method."]
1575 #[doc = ""]
1576 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/arc)"]
1577 #[doc = ""]
1578 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1579 pub fn arc_with_anticlockwise(
1580 this: &OffscreenCanvasRenderingContext2d,
1581 x: f64,
1582 y: f64,
1583 radius: f64,
1584 start_angle: f64,
1585 end_angle: f64,
1586 anticlockwise: bool,
1587 ) -> Result<(), JsValue>;
1588 #[wasm_bindgen(
1589 catch,
1590 method,
1591 js_class = "OffscreenCanvasRenderingContext2D",
1592 js_name = "arcTo"
1593 )]
1594 #[doc = "The `arcTo()` method."]
1595 #[doc = ""]
1596 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/arcTo)"]
1597 #[doc = ""]
1598 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1599 pub fn arc_to(
1600 this: &OffscreenCanvasRenderingContext2d,
1601 x1: f64,
1602 y1: f64,
1603 x2: f64,
1604 y2: f64,
1605 radius: f64,
1606 ) -> Result<(), JsValue>;
1607 #[wasm_bindgen(
1608 method,
1609 js_class = "OffscreenCanvasRenderingContext2D",
1610 js_name = "bezierCurveTo"
1611 )]
1612 #[doc = "The `bezierCurveTo()` method."]
1613 #[doc = ""]
1614 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/bezierCurveTo)"]
1615 #[doc = ""]
1616 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1617 pub fn bezier_curve_to(
1618 this: &OffscreenCanvasRenderingContext2d,
1619 cp1x: f64,
1620 cp1y: f64,
1621 cp2x: f64,
1622 cp2y: f64,
1623 x: f64,
1624 y: f64,
1625 );
1626 #[wasm_bindgen(
1627 method,
1628 js_class = "OffscreenCanvasRenderingContext2D",
1629 js_name = "closePath"
1630 )]
1631 #[doc = "The `closePath()` method."]
1632 #[doc = ""]
1633 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/closePath)"]
1634 #[doc = ""]
1635 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1636 pub fn close_path(this: &OffscreenCanvasRenderingContext2d);
1637 #[wasm_bindgen(catch, method, js_class = "OffscreenCanvasRenderingContext2D")]
1638 #[doc = "The `ellipse()` method."]
1639 #[doc = ""]
1640 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/ellipse)"]
1641 #[doc = ""]
1642 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1643 pub fn ellipse(
1644 this: &OffscreenCanvasRenderingContext2d,
1645 x: f64,
1646 y: f64,
1647 radius_x: f64,
1648 radius_y: f64,
1649 rotation: f64,
1650 start_angle: f64,
1651 end_angle: f64,
1652 ) -> Result<(), JsValue>;
1653 #[wasm_bindgen(
1654 catch,
1655 method,
1656 js_class = "OffscreenCanvasRenderingContext2D",
1657 js_name = "ellipse"
1658 )]
1659 #[doc = "The `ellipse()` method."]
1660 #[doc = ""]
1661 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/ellipse)"]
1662 #[doc = ""]
1663 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1664 pub fn ellipse_with_anticlockwise(
1665 this: &OffscreenCanvasRenderingContext2d,
1666 x: f64,
1667 y: f64,
1668 radius_x: f64,
1669 radius_y: f64,
1670 rotation: f64,
1671 start_angle: f64,
1672 end_angle: f64,
1673 anticlockwise: bool,
1674 ) -> Result<(), JsValue>;
1675 #[wasm_bindgen(
1676 method,
1677 js_class = "OffscreenCanvasRenderingContext2D",
1678 js_name = "lineTo"
1679 )]
1680 #[doc = "The `lineTo()` method."]
1681 #[doc = ""]
1682 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/lineTo)"]
1683 #[doc = ""]
1684 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1685 pub fn line_to(this: &OffscreenCanvasRenderingContext2d, x: f64, y: f64);
1686 #[wasm_bindgen(
1687 method,
1688 js_class = "OffscreenCanvasRenderingContext2D",
1689 js_name = "moveTo"
1690 )]
1691 #[doc = "The `moveTo()` method."]
1692 #[doc = ""]
1693 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/moveTo)"]
1694 #[doc = ""]
1695 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1696 pub fn move_to(this: &OffscreenCanvasRenderingContext2d, x: f64, y: f64);
1697 #[wasm_bindgen(
1698 method,
1699 js_class = "OffscreenCanvasRenderingContext2D",
1700 js_name = "quadraticCurveTo"
1701 )]
1702 #[doc = "The `quadraticCurveTo()` method."]
1703 #[doc = ""]
1704 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/quadraticCurveTo)"]
1705 #[doc = ""]
1706 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1707 pub fn quadratic_curve_to(
1708 this: &OffscreenCanvasRenderingContext2d,
1709 cpx: f64,
1710 cpy: f64,
1711 x: f64,
1712 y: f64,
1713 );
1714 #[wasm_bindgen(method, js_class = "OffscreenCanvasRenderingContext2D")]
1715 #[doc = "The `rect()` method."]
1716 #[doc = ""]
1717 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/rect)"]
1718 #[doc = ""]
1719 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1720 pub fn rect(this: &OffscreenCanvasRenderingContext2d, x: f64, y: f64, w: f64, h: f64);
1721 #[wasm_bindgen(
1722 catch,
1723 method,
1724 js_class = "OffscreenCanvasRenderingContext2D",
1725 js_name = "roundRect"
1726 )]
1727 #[doc = "The `roundRect()` method."]
1728 #[doc = ""]
1729 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/roundRect)"]
1730 #[doc = ""]
1731 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1732 pub fn round_rect(
1733 this: &OffscreenCanvasRenderingContext2d,
1734 x: f64,
1735 y: f64,
1736 w: f64,
1737 h: f64,
1738 ) -> Result<(), JsValue>;
1739 #[wasm_bindgen(
1740 catch,
1741 method,
1742 js_class = "OffscreenCanvasRenderingContext2D",
1743 js_name = "roundRect"
1744 )]
1745 #[doc = "The `roundRect()` method."]
1746 #[doc = ""]
1747 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/roundRect)"]
1748 #[doc = ""]
1749 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1750 pub fn round_rect_with_f64(
1751 this: &OffscreenCanvasRenderingContext2d,
1752 x: f64,
1753 y: f64,
1754 w: f64,
1755 h: f64,
1756 radii: f64,
1757 ) -> Result<(), JsValue>;
1758 #[cfg(feature = "DomPointInit")]
1759 #[wasm_bindgen(
1760 catch,
1761 method,
1762 js_class = "OffscreenCanvasRenderingContext2D",
1763 js_name = "roundRect"
1764 )]
1765 #[doc = "The `roundRect()` method."]
1766 #[doc = ""]
1767 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/roundRect)"]
1768 #[doc = ""]
1769 #[doc = "*This API requires the following crate features to be activated: `DomPointInit`, `OffscreenCanvasRenderingContext2d`*"]
1770 pub fn round_rect_with_dom_point_init(
1771 this: &OffscreenCanvasRenderingContext2d,
1772 x: f64,
1773 y: f64,
1774 w: f64,
1775 h: f64,
1776 radii: &DomPointInit,
1777 ) -> Result<(), JsValue>;
1778 #[wasm_bindgen(
1779 catch,
1780 method,
1781 js_class = "OffscreenCanvasRenderingContext2D",
1782 js_name = "roundRect"
1783 )]
1784 #[doc = "The `roundRect()` method."]
1785 #[doc = ""]
1786 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/roundRect)"]
1787 #[doc = ""]
1788 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1789 pub fn round_rect_with_f64_sequence(
1790 this: &OffscreenCanvasRenderingContext2d,
1791 x: f64,
1792 y: f64,
1793 w: f64,
1794 h: f64,
1795 radii: &::wasm_bindgen::JsValue,
1796 ) -> Result<(), JsValue>;
1797 #[wasm_bindgen(
1798 catch,
1799 method,
1800 js_class = "OffscreenCanvasRenderingContext2D",
1801 js_name = "roundRect"
1802 )]
1803 #[doc = "The `roundRect()` method."]
1804 #[doc = ""]
1805 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/roundRect)"]
1806 #[doc = ""]
1807 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1808 pub fn round_rect_with_dom_point_init_sequence(
1809 this: &OffscreenCanvasRenderingContext2d,
1810 x: f64,
1811 y: f64,
1812 w: f64,
1813 h: f64,
1814 radii: &::wasm_bindgen::JsValue,
1815 ) -> Result<(), JsValue>;
1816 #[wasm_bindgen(
1817 method,
1818 js_class = "OffscreenCanvasRenderingContext2D",
1819 js_name = "getLineDash"
1820 )]
1821 #[doc = "The `getLineDash()` method."]
1822 #[doc = ""]
1823 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/getLineDash)"]
1824 #[doc = ""]
1825 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1826 pub fn get_line_dash(this: &OffscreenCanvasRenderingContext2d) -> ::js_sys::Array;
1827 #[wasm_bindgen(
1828 catch,
1829 method,
1830 js_class = "OffscreenCanvasRenderingContext2D",
1831 js_name = "setLineDash"
1832 )]
1833 #[doc = "The `setLineDash()` method."]
1834 #[doc = ""]
1835 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/setLineDash)"]
1836 #[doc = ""]
1837 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1838 pub fn set_line_dash(
1839 this: &OffscreenCanvasRenderingContext2d,
1840 segments: &::wasm_bindgen::JsValue,
1841 ) -> Result<(), JsValue>;
1842 #[wasm_bindgen(
1843 method,
1844 js_class = "OffscreenCanvasRenderingContext2D",
1845 js_name = "clearRect"
1846 )]
1847 #[doc = "The `clearRect()` method."]
1848 #[doc = ""]
1849 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/clearRect)"]
1850 #[doc = ""]
1851 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1852 pub fn clear_rect(this: &OffscreenCanvasRenderingContext2d, x: f64, y: f64, w: f64, h: f64);
1853 #[wasm_bindgen(
1854 method,
1855 js_class = "OffscreenCanvasRenderingContext2D",
1856 js_name = "fillRect"
1857 )]
1858 #[doc = "The `fillRect()` method."]
1859 #[doc = ""]
1860 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fillRect)"]
1861 #[doc = ""]
1862 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1863 pub fn fill_rect(this: &OffscreenCanvasRenderingContext2d, x: f64, y: f64, w: f64, h: f64);
1864 #[wasm_bindgen(
1865 method,
1866 js_class = "OffscreenCanvasRenderingContext2D",
1867 js_name = "strokeRect"
1868 )]
1869 #[doc = "The `strokeRect()` method."]
1870 #[doc = ""]
1871 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/strokeRect)"]
1872 #[doc = ""]
1873 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1874 pub fn stroke_rect(this: &OffscreenCanvasRenderingContext2d, x: f64, y: f64, w: f64, h: f64);
1875 #[wasm_bindgen(method, js_class = "OffscreenCanvasRenderingContext2D")]
1876 #[doc = "The `reset()` method."]
1877 #[doc = ""]
1878 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/reset)"]
1879 #[doc = ""]
1880 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1881 pub fn reset(this: &OffscreenCanvasRenderingContext2d);
1882 #[wasm_bindgen(method, js_class = "OffscreenCanvasRenderingContext2D")]
1883 #[doc = "The `restore()` method."]
1884 #[doc = ""]
1885 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/restore)"]
1886 #[doc = ""]
1887 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1888 pub fn restore(this: &OffscreenCanvasRenderingContext2d);
1889 #[wasm_bindgen(method, js_class = "OffscreenCanvasRenderingContext2D")]
1890 #[doc = "The `save()` method."]
1891 #[doc = ""]
1892 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/save)"]
1893 #[doc = ""]
1894 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1895 pub fn save(this: &OffscreenCanvasRenderingContext2d);
1896 #[wasm_bindgen(
1897 catch,
1898 method,
1899 js_class = "OffscreenCanvasRenderingContext2D",
1900 js_name = "fillText"
1901 )]
1902 #[doc = "The `fillText()` method."]
1903 #[doc = ""]
1904 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fillText)"]
1905 #[doc = ""]
1906 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1907 pub fn fill_text(
1908 this: &OffscreenCanvasRenderingContext2d,
1909 text: &str,
1910 x: f64,
1911 y: f64,
1912 ) -> Result<(), JsValue>;
1913 #[wasm_bindgen(
1914 catch,
1915 method,
1916 js_class = "OffscreenCanvasRenderingContext2D",
1917 js_name = "fillText"
1918 )]
1919 #[doc = "The `fillText()` method."]
1920 #[doc = ""]
1921 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/fillText)"]
1922 #[doc = ""]
1923 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1924 pub fn fill_text_with_max_width(
1925 this: &OffscreenCanvasRenderingContext2d,
1926 text: &str,
1927 x: f64,
1928 y: f64,
1929 max_width: f64,
1930 ) -> Result<(), JsValue>;
1931 #[cfg(feature = "TextMetrics")]
1932 #[wasm_bindgen(
1933 catch,
1934 method,
1935 js_class = "OffscreenCanvasRenderingContext2D",
1936 js_name = "measureText"
1937 )]
1938 #[doc = "The `measureText()` method."]
1939 #[doc = ""]
1940 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/measureText)"]
1941 #[doc = ""]
1942 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`, `TextMetrics`*"]
1943 pub fn measure_text(
1944 this: &OffscreenCanvasRenderingContext2d,
1945 text: &str,
1946 ) -> Result<TextMetrics, JsValue>;
1947 #[wasm_bindgen(
1948 catch,
1949 method,
1950 js_class = "OffscreenCanvasRenderingContext2D",
1951 js_name = "strokeText"
1952 )]
1953 #[doc = "The `strokeText()` method."]
1954 #[doc = ""]
1955 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/strokeText)"]
1956 #[doc = ""]
1957 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1958 pub fn stroke_text(
1959 this: &OffscreenCanvasRenderingContext2d,
1960 text: &str,
1961 x: f64,
1962 y: f64,
1963 ) -> Result<(), JsValue>;
1964 #[wasm_bindgen(
1965 catch,
1966 method,
1967 js_class = "OffscreenCanvasRenderingContext2D",
1968 js_name = "strokeText"
1969 )]
1970 #[doc = "The `strokeText()` method."]
1971 #[doc = ""]
1972 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/strokeText)"]
1973 #[doc = ""]
1974 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
1975 pub fn stroke_text_with_max_width(
1976 this: &OffscreenCanvasRenderingContext2d,
1977 text: &str,
1978 x: f64,
1979 y: f64,
1980 max_width: f64,
1981 ) -> Result<(), JsValue>;
1982 #[cfg(feature = "DomMatrix")]
1983 #[wasm_bindgen(
1984 catch,
1985 method,
1986 js_class = "OffscreenCanvasRenderingContext2D",
1987 js_name = "getTransform"
1988 )]
1989 #[doc = "The `getTransform()` method."]
1990 #[doc = ""]
1991 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/getTransform)"]
1992 #[doc = ""]
1993 #[doc = "*This API requires the following crate features to be activated: `DomMatrix`, `OffscreenCanvasRenderingContext2d`*"]
1994 pub fn get_transform(this: &OffscreenCanvasRenderingContext2d) -> Result<DomMatrix, JsValue>;
1995 #[wasm_bindgen(
1996 catch,
1997 method,
1998 js_class = "OffscreenCanvasRenderingContext2D",
1999 js_name = "resetTransform"
2000 )]
2001 #[doc = "The `resetTransform()` method."]
2002 #[doc = ""]
2003 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/resetTransform)"]
2004 #[doc = ""]
2005 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
2006 pub fn reset_transform(this: &OffscreenCanvasRenderingContext2d) -> Result<(), JsValue>;
2007 #[wasm_bindgen(catch, method, js_class = "OffscreenCanvasRenderingContext2D")]
2008 #[doc = "The `rotate()` method."]
2009 #[doc = ""]
2010 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/rotate)"]
2011 #[doc = ""]
2012 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
2013 pub fn rotate(this: &OffscreenCanvasRenderingContext2d, angle: f64) -> Result<(), JsValue>;
2014 #[wasm_bindgen(catch, method, js_class = "OffscreenCanvasRenderingContext2D")]
2015 #[doc = "The `scale()` method."]
2016 #[doc = ""]
2017 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/scale)"]
2018 #[doc = ""]
2019 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
2020 pub fn scale(this: &OffscreenCanvasRenderingContext2d, x: f64, y: f64) -> Result<(), JsValue>;
2021 #[wasm_bindgen(
2022 catch,
2023 method,
2024 js_class = "OffscreenCanvasRenderingContext2D",
2025 js_name = "setTransform"
2026 )]
2027 #[doc = "The `setTransform()` method."]
2028 #[doc = ""]
2029 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/setTransform)"]
2030 #[doc = ""]
2031 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
2032 pub fn set_transform(
2033 this: &OffscreenCanvasRenderingContext2d,
2034 a: f64,
2035 b: f64,
2036 c: f64,
2037 d: f64,
2038 e: f64,
2039 f: f64,
2040 ) -> Result<(), JsValue>;
2041 #[wasm_bindgen(
2042 catch,
2043 method,
2044 js_class = "OffscreenCanvasRenderingContext2D",
2045 js_name = "setTransform"
2046 )]
2047 #[doc = "The `setTransform()` method."]
2048 #[doc = ""]
2049 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/setTransform)"]
2050 #[doc = ""]
2051 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
2052 pub fn set_transform_with_default_dom_matrix_2d_init(
2053 this: &OffscreenCanvasRenderingContext2d,
2054 ) -> Result<(), JsValue>;
2055 #[cfg(feature = "DomMatrix2dInit")]
2056 #[wasm_bindgen(
2057 catch,
2058 method,
2059 js_class = "OffscreenCanvasRenderingContext2D",
2060 js_name = "setTransform"
2061 )]
2062 #[doc = "The `setTransform()` method."]
2063 #[doc = ""]
2064 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/setTransform)"]
2065 #[doc = ""]
2066 #[doc = "*This API requires the following crate features to be activated: `DomMatrix2dInit`, `OffscreenCanvasRenderingContext2d`*"]
2067 pub fn set_transform_with_dom_matrix_2d_init(
2068 this: &OffscreenCanvasRenderingContext2d,
2069 transform: &DomMatrix2dInit,
2070 ) -> Result<(), JsValue>;
2071 #[wasm_bindgen(catch, method, js_class = "OffscreenCanvasRenderingContext2D")]
2072 #[doc = "The `transform()` method."]
2073 #[doc = ""]
2074 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/transform)"]
2075 #[doc = ""]
2076 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
2077 pub fn transform(
2078 this: &OffscreenCanvasRenderingContext2d,
2079 a: f64,
2080 b: f64,
2081 c: f64,
2082 d: f64,
2083 e: f64,
2084 f: f64,
2085 ) -> Result<(), JsValue>;
2086 #[wasm_bindgen(catch, method, js_class = "OffscreenCanvasRenderingContext2D")]
2087 #[doc = "The `translate()` method."]
2088 #[doc = ""]
2089 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/translate)"]
2090 #[doc = ""]
2091 #[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
2092 pub fn translate(
2093 this: &OffscreenCanvasRenderingContext2d,
2094 x: f64,
2095 y: f64,
2096 ) -> Result<(), JsValue>;
2097}