Skip to main content

web_sys/features/
gen_CanvasRenderingContext2d.rs

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