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