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 = "HtmlImageElement")]
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`, `HtmlImageElement`*"]
449 pub fn draw_image_with_html_image_element_and_dw_and_dh(
450 this: &CanvasRenderingContext2d,
451 image: &HtmlImageElement,
452 dx: f64,
453 dy: f64,
454 dw: f64,
455 dh: f64,
456 ) -> Result<(), JsValue>;
457 #[cfg(feature = "SvgImageElement")]
458 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)]
459 #[doc = "The `drawImage()` method."]
460 #[doc = ""]
461 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)"]
462 #[doc = ""]
463 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `SvgImageElement`*"]
464 pub fn draw_image_with_svg_image_element_and_dw_and_dh(
465 this: &CanvasRenderingContext2d,
466 image: &SvgImageElement,
467 dx: f64,
468 dy: f64,
469 dw: f64,
470 dh: f64,
471 ) -> Result<(), JsValue>;
472 #[cfg(feature = "HtmlCanvasElement")]
473 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)]
474 #[doc = "The `drawImage()` method."]
475 #[doc = ""]
476 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)"]
477 #[doc = ""]
478 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `HtmlCanvasElement`*"]
479 pub fn draw_image_with_html_canvas_element_and_dw_and_dh(
480 this: &CanvasRenderingContext2d,
481 image: &HtmlCanvasElement,
482 dx: f64,
483 dy: f64,
484 dw: f64,
485 dh: f64,
486 ) -> Result<(), JsValue>;
487 #[cfg(feature = "HtmlVideoElement")]
488 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)]
489 #[doc = "The `drawImage()` method."]
490 #[doc = ""]
491 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)"]
492 #[doc = ""]
493 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `HtmlVideoElement`*"]
494 pub fn draw_image_with_html_video_element_and_dw_and_dh(
495 this: &CanvasRenderingContext2d,
496 image: &HtmlVideoElement,
497 dx: f64,
498 dy: f64,
499 dw: f64,
500 dh: f64,
501 ) -> Result<(), JsValue>;
502 #[cfg(feature = "ImageBitmap")]
503 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)]
504 #[doc = "The `drawImage()` method."]
505 #[doc = ""]
506 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)"]
507 #[doc = ""]
508 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `ImageBitmap`*"]
509 pub fn draw_image_with_image_bitmap_and_dw_and_dh(
510 this: &CanvasRenderingContext2d,
511 image: &ImageBitmap,
512 dx: f64,
513 dy: f64,
514 dw: f64,
515 dh: f64,
516 ) -> Result<(), JsValue>;
517 #[cfg(feature = "OffscreenCanvas")]
518 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)]
519 #[doc = "The `drawImage()` method."]
520 #[doc = ""]
521 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)"]
522 #[doc = ""]
523 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `OffscreenCanvas`*"]
524 pub fn draw_image_with_offscreen_canvas_and_dw_and_dh(
525 this: &CanvasRenderingContext2d,
526 image: &OffscreenCanvas,
527 dx: f64,
528 dy: f64,
529 dw: f64,
530 dh: f64,
531 ) -> Result<(), JsValue>;
532 #[cfg(feature = "HtmlImageElement")]
533 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)]
534 #[doc = "The `drawImage()` method."]
535 #[doc = ""]
536 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)"]
537 #[doc = ""]
538 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `HtmlImageElement`*"]
539 pub fn draw_image_with_html_image_element_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh(
540 this: &CanvasRenderingContext2d,
541 image: &HtmlImageElement,
542 sx: f64,
543 sy: f64,
544 sw: f64,
545 sh: f64,
546 dx: f64,
547 dy: f64,
548 dw: f64,
549 dh: f64,
550 ) -> Result<(), JsValue>;
551 #[cfg(feature = "SvgImageElement")]
552 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)]
553 #[doc = "The `drawImage()` method."]
554 #[doc = ""]
555 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)"]
556 #[doc = ""]
557 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `SvgImageElement`*"]
558 pub fn draw_image_with_svg_image_element_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh(
559 this: &CanvasRenderingContext2d,
560 image: &SvgImageElement,
561 sx: f64,
562 sy: f64,
563 sw: f64,
564 sh: f64,
565 dx: f64,
566 dy: f64,
567 dw: f64,
568 dh: f64,
569 ) -> Result<(), JsValue>;
570 #[cfg(feature = "HtmlCanvasElement")]
571 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)]
572 #[doc = "The `drawImage()` method."]
573 #[doc = ""]
574 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)"]
575 #[doc = ""]
576 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `HtmlCanvasElement`*"]
577 pub fn draw_image_with_html_canvas_element_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh(
578 this: &CanvasRenderingContext2d,
579 image: &HtmlCanvasElement,
580 sx: f64,
581 sy: f64,
582 sw: f64,
583 sh: f64,
584 dx: f64,
585 dy: f64,
586 dw: f64,
587 dh: f64,
588 ) -> Result<(), JsValue>;
589 #[cfg(feature = "HtmlVideoElement")]
590 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)]
591 #[doc = "The `drawImage()` method."]
592 #[doc = ""]
593 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)"]
594 #[doc = ""]
595 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `HtmlVideoElement`*"]
596 pub fn draw_image_with_html_video_element_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh(
597 this: &CanvasRenderingContext2d,
598 image: &HtmlVideoElement,
599 sx: f64,
600 sy: f64,
601 sw: f64,
602 sh: f64,
603 dx: f64,
604 dy: f64,
605 dw: f64,
606 dh: f64,
607 ) -> Result<(), JsValue>;
608 #[cfg(feature = "ImageBitmap")]
609 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)]
610 #[doc = "The `drawImage()` method."]
611 #[doc = ""]
612 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)"]
613 #[doc = ""]
614 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `ImageBitmap`*"]
615 pub fn draw_image_with_image_bitmap_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh(
616 this: &CanvasRenderingContext2d,
617 image: &ImageBitmap,
618 sx: f64,
619 sy: f64,
620 sw: f64,
621 sh: f64,
622 dx: f64,
623 dy: f64,
624 dw: f64,
625 dh: f64,
626 ) -> Result<(), JsValue>;
627 #[cfg(feature = "OffscreenCanvas")]
628 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)]
629 #[doc = "The `drawImage()` method."]
630 #[doc = ""]
631 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)"]
632 #[doc = ""]
633 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `OffscreenCanvas`*"]
634 pub fn draw_image_with_offscreen_canvas_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh(
635 this: &CanvasRenderingContext2d,
636 image: &OffscreenCanvas,
637 sx: f64,
638 sy: f64,
639 sw: f64,
640 sh: f64,
641 dx: f64,
642 dy: f64,
643 dw: f64,
644 dh: f64,
645 ) -> Result<(), JsValue>;
646 #[cfg(web_sys_unstable_apis)]
647 #[cfg(feature = "VideoFrame")]
648 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)]
649 #[doc = "The `drawImage()` method."]
650 #[doc = ""]
651 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)"]
652 #[doc = ""]
653 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `VideoFrame`*"]
654 #[doc = ""]
655 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
656 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
657 pub fn draw_image_with_video_frame(
658 this: &CanvasRenderingContext2d,
659 image: &VideoFrame,
660 dx: f64,
661 dy: f64,
662 ) -> Result<(), JsValue>;
663 #[cfg(web_sys_unstable_apis)]
664 #[cfg(feature = "VideoFrame")]
665 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)]
666 #[doc = "The `drawImage()` method."]
667 #[doc = ""]
668 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)"]
669 #[doc = ""]
670 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `VideoFrame`*"]
671 #[doc = ""]
672 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
673 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
674 pub fn draw_image_with_video_frame_and_dw_and_dh(
675 this: &CanvasRenderingContext2d,
676 image: &VideoFrame,
677 dx: f64,
678 dy: f64,
679 dw: f64,
680 dh: f64,
681 ) -> Result<(), JsValue>;
682 #[cfg(web_sys_unstable_apis)]
683 #[cfg(feature = "VideoFrame")]
684 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)]
685 #[doc = "The `drawImage()` method."]
686 #[doc = ""]
687 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)"]
688 #[doc = ""]
689 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `VideoFrame`*"]
690 #[doc = ""]
691 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
692 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
693 pub fn draw_image_with_video_frame_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh(
694 this: &CanvasRenderingContext2d,
695 image: &VideoFrame,
696 sx: f64,
697 sy: f64,
698 sw: f64,
699 sh: f64,
700 dx: f64,
701 dy: f64,
702 dw: f64,
703 dh: f64,
704 ) -> Result<(), JsValue>;
705 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = beginPath)]
706 #[doc = "The `beginPath()` method."]
707 #[doc = ""]
708 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/beginPath)"]
709 #[doc = ""]
710 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
711 pub fn begin_path(this: &CanvasRenderingContext2d);
712 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = clip)]
713 #[doc = "The `clip()` method."]
714 #[doc = ""]
715 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/clip)"]
716 #[doc = ""]
717 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
718 pub fn clip(this: &CanvasRenderingContext2d);
719 #[cfg(feature = "CanvasWindingRule")]
720 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = clip)]
721 #[doc = "The `clip()` method."]
722 #[doc = ""]
723 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/clip)"]
724 #[doc = ""]
725 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `CanvasWindingRule`*"]
726 pub fn clip_with_canvas_winding_rule(
727 this: &CanvasRenderingContext2d,
728 winding: CanvasWindingRule,
729 );
730 #[cfg(feature = "Path2d")]
731 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = clip)]
732 #[doc = "The `clip()` method."]
733 #[doc = ""]
734 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/clip)"]
735 #[doc = ""]
736 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `Path2d`*"]
737 pub fn clip_with_path_2d(this: &CanvasRenderingContext2d, path: &Path2d);
738 #[cfg(all(feature = "CanvasWindingRule", feature = "Path2d",))]
739 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = clip)]
740 #[doc = "The `clip()` method."]
741 #[doc = ""]
742 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/clip)"]
743 #[doc = ""]
744 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `CanvasWindingRule`, `Path2d`*"]
745 pub fn clip_with_path_2d_and_winding(
746 this: &CanvasRenderingContext2d,
747 path: &Path2d,
748 winding: CanvasWindingRule,
749 );
750 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = fill)]
751 #[doc = "The `fill()` method."]
752 #[doc = ""]
753 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fill)"]
754 #[doc = ""]
755 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
756 pub fn fill(this: &CanvasRenderingContext2d);
757 #[cfg(feature = "CanvasWindingRule")]
758 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = fill)]
759 #[doc = "The `fill()` method."]
760 #[doc = ""]
761 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fill)"]
762 #[doc = ""]
763 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `CanvasWindingRule`*"]
764 pub fn fill_with_canvas_winding_rule(
765 this: &CanvasRenderingContext2d,
766 winding: CanvasWindingRule,
767 );
768 #[cfg(feature = "Path2d")]
769 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = fill)]
770 #[doc = "The `fill()` method."]
771 #[doc = ""]
772 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fill)"]
773 #[doc = ""]
774 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `Path2d`*"]
775 pub fn fill_with_path_2d(this: &CanvasRenderingContext2d, path: &Path2d);
776 #[cfg(all(feature = "CanvasWindingRule", feature = "Path2d",))]
777 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = fill)]
778 #[doc = "The `fill()` method."]
779 #[doc = ""]
780 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fill)"]
781 #[doc = ""]
782 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `CanvasWindingRule`, `Path2d`*"]
783 pub fn fill_with_path_2d_and_winding(
784 this: &CanvasRenderingContext2d,
785 path: &Path2d,
786 winding: CanvasWindingRule,
787 );
788 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = isPointInPath)]
789 #[doc = "The `isPointInPath()` method."]
790 #[doc = ""]
791 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/isPointInPath)"]
792 #[doc = ""]
793 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
794 pub fn is_point_in_path_with_f64(this: &CanvasRenderingContext2d, x: f64, y: f64) -> bool;
795 #[cfg(feature = "CanvasWindingRule")]
796 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = isPointInPath)]
797 #[doc = "The `isPointInPath()` method."]
798 #[doc = ""]
799 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/isPointInPath)"]
800 #[doc = ""]
801 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `CanvasWindingRule`*"]
802 pub fn is_point_in_path_with_f64_and_canvas_winding_rule(
803 this: &CanvasRenderingContext2d,
804 x: f64,
805 y: f64,
806 winding: CanvasWindingRule,
807 ) -> bool;
808 #[cfg(feature = "Path2d")]
809 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = isPointInPath)]
810 #[doc = "The `isPointInPath()` method."]
811 #[doc = ""]
812 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/isPointInPath)"]
813 #[doc = ""]
814 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `Path2d`*"]
815 pub fn is_point_in_path_with_path_2d_and_f64(
816 this: &CanvasRenderingContext2d,
817 path: &Path2d,
818 x: f64,
819 y: f64,
820 ) -> bool;
821 #[cfg(all(feature = "CanvasWindingRule", feature = "Path2d",))]
822 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = isPointInPath)]
823 #[doc = "The `isPointInPath()` method."]
824 #[doc = ""]
825 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/isPointInPath)"]
826 #[doc = ""]
827 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `CanvasWindingRule`, `Path2d`*"]
828 pub fn is_point_in_path_with_path_2d_and_f64_and_winding(
829 this: &CanvasRenderingContext2d,
830 path: &Path2d,
831 x: f64,
832 y: f64,
833 winding: CanvasWindingRule,
834 ) -> bool;
835 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = isPointInStroke)]
836 #[doc = "The `isPointInStroke()` method."]
837 #[doc = ""]
838 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/isPointInStroke)"]
839 #[doc = ""]
840 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
841 pub fn is_point_in_stroke_with_x_and_y(this: &CanvasRenderingContext2d, x: f64, y: f64)
842 -> bool;
843 #[cfg(feature = "Path2d")]
844 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = isPointInStroke)]
845 #[doc = "The `isPointInStroke()` method."]
846 #[doc = ""]
847 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/isPointInStroke)"]
848 #[doc = ""]
849 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `Path2d`*"]
850 pub fn is_point_in_stroke_with_path_and_x_and_y(
851 this: &CanvasRenderingContext2d,
852 path: &Path2d,
853 x: f64,
854 y: f64,
855 ) -> bool;
856 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = stroke)]
857 #[doc = "The `stroke()` method."]
858 #[doc = ""]
859 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/stroke)"]
860 #[doc = ""]
861 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
862 pub fn stroke(this: &CanvasRenderingContext2d);
863 #[cfg(feature = "Path2d")]
864 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = stroke)]
865 #[doc = "The `stroke()` method."]
866 #[doc = ""]
867 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/stroke)"]
868 #[doc = ""]
869 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `Path2d`*"]
870 pub fn stroke_with_path(this: &CanvasRenderingContext2d, path: &Path2d);
871 #[cfg(feature = "CanvasGradient")]
872 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = createLinearGradient)]
873 #[doc = "The `createLinearGradient()` method."]
874 #[doc = ""]
875 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createLinearGradient)"]
876 #[doc = ""]
877 #[doc = "*This API requires the following crate features to be activated: `CanvasGradient`, `CanvasRenderingContext2d`*"]
878 pub fn create_linear_gradient(
879 this: &CanvasRenderingContext2d,
880 x0: f64,
881 y0: f64,
882 x1: f64,
883 y1: f64,
884 ) -> CanvasGradient;
885 #[cfg(all(feature = "CanvasPattern", feature = "HtmlImageElement",))]
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`, `HtmlImageElement`*"]
892 pub fn create_pattern_with_html_image_element(
893 this: &CanvasRenderingContext2d,
894 image: &HtmlImageElement,
895 repetition: &str,
896 ) -> Result<Option<CanvasPattern>, JsValue>;
897 #[cfg(all(feature = "CanvasPattern", feature = "SvgImageElement",))]
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`, `SvgImageElement`*"]
904 pub fn create_pattern_with_svg_image_element(
905 this: &CanvasRenderingContext2d,
906 image: &SvgImageElement,
907 repetition: &str,
908 ) -> Result<Option<CanvasPattern>, JsValue>;
909 #[cfg(all(feature = "CanvasPattern", feature = "HtmlCanvasElement",))]
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`, `HtmlCanvasElement`*"]
916 pub fn create_pattern_with_html_canvas_element(
917 this: &CanvasRenderingContext2d,
918 image: &HtmlCanvasElement,
919 repetition: &str,
920 ) -> Result<Option<CanvasPattern>, JsValue>;
921 #[cfg(all(feature = "CanvasPattern", feature = "HtmlVideoElement",))]
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`, `HtmlVideoElement`*"]
928 pub fn create_pattern_with_html_video_element(
929 this: &CanvasRenderingContext2d,
930 image: &HtmlVideoElement,
931 repetition: &str,
932 ) -> Result<Option<CanvasPattern>, JsValue>;
933 #[cfg(all(feature = "CanvasPattern", feature = "ImageBitmap",))]
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`, `ImageBitmap`*"]
940 pub fn create_pattern_with_image_bitmap(
941 this: &CanvasRenderingContext2d,
942 image: &ImageBitmap,
943 repetition: &str,
944 ) -> Result<Option<CanvasPattern>, JsValue>;
945 #[cfg(all(feature = "CanvasPattern", feature = "OffscreenCanvas",))]
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`, `OffscreenCanvas`*"]
952 pub fn create_pattern_with_offscreen_canvas(
953 this: &CanvasRenderingContext2d,
954 image: &OffscreenCanvas,
955 repetition: &str,
956 ) -> Result<Option<CanvasPattern>, JsValue>;
957 #[cfg(web_sys_unstable_apis)]
958 #[cfg(all(feature = "CanvasPattern", feature = "VideoFrame",))]
959 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = createPattern)]
960 #[doc = "The `createPattern()` method."]
961 #[doc = ""]
962 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createPattern)"]
963 #[doc = ""]
964 #[doc = "*This API requires the following crate features to be activated: `CanvasPattern`, `CanvasRenderingContext2d`, `VideoFrame`*"]
965 #[doc = ""]
966 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
967 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
968 pub fn create_pattern_with_video_frame(
969 this: &CanvasRenderingContext2d,
970 image: &VideoFrame,
971 repetition: &str,
972 ) -> Result<Option<CanvasPattern>, JsValue>;
973 #[cfg(feature = "CanvasGradient")]
974 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = createRadialGradient)]
975 #[doc = "The `createRadialGradient()` method."]
976 #[doc = ""]
977 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createRadialGradient)"]
978 #[doc = ""]
979 #[doc = "*This API requires the following crate features to be activated: `CanvasGradient`, `CanvasRenderingContext2d`*"]
980 pub fn create_radial_gradient(
981 this: &CanvasRenderingContext2d,
982 x0: f64,
983 y0: f64,
984 r0: f64,
985 x1: f64,
986 y1: f64,
987 r1: f64,
988 ) -> Result<CanvasGradient, JsValue>;
989 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = addHitRegion)]
990 #[doc = "The `addHitRegion()` method."]
991 #[doc = ""]
992 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/addHitRegion)"]
993 #[doc = ""]
994 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
995 pub fn add_hit_region(this: &CanvasRenderingContext2d) -> Result<(), JsValue>;
996 #[cfg(feature = "HitRegionOptions")]
997 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = addHitRegion)]
998 #[doc = "The `addHitRegion()` method."]
999 #[doc = ""]
1000 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/addHitRegion)"]
1001 #[doc = ""]
1002 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `HitRegionOptions`*"]
1003 pub fn add_hit_region_with_options(
1004 this: &CanvasRenderingContext2d,
1005 options: &HitRegionOptions,
1006 ) -> Result<(), JsValue>;
1007 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = clearHitRegions)]
1008 #[doc = "The `clearHitRegions()` method."]
1009 #[doc = ""]
1010 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/clearHitRegions)"]
1011 #[doc = ""]
1012 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1013 pub fn clear_hit_regions(this: &CanvasRenderingContext2d);
1014 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = removeHitRegion)]
1015 #[doc = "The `removeHitRegion()` method."]
1016 #[doc = ""]
1017 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/removeHitRegion)"]
1018 #[doc = ""]
1019 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1020 pub fn remove_hit_region(this: &CanvasRenderingContext2d, id: &str);
1021 #[cfg(feature = "ImageData")]
1022 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = createImageData)]
1023 #[doc = "The `createImageData()` method."]
1024 #[doc = ""]
1025 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createImageData)"]
1026 #[doc = ""]
1027 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `ImageData`*"]
1028 pub fn create_image_data_with_sw_and_sh(
1029 this: &CanvasRenderingContext2d,
1030 sw: f64,
1031 sh: f64,
1032 ) -> Result<ImageData, JsValue>;
1033 #[cfg(feature = "ImageData")]
1034 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = createImageData)]
1035 #[doc = "The `createImageData()` method."]
1036 #[doc = ""]
1037 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/createImageData)"]
1038 #[doc = ""]
1039 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `ImageData`*"]
1040 pub fn create_image_data_with_imagedata(
1041 this: &CanvasRenderingContext2d,
1042 imagedata: &ImageData,
1043 ) -> Result<ImageData, JsValue>;
1044 #[cfg(not(web_sys_unstable_apis))]
1045 #[cfg(feature = "ImageData")]
1046 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = getImageData)]
1047 #[doc = "The `getImageData()` method."]
1048 #[doc = ""]
1049 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getImageData)"]
1050 #[doc = ""]
1051 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `ImageData`*"]
1052 pub fn get_image_data(
1053 this: &CanvasRenderingContext2d,
1054 sx: f64,
1055 sy: f64,
1056 sw: f64,
1057 sh: f64,
1058 ) -> Result<ImageData, JsValue>;
1059 #[cfg(web_sys_unstable_apis)]
1060 #[cfg(feature = "ImageData")]
1061 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = getImageData)]
1062 #[doc = "The `getImageData()` method."]
1063 #[doc = ""]
1064 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getImageData)"]
1065 #[doc = ""]
1066 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `ImageData`*"]
1067 #[doc = ""]
1068 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
1069 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
1070 pub fn get_image_data(
1071 this: &CanvasRenderingContext2d,
1072 sx: i32,
1073 sy: i32,
1074 sw: i32,
1075 sh: i32,
1076 ) -> Result<ImageData, JsValue>;
1077 #[cfg(not(web_sys_unstable_apis))]
1078 #[cfg(feature = "ImageData")]
1079 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = putImageData)]
1080 #[doc = "The `putImageData()` method."]
1081 #[doc = ""]
1082 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/putImageData)"]
1083 #[doc = ""]
1084 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `ImageData`*"]
1085 pub fn put_image_data(
1086 this: &CanvasRenderingContext2d,
1087 imagedata: &ImageData,
1088 dx: f64,
1089 dy: f64,
1090 ) -> Result<(), JsValue>;
1091 #[cfg(not(web_sys_unstable_apis))]
1092 #[cfg(feature = "ImageData")]
1093 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = putImageData)]
1094 #[doc = "The `putImageData()` method."]
1095 #[doc = ""]
1096 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/putImageData)"]
1097 #[doc = ""]
1098 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `ImageData`*"]
1099 pub fn put_image_data_with_dirty_x_and_dirty_y_and_dirty_width_and_dirty_height(
1100 this: &CanvasRenderingContext2d,
1101 imagedata: &ImageData,
1102 dx: f64,
1103 dy: f64,
1104 dirty_x: f64,
1105 dirty_y: f64,
1106 dirty_width: f64,
1107 dirty_height: f64,
1108 ) -> Result<(), JsValue>;
1109 #[cfg(web_sys_unstable_apis)]
1110 #[cfg(feature = "ImageData")]
1111 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = putImageData)]
1112 #[doc = "The `putImageData()` method."]
1113 #[doc = ""]
1114 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/putImageData)"]
1115 #[doc = ""]
1116 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `ImageData`*"]
1117 #[doc = ""]
1118 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
1119 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
1120 pub fn put_image_data(
1121 this: &CanvasRenderingContext2d,
1122 imagedata: &ImageData,
1123 dx: i32,
1124 dy: i32,
1125 ) -> Result<(), JsValue>;
1126 #[cfg(web_sys_unstable_apis)]
1127 #[cfg(feature = "ImageData")]
1128 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = putImageData)]
1129 #[doc = "The `putImageData()` method."]
1130 #[doc = ""]
1131 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/putImageData)"]
1132 #[doc = ""]
1133 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `ImageData`*"]
1134 #[doc = ""]
1135 #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as"]
1136 #[doc = "[described in the `wasm-bindgen` guide](https://wasm-bindgen.github.io/wasm-bindgen/web-sys/unstable-apis.html)*"]
1137 pub fn put_image_data_with_dirty_x_and_dirty_y_and_dirty_width_and_dirty_height(
1138 this: &CanvasRenderingContext2d,
1139 imagedata: &ImageData,
1140 dx: i32,
1141 dy: i32,
1142 dirty_x: i32,
1143 dirty_y: i32,
1144 dirty_width: i32,
1145 dirty_height: i32,
1146 ) -> Result<(), JsValue>;
1147 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = arc)]
1148 #[doc = "The `arc()` method."]
1149 #[doc = ""]
1150 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/arc)"]
1151 #[doc = ""]
1152 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1153 pub fn arc(
1154 this: &CanvasRenderingContext2d,
1155 x: f64,
1156 y: f64,
1157 radius: f64,
1158 start_angle: f64,
1159 end_angle: f64,
1160 ) -> Result<(), JsValue>;
1161 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = arc)]
1162 #[doc = "The `arc()` method."]
1163 #[doc = ""]
1164 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/arc)"]
1165 #[doc = ""]
1166 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1167 pub fn arc_with_anticlockwise(
1168 this: &CanvasRenderingContext2d,
1169 x: f64,
1170 y: f64,
1171 radius: f64,
1172 start_angle: f64,
1173 end_angle: f64,
1174 anticlockwise: bool,
1175 ) -> Result<(), JsValue>;
1176 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = arcTo)]
1177 #[doc = "The `arcTo()` method."]
1178 #[doc = ""]
1179 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/arcTo)"]
1180 #[doc = ""]
1181 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1182 pub fn arc_to(
1183 this: &CanvasRenderingContext2d,
1184 x1: f64,
1185 y1: f64,
1186 x2: f64,
1187 y2: f64,
1188 radius: f64,
1189 ) -> Result<(), JsValue>;
1190 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = bezierCurveTo)]
1191 #[doc = "The `bezierCurveTo()` method."]
1192 #[doc = ""]
1193 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/bezierCurveTo)"]
1194 #[doc = ""]
1195 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1196 pub fn bezier_curve_to(
1197 this: &CanvasRenderingContext2d,
1198 cp1x: f64,
1199 cp1y: f64,
1200 cp2x: f64,
1201 cp2y: f64,
1202 x: f64,
1203 y: f64,
1204 );
1205 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = closePath)]
1206 #[doc = "The `closePath()` method."]
1207 #[doc = ""]
1208 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/closePath)"]
1209 #[doc = ""]
1210 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1211 pub fn close_path(this: &CanvasRenderingContext2d);
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(
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 ) -> Result<(), JsValue>;
1228 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = ellipse)]
1229 #[doc = "The `ellipse()` method."]
1230 #[doc = ""]
1231 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/ellipse)"]
1232 #[doc = ""]
1233 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1234 pub fn ellipse_with_anticlockwise(
1235 this: &CanvasRenderingContext2d,
1236 x: f64,
1237 y: f64,
1238 radius_x: f64,
1239 radius_y: f64,
1240 rotation: f64,
1241 start_angle: f64,
1242 end_angle: f64,
1243 anticlockwise: bool,
1244 ) -> Result<(), JsValue>;
1245 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = lineTo)]
1246 #[doc = "The `lineTo()` method."]
1247 #[doc = ""]
1248 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineTo)"]
1249 #[doc = ""]
1250 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1251 pub fn line_to(this: &CanvasRenderingContext2d, x: f64, y: f64);
1252 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = moveTo)]
1253 #[doc = "The `moveTo()` method."]
1254 #[doc = ""]
1255 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/moveTo)"]
1256 #[doc = ""]
1257 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1258 pub fn move_to(this: &CanvasRenderingContext2d, x: f64, y: f64);
1259 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = quadraticCurveTo)]
1260 #[doc = "The `quadraticCurveTo()` method."]
1261 #[doc = ""]
1262 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/quadraticCurveTo)"]
1263 #[doc = ""]
1264 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1265 pub fn quadratic_curve_to(this: &CanvasRenderingContext2d, cpx: f64, cpy: f64, x: f64, y: f64);
1266 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = rect)]
1267 #[doc = "The `rect()` method."]
1268 #[doc = ""]
1269 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/rect)"]
1270 #[doc = ""]
1271 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1272 pub fn rect(this: &CanvasRenderingContext2d, x: f64, y: f64, w: f64, h: f64);
1273 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = roundRect)]
1274 #[doc = "The `roundRect()` method."]
1275 #[doc = ""]
1276 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/roundRect)"]
1277 #[doc = ""]
1278 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1279 pub fn round_rect(
1280 this: &CanvasRenderingContext2d,
1281 x: f64,
1282 y: f64,
1283 w: f64,
1284 h: f64,
1285 ) -> Result<(), JsValue>;
1286 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = roundRect)]
1287 #[doc = "The `roundRect()` method."]
1288 #[doc = ""]
1289 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/roundRect)"]
1290 #[doc = ""]
1291 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1292 pub fn round_rect_with_f64(
1293 this: &CanvasRenderingContext2d,
1294 x: f64,
1295 y: f64,
1296 w: f64,
1297 h: f64,
1298 radii: f64,
1299 ) -> Result<(), JsValue>;
1300 #[cfg(feature = "DomPointInit")]
1301 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = roundRect)]
1302 #[doc = "The `roundRect()` method."]
1303 #[doc = ""]
1304 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/roundRect)"]
1305 #[doc = ""]
1306 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `DomPointInit`*"]
1307 pub fn round_rect_with_dom_point_init(
1308 this: &CanvasRenderingContext2d,
1309 x: f64,
1310 y: f64,
1311 w: f64,
1312 h: f64,
1313 radii: &DomPointInit,
1314 ) -> Result<(), JsValue>;
1315 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = roundRect)]
1316 #[doc = "The `roundRect()` method."]
1317 #[doc = ""]
1318 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/roundRect)"]
1319 #[doc = ""]
1320 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1321 pub fn round_rect_with_f64_sequence(
1322 this: &CanvasRenderingContext2d,
1323 x: f64,
1324 y: f64,
1325 w: f64,
1326 h: f64,
1327 radii: &::wasm_bindgen::JsValue,
1328 ) -> Result<(), JsValue>;
1329 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = roundRect)]
1330 #[doc = "The `roundRect()` method."]
1331 #[doc = ""]
1332 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/roundRect)"]
1333 #[doc = ""]
1334 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1335 pub fn round_rect_with_dom_point_init_sequence(
1336 this: &CanvasRenderingContext2d,
1337 x: f64,
1338 y: f64,
1339 w: f64,
1340 h: f64,
1341 radii: &::wasm_bindgen::JsValue,
1342 ) -> Result<(), JsValue>;
1343 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = getLineDash)]
1344 #[doc = "The `getLineDash()` method."]
1345 #[doc = ""]
1346 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getLineDash)"]
1347 #[doc = ""]
1348 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1349 pub fn get_line_dash(this: &CanvasRenderingContext2d) -> ::js_sys::Array;
1350 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = setLineDash)]
1351 #[doc = "The `setLineDash()` method."]
1352 #[doc = ""]
1353 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash)"]
1354 #[doc = ""]
1355 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1356 pub fn set_line_dash(
1357 this: &CanvasRenderingContext2d,
1358 segments: &::wasm_bindgen::JsValue,
1359 ) -> Result<(), JsValue>;
1360 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = clearRect)]
1361 #[doc = "The `clearRect()` method."]
1362 #[doc = ""]
1363 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/clearRect)"]
1364 #[doc = ""]
1365 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1366 pub fn clear_rect(this: &CanvasRenderingContext2d, x: f64, y: f64, w: f64, h: f64);
1367 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = fillRect)]
1368 #[doc = "The `fillRect()` method."]
1369 #[doc = ""]
1370 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillRect)"]
1371 #[doc = ""]
1372 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1373 pub fn fill_rect(this: &CanvasRenderingContext2d, x: f64, y: f64, w: f64, h: f64);
1374 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = strokeRect)]
1375 #[doc = "The `strokeRect()` method."]
1376 #[doc = ""]
1377 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/strokeRect)"]
1378 #[doc = ""]
1379 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1380 pub fn stroke_rect(this: &CanvasRenderingContext2d, x: f64, y: f64, w: f64, h: f64);
1381 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = reset)]
1382 #[doc = "The `reset()` method."]
1383 #[doc = ""]
1384 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/reset)"]
1385 #[doc = ""]
1386 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1387 pub fn reset(this: &CanvasRenderingContext2d);
1388 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = restore)]
1389 #[doc = "The `restore()` method."]
1390 #[doc = ""]
1391 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/restore)"]
1392 #[doc = ""]
1393 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1394 pub fn restore(this: &CanvasRenderingContext2d);
1395 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = save)]
1396 #[doc = "The `save()` method."]
1397 #[doc = ""]
1398 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/save)"]
1399 #[doc = ""]
1400 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1401 pub fn save(this: &CanvasRenderingContext2d);
1402 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = fillText)]
1403 #[doc = "The `fillText()` method."]
1404 #[doc = ""]
1405 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillText)"]
1406 #[doc = ""]
1407 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1408 pub fn fill_text(
1409 this: &CanvasRenderingContext2d,
1410 text: &str,
1411 x: f64,
1412 y: f64,
1413 ) -> Result<(), JsValue>;
1414 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = fillText)]
1415 #[doc = "The `fillText()` method."]
1416 #[doc = ""]
1417 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillText)"]
1418 #[doc = ""]
1419 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1420 pub fn fill_text_with_max_width(
1421 this: &CanvasRenderingContext2d,
1422 text: &str,
1423 x: f64,
1424 y: f64,
1425 max_width: f64,
1426 ) -> Result<(), JsValue>;
1427 #[cfg(feature = "TextMetrics")]
1428 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = measureText)]
1429 #[doc = "The `measureText()` method."]
1430 #[doc = ""]
1431 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/measureText)"]
1432 #[doc = ""]
1433 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `TextMetrics`*"]
1434 pub fn measure_text(
1435 this: &CanvasRenderingContext2d,
1436 text: &str,
1437 ) -> Result<TextMetrics, JsValue>;
1438 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = strokeText)]
1439 #[doc = "The `strokeText()` method."]
1440 #[doc = ""]
1441 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/strokeText)"]
1442 #[doc = ""]
1443 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1444 pub fn stroke_text(
1445 this: &CanvasRenderingContext2d,
1446 text: &str,
1447 x: f64,
1448 y: f64,
1449 ) -> Result<(), JsValue>;
1450 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = strokeText)]
1451 #[doc = "The `strokeText()` method."]
1452 #[doc = ""]
1453 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/strokeText)"]
1454 #[doc = ""]
1455 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1456 pub fn stroke_text_with_max_width(
1457 this: &CanvasRenderingContext2d,
1458 text: &str,
1459 x: f64,
1460 y: f64,
1461 max_width: f64,
1462 ) -> Result<(), JsValue>;
1463 #[cfg(feature = "DomMatrix")]
1464 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = getTransform)]
1465 #[doc = "The `getTransform()` method."]
1466 #[doc = ""]
1467 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getTransform)"]
1468 #[doc = ""]
1469 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `DomMatrix`*"]
1470 pub fn get_transform(this: &CanvasRenderingContext2d) -> Result<DomMatrix, JsValue>;
1471 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = resetTransform)]
1472 #[doc = "The `resetTransform()` method."]
1473 #[doc = ""]
1474 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/resetTransform)"]
1475 #[doc = ""]
1476 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1477 pub fn reset_transform(this: &CanvasRenderingContext2d) -> Result<(), JsValue>;
1478 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = rotate)]
1479 #[doc = "The `rotate()` method."]
1480 #[doc = ""]
1481 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/rotate)"]
1482 #[doc = ""]
1483 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1484 pub fn rotate(this: &CanvasRenderingContext2d, angle: f64) -> Result<(), JsValue>;
1485 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = scale)]
1486 #[doc = "The `scale()` method."]
1487 #[doc = ""]
1488 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/scale)"]
1489 #[doc = ""]
1490 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1491 pub fn scale(this: &CanvasRenderingContext2d, x: f64, y: f64) -> Result<(), JsValue>;
1492 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = setTransform)]
1493 #[doc = "The `setTransform()` method."]
1494 #[doc = ""]
1495 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setTransform)"]
1496 #[doc = ""]
1497 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1498 pub fn set_transform(
1499 this: &CanvasRenderingContext2d,
1500 a: f64,
1501 b: f64,
1502 c: f64,
1503 d: f64,
1504 e: f64,
1505 f: f64,
1506 ) -> Result<(), JsValue>;
1507 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = setTransform)]
1508 #[doc = "The `setTransform()` method."]
1509 #[doc = ""]
1510 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setTransform)"]
1511 #[doc = ""]
1512 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1513 pub fn set_transform_with_default_dom_matrix_2d_init(
1514 this: &CanvasRenderingContext2d,
1515 ) -> Result<(), JsValue>;
1516 #[cfg(feature = "DomMatrix2dInit")]
1517 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = setTransform)]
1518 #[doc = "The `setTransform()` method."]
1519 #[doc = ""]
1520 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setTransform)"]
1521 #[doc = ""]
1522 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `DomMatrix2dInit`*"]
1523 pub fn set_transform_with_dom_matrix_2d_init(
1524 this: &CanvasRenderingContext2d,
1525 transform: &DomMatrix2dInit,
1526 ) -> Result<(), JsValue>;
1527 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = transform)]
1528 #[doc = "The `transform()` method."]
1529 #[doc = ""]
1530 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/transform)"]
1531 #[doc = ""]
1532 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1533 pub fn transform(
1534 this: &CanvasRenderingContext2d,
1535 a: f64,
1536 b: f64,
1537 c: f64,
1538 d: f64,
1539 e: f64,
1540 f: f64,
1541 ) -> Result<(), JsValue>;
1542 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = translate)]
1543 #[doc = "The `translate()` method."]
1544 #[doc = ""]
1545 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/translate)"]
1546 #[doc = ""]
1547 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1548 pub fn translate(this: &CanvasRenderingContext2d, x: f64, y: f64) -> Result<(), JsValue>;
1549 #[cfg(feature = "Element")]
1550 # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawCustomFocusRing)]
1551 #[doc = "The `drawCustomFocusRing()` method."]
1552 #[doc = ""]
1553 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawCustomFocusRing)"]
1554 #[doc = ""]
1555 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `Element`*"]
1556 pub fn draw_custom_focus_ring(this: &CanvasRenderingContext2d, element: &Element) -> bool;
1557 #[cfg(feature = "Element")]
1558 # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawFocusIfNeeded)]
1559 #[doc = "The `drawFocusIfNeeded()` method."]
1560 #[doc = ""]
1561 #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawFocusIfNeeded)"]
1562 #[doc = ""]
1563 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `Element`*"]
1564 pub fn draw_focus_if_needed(
1565 this: &CanvasRenderingContext2d,
1566 element: &Element,
1567 ) -> Result<(), JsValue>;
1568}
1569impl CanvasRenderingContext2d {
1570 #[doc = "The `CanvasRenderingContext2D.DRAWWINDOW_DRAW_CARET` const."]
1571 #[doc = ""]
1572 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1573 pub const DRAWWINDOW_DRAW_CARET: u32 = 1u64 as u32;
1574 #[doc = "The `CanvasRenderingContext2D.DRAWWINDOW_DO_NOT_FLUSH` const."]
1575 #[doc = ""]
1576 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1577 pub const DRAWWINDOW_DO_NOT_FLUSH: u32 = 2u64 as u32;
1578 #[doc = "The `CanvasRenderingContext2D.DRAWWINDOW_DRAW_VIEW` const."]
1579 #[doc = ""]
1580 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1581 pub const DRAWWINDOW_DRAW_VIEW: u32 = 4u64 as u32;
1582 #[doc = "The `CanvasRenderingContext2D.DRAWWINDOW_USE_WIDGET_LAYERS` const."]
1583 #[doc = ""]
1584 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1585 pub const DRAWWINDOW_USE_WIDGET_LAYERS: u32 = 8u64 as u32;
1586 #[doc = "The `CanvasRenderingContext2D.DRAWWINDOW_ASYNC_DECODE_IMAGES` const."]
1587 #[doc = ""]
1588 #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
1589 pub const DRAWWINDOW_ASYNC_DECODE_IMAGES: u32 = 16u64 as u32;
1590}