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