| 1 | #![allow (unused_imports)] |
| 2 | #![allow (clippy::all)] |
| 3 | use super::*; |
| 4 | use wasm_bindgen::prelude::*; |
| 5 | #[wasm_bindgen ] |
| 6 | unsafeextern "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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn draw_image_with_offscreen_canvas( |
| 437 | this: &CanvasRenderingContext2d, |
| 438 | image: &OffscreenCanvas, |
| 439 | dx: f64, |
| 440 | dy: f64, |
| 441 | ) -> Result<(), JsValue>; |
| 442 | #[cfg (web_sys_unstable_apis)] |
| 443 | #[cfg (feature = "VideoFrame" )] |
| 444 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)] |
| 445 | #[doc = "The `drawImage()` method." ] |
| 446 | #[doc = "" ] |
| 447 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)" ] |
| 448 | #[doc = "" ] |
| 449 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `VideoFrame`*" ] |
| 450 | #[doc = "" ] |
| 451 | #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as" ] |
| 452 | #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*" ] |
| 453 | pub fn draw_image_with_video_frame( |
| 454 | this: &CanvasRenderingContext2d, |
| 455 | image: &VideoFrame, |
| 456 | dx: f64, |
| 457 | dy: f64, |
| 458 | ) -> Result<(), JsValue>; |
| 459 | #[cfg (feature = "HtmlImageElement" )] |
| 460 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)] |
| 461 | #[doc = "The `drawImage()` method." ] |
| 462 | #[doc = "" ] |
| 463 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)" ] |
| 464 | #[doc = "" ] |
| 465 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `HtmlImageElement`*" ] |
| 466 | pub unsafefn draw_image_with_html_image_element_and_dw_and_dh( |
| 467 | this: &CanvasRenderingContext2d, |
| 468 | image: &HtmlImageElement, |
| 469 | dx: f64, |
| 470 | dy: f64, |
| 471 | dw: f64, |
| 472 | dh: f64, |
| 473 | ) -> Result<(), JsValue>; |
| 474 | #[cfg (feature = "SvgImageElement" )] |
| 475 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)] |
| 476 | #[doc = "The `drawImage()` method." ] |
| 477 | #[doc = "" ] |
| 478 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)" ] |
| 479 | #[doc = "" ] |
| 480 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `SvgImageElement`*" ] |
| 481 | pub fn draw_image_with_svg_image_element_and_dw_and_dh( |
| 482 | this: &CanvasRenderingContext2d, |
| 483 | image: &SvgImageElement, |
| 484 | dx: f64, |
| 485 | dy: f64, |
| 486 | dw: f64, |
| 487 | dh: f64, |
| 488 | ) -> Result<(), JsValue>; |
| 489 | #[cfg (feature = "HtmlCanvasElement" )] |
| 490 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)] |
| 491 | #[doc = "The `drawImage()` method." ] |
| 492 | #[doc = "" ] |
| 493 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)" ] |
| 494 | #[doc = "" ] |
| 495 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `HtmlCanvasElement`*" ] |
| 496 | pub unsafefn draw_image_with_html_canvas_element_and_dw_and_dh( |
| 497 | this: &CanvasRenderingContext2d, |
| 498 | image: &HtmlCanvasElement, |
| 499 | dx: f64, |
| 500 | dy: f64, |
| 501 | dw: f64, |
| 502 | dh: f64, |
| 503 | ) -> Result<(), JsValue>; |
| 504 | #[cfg (feature = "HtmlVideoElement" )] |
| 505 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)] |
| 506 | #[doc = "The `drawImage()` method." ] |
| 507 | #[doc = "" ] |
| 508 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)" ] |
| 509 | #[doc = "" ] |
| 510 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `HtmlVideoElement`*" ] |
| 511 | pub unsafefn draw_image_with_html_video_element_and_dw_and_dh( |
| 512 | this: &CanvasRenderingContext2d, |
| 513 | image: &HtmlVideoElement, |
| 514 | dx: f64, |
| 515 | dy: f64, |
| 516 | dw: f64, |
| 517 | dh: f64, |
| 518 | ) -> Result<(), JsValue>; |
| 519 | #[cfg (feature = "ImageBitmap" )] |
| 520 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)] |
| 521 | #[doc = "The `drawImage()` method." ] |
| 522 | #[doc = "" ] |
| 523 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)" ] |
| 524 | #[doc = "" ] |
| 525 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `ImageBitmap`*" ] |
| 526 | pub unsafefn draw_image_with_image_bitmap_and_dw_and_dh( |
| 527 | this: &CanvasRenderingContext2d, |
| 528 | image: &ImageBitmap, |
| 529 | dx: f64, |
| 530 | dy: f64, |
| 531 | dw: f64, |
| 532 | dh: f64, |
| 533 | ) -> Result<(), JsValue>; |
| 534 | #[cfg (feature = "OffscreenCanvas" )] |
| 535 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)] |
| 536 | #[doc = "The `drawImage()` method." ] |
| 537 | #[doc = "" ] |
| 538 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)" ] |
| 539 | #[doc = "" ] |
| 540 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `OffscreenCanvas`*" ] |
| 541 | pub unsafefn draw_image_with_offscreen_canvas_and_dw_and_dh( |
| 542 | this: &CanvasRenderingContext2d, |
| 543 | image: &OffscreenCanvas, |
| 544 | dx: f64, |
| 545 | dy: f64, |
| 546 | dw: f64, |
| 547 | dh: f64, |
| 548 | ) -> Result<(), JsValue>; |
| 549 | #[cfg (web_sys_unstable_apis)] |
| 550 | #[cfg (feature = "VideoFrame" )] |
| 551 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)] |
| 552 | #[doc = "The `drawImage()` method." ] |
| 553 | #[doc = "" ] |
| 554 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)" ] |
| 555 | #[doc = "" ] |
| 556 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `VideoFrame`*" ] |
| 557 | #[doc = "" ] |
| 558 | #[doc = "*This API is unstable and requires `--cfg=web_sys_unstable_apis` to be activated, as" ] |
| 559 | #[doc = "[described in the `wasm-bindgen` guide](https://rustwasm.github.io/docs/wasm-bindgen/web-sys/unstable-apis.html)*" ] |
| 560 | pub fn draw_image_with_video_frame_and_dw_and_dh( |
| 561 | this: &CanvasRenderingContext2d, |
| 562 | image: &VideoFrame, |
| 563 | dx: f64, |
| 564 | dy: f64, |
| 565 | dw: f64, |
| 566 | dh: f64, |
| 567 | ) -> Result<(), JsValue>; |
| 568 | #[cfg (feature = "HtmlImageElement" )] |
| 569 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)] |
| 570 | #[doc = "The `drawImage()` method." ] |
| 571 | #[doc = "" ] |
| 572 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)" ] |
| 573 | #[doc = "" ] |
| 574 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `HtmlImageElement`*" ] |
| 575 | pub unsafefn draw_image_with_html_image_element_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh( |
| 576 | this: &CanvasRenderingContext2d, |
| 577 | image: &HtmlImageElement, |
| 578 | sx: f64, |
| 579 | sy: f64, |
| 580 | sw: f64, |
| 581 | sh: f64, |
| 582 | dx: f64, |
| 583 | dy: f64, |
| 584 | dw: f64, |
| 585 | dh: f64, |
| 586 | ) -> Result<(), JsValue>; |
| 587 | #[cfg (feature = "SvgImageElement" )] |
| 588 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)] |
| 589 | #[doc = "The `drawImage()` method." ] |
| 590 | #[doc = "" ] |
| 591 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)" ] |
| 592 | #[doc = "" ] |
| 593 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `SvgImageElement`*" ] |
| 594 | pub fn draw_image_with_svg_image_element_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh( |
| 595 | this: &CanvasRenderingContext2d, |
| 596 | image: &SvgImageElement, |
| 597 | sx: f64, |
| 598 | sy: f64, |
| 599 | sw: f64, |
| 600 | sh: f64, |
| 601 | dx: f64, |
| 602 | dy: f64, |
| 603 | dw: f64, |
| 604 | dh: f64, |
| 605 | ) -> Result<(), JsValue>; |
| 606 | #[cfg (feature = "HtmlCanvasElement" )] |
| 607 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)] |
| 608 | #[doc = "The `drawImage()` method." ] |
| 609 | #[doc = "" ] |
| 610 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)" ] |
| 611 | #[doc = "" ] |
| 612 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `HtmlCanvasElement`*" ] |
| 613 | pub unsafefn draw_image_with_html_canvas_element_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh( |
| 614 | this: &CanvasRenderingContext2d, |
| 615 | image: &HtmlCanvasElement, |
| 616 | sx: f64, |
| 617 | sy: f64, |
| 618 | sw: f64, |
| 619 | sh: f64, |
| 620 | dx: f64, |
| 621 | dy: f64, |
| 622 | dw: f64, |
| 623 | dh: f64, |
| 624 | ) -> Result<(), JsValue>; |
| 625 | #[cfg (feature = "HtmlVideoElement" )] |
| 626 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)] |
| 627 | #[doc = "The `drawImage()` method." ] |
| 628 | #[doc = "" ] |
| 629 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)" ] |
| 630 | #[doc = "" ] |
| 631 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `HtmlVideoElement`*" ] |
| 632 | pub unsafefn draw_image_with_html_video_element_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh( |
| 633 | this: &CanvasRenderingContext2d, |
| 634 | image: &HtmlVideoElement, |
| 635 | sx: f64, |
| 636 | sy: f64, |
| 637 | sw: f64, |
| 638 | sh: f64, |
| 639 | dx: f64, |
| 640 | dy: f64, |
| 641 | dw: f64, |
| 642 | dh: f64, |
| 643 | ) -> Result<(), JsValue>; |
| 644 | #[cfg (feature = "ImageBitmap" )] |
| 645 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)] |
| 646 | #[doc = "The `drawImage()` method." ] |
| 647 | #[doc = "" ] |
| 648 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)" ] |
| 649 | #[doc = "" ] |
| 650 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `ImageBitmap`*" ] |
| 651 | pub unsafefn draw_image_with_image_bitmap_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh( |
| 652 | this: &CanvasRenderingContext2d, |
| 653 | image: &ImageBitmap, |
| 654 | sx: f64, |
| 655 | sy: f64, |
| 656 | sw: f64, |
| 657 | sh: f64, |
| 658 | dx: f64, |
| 659 | dy: f64, |
| 660 | dw: f64, |
| 661 | dh: f64, |
| 662 | ) -> Result<(), JsValue>; |
| 663 | #[cfg (feature = "OffscreenCanvas" )] |
| 664 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawImage)] |
| 665 | #[doc = "The `drawImage()` method." ] |
| 666 | #[doc = "" ] |
| 667 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawImage)" ] |
| 668 | #[doc = "" ] |
| 669 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `OffscreenCanvas`*" ] |
| 670 | pub unsafefn draw_image_with_offscreen_canvas_and_sw_and_sh_and_dx_and_dy_and_dw_and_dh( |
| 671 | this: &CanvasRenderingContext2d, |
| 672 | image: &OffscreenCanvas, |
| 673 | sx: f64, |
| 674 | sy: f64, |
| 675 | sw: f64, |
| 676 | sh: f64, |
| 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://rustwasm.github.io/docs/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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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://rustwasm.github.io/docs/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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn 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 unsafefn create_image_data_with_imagedata( |
| 1041 | this: &CanvasRenderingContext2d, |
| 1042 | imagedata: &ImageData, |
| 1043 | ) -> Result<ImageData, JsValue>; |
| 1044 | #[cfg (feature = "ImageData" )] |
| 1045 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = getImageData)] |
| 1046 | #[doc = "The `getImageData()` method." ] |
| 1047 | #[doc = "" ] |
| 1048 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getImageData)" ] |
| 1049 | #[doc = "" ] |
| 1050 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `ImageData`*" ] |
| 1051 | pub unsafefn get_image_data( |
| 1052 | this: &CanvasRenderingContext2d, |
| 1053 | sx: f64, |
| 1054 | sy: f64, |
| 1055 | sw: f64, |
| 1056 | sh: f64, |
| 1057 | ) -> Result<ImageData, JsValue>; |
| 1058 | #[cfg (feature = "ImageData" )] |
| 1059 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = putImageData)] |
| 1060 | #[doc = "The `putImageData()` method." ] |
| 1061 | #[doc = "" ] |
| 1062 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/putImageData)" ] |
| 1063 | #[doc = "" ] |
| 1064 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `ImageData`*" ] |
| 1065 | pub unsafefn put_image_data( |
| 1066 | this: &CanvasRenderingContext2d, |
| 1067 | imagedata: &ImageData, |
| 1068 | dx: f64, |
| 1069 | dy: f64, |
| 1070 | ) -> Result<(), JsValue>; |
| 1071 | #[cfg (feature = "ImageData" )] |
| 1072 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = putImageData)] |
| 1073 | #[doc = "The `putImageData()` method." ] |
| 1074 | #[doc = "" ] |
| 1075 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/putImageData)" ] |
| 1076 | #[doc = "" ] |
| 1077 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `ImageData`*" ] |
| 1078 | pub unsafefn put_image_data_with_dirty_x_and_dirty_y_and_dirty_width_and_dirty_height( |
| 1079 | this: &CanvasRenderingContext2d, |
| 1080 | imagedata: &ImageData, |
| 1081 | dx: f64, |
| 1082 | dy: f64, |
| 1083 | dirty_x: f64, |
| 1084 | dirty_y: f64, |
| 1085 | dirty_width: f64, |
| 1086 | dirty_height: f64, |
| 1087 | ) -> Result<(), JsValue>; |
| 1088 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = arc)] |
| 1089 | #[doc = "The `arc()` method." ] |
| 1090 | #[doc = "" ] |
| 1091 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/arc)" ] |
| 1092 | #[doc = "" ] |
| 1093 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1094 | pub unsafefn arc( |
| 1095 | this: &CanvasRenderingContext2d, |
| 1096 | x: f64, |
| 1097 | y: f64, |
| 1098 | radius: f64, |
| 1099 | start_angle: f64, |
| 1100 | end_angle: f64, |
| 1101 | ) -> Result<(), JsValue>; |
| 1102 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = arc)] |
| 1103 | #[doc = "The `arc()` method." ] |
| 1104 | #[doc = "" ] |
| 1105 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/arc)" ] |
| 1106 | #[doc = "" ] |
| 1107 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1108 | pub unsafefn arc_with_anticlockwise( |
| 1109 | this: &CanvasRenderingContext2d, |
| 1110 | x: f64, |
| 1111 | y: f64, |
| 1112 | radius: f64, |
| 1113 | start_angle: f64, |
| 1114 | end_angle: f64, |
| 1115 | anticlockwise: bool, |
| 1116 | ) -> Result<(), JsValue>; |
| 1117 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = arcTo)] |
| 1118 | #[doc = "The `arcTo()` method." ] |
| 1119 | #[doc = "" ] |
| 1120 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/arcTo)" ] |
| 1121 | #[doc = "" ] |
| 1122 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1123 | pub unsafefn arc_to( |
| 1124 | this: &CanvasRenderingContext2d, |
| 1125 | x1: f64, |
| 1126 | y1: f64, |
| 1127 | x2: f64, |
| 1128 | y2: f64, |
| 1129 | radius: f64, |
| 1130 | ) -> Result<(), JsValue>; |
| 1131 | # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = bezierCurveTo)] |
| 1132 | #[doc = "The `bezierCurveTo()` method." ] |
| 1133 | #[doc = "" ] |
| 1134 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/bezierCurveTo)" ] |
| 1135 | #[doc = "" ] |
| 1136 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1137 | pub unsafefn bezier_curve_to( |
| 1138 | this: &CanvasRenderingContext2d, |
| 1139 | cp1x: f64, |
| 1140 | cp1y: f64, |
| 1141 | cp2x: f64, |
| 1142 | cp2y: f64, |
| 1143 | x: f64, |
| 1144 | y: f64, |
| 1145 | ); |
| 1146 | # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = closePath)] |
| 1147 | #[doc = "The `closePath()` method." ] |
| 1148 | #[doc = "" ] |
| 1149 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/closePath)" ] |
| 1150 | #[doc = "" ] |
| 1151 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1152 | pub unsafefn close_path(this: &CanvasRenderingContext2d); |
| 1153 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = ellipse)] |
| 1154 | #[doc = "The `ellipse()` method." ] |
| 1155 | #[doc = "" ] |
| 1156 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/ellipse)" ] |
| 1157 | #[doc = "" ] |
| 1158 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1159 | pub unsafefn ellipse( |
| 1160 | this: &CanvasRenderingContext2d, |
| 1161 | x: f64, |
| 1162 | y: f64, |
| 1163 | radius_x: f64, |
| 1164 | radius_y: f64, |
| 1165 | rotation: f64, |
| 1166 | start_angle: f64, |
| 1167 | end_angle: f64, |
| 1168 | ) -> Result<(), JsValue>; |
| 1169 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = ellipse)] |
| 1170 | #[doc = "The `ellipse()` method." ] |
| 1171 | #[doc = "" ] |
| 1172 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/ellipse)" ] |
| 1173 | #[doc = "" ] |
| 1174 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1175 | pub unsafefn ellipse_with_anticlockwise( |
| 1176 | this: &CanvasRenderingContext2d, |
| 1177 | x: f64, |
| 1178 | y: f64, |
| 1179 | radius_x: f64, |
| 1180 | radius_y: f64, |
| 1181 | rotation: f64, |
| 1182 | start_angle: f64, |
| 1183 | end_angle: f64, |
| 1184 | anticlockwise: bool, |
| 1185 | ) -> Result<(), JsValue>; |
| 1186 | # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = lineTo)] |
| 1187 | #[doc = "The `lineTo()` method." ] |
| 1188 | #[doc = "" ] |
| 1189 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/lineTo)" ] |
| 1190 | #[doc = "" ] |
| 1191 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1192 | pub unsafefn line_to(this: &CanvasRenderingContext2d, x: f64, y: f64); |
| 1193 | # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = moveTo)] |
| 1194 | #[doc = "The `moveTo()` method." ] |
| 1195 | #[doc = "" ] |
| 1196 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/moveTo)" ] |
| 1197 | #[doc = "" ] |
| 1198 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1199 | pub unsafefn move_to(this: &CanvasRenderingContext2d, x: f64, y: f64); |
| 1200 | # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = quadraticCurveTo)] |
| 1201 | #[doc = "The `quadraticCurveTo()` method." ] |
| 1202 | #[doc = "" ] |
| 1203 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/quadraticCurveTo)" ] |
| 1204 | #[doc = "" ] |
| 1205 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1206 | pub unsafefn quadratic_curve_to(this: &CanvasRenderingContext2d, cpx: f64, cpy: f64, x: f64, y: f64); |
| 1207 | # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = rect)] |
| 1208 | #[doc = "The `rect()` method." ] |
| 1209 | #[doc = "" ] |
| 1210 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/rect)" ] |
| 1211 | #[doc = "" ] |
| 1212 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1213 | pub unsafefn rect(this: &CanvasRenderingContext2d, x: f64, y: f64, w: f64, h: f64); |
| 1214 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = roundRect)] |
| 1215 | #[doc = "The `roundRect()` method." ] |
| 1216 | #[doc = "" ] |
| 1217 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/roundRect)" ] |
| 1218 | #[doc = "" ] |
| 1219 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1220 | pub unsafefn round_rect( |
| 1221 | this: &CanvasRenderingContext2d, |
| 1222 | x: f64, |
| 1223 | y: f64, |
| 1224 | w: f64, |
| 1225 | h: f64, |
| 1226 | ) -> Result<(), JsValue>; |
| 1227 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = roundRect)] |
| 1228 | #[doc = "The `roundRect()` method." ] |
| 1229 | #[doc = "" ] |
| 1230 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/roundRect)" ] |
| 1231 | #[doc = "" ] |
| 1232 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1233 | pub unsafefn round_rect_with_f64( |
| 1234 | this: &CanvasRenderingContext2d, |
| 1235 | x: f64, |
| 1236 | y: f64, |
| 1237 | w: f64, |
| 1238 | h: f64, |
| 1239 | radii: f64, |
| 1240 | ) -> Result<(), JsValue>; |
| 1241 | #[cfg (feature = "DomPointInit" )] |
| 1242 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = roundRect)] |
| 1243 | #[doc = "The `roundRect()` method." ] |
| 1244 | #[doc = "" ] |
| 1245 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/roundRect)" ] |
| 1246 | #[doc = "" ] |
| 1247 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `DomPointInit`*" ] |
| 1248 | pub fn round_rect_with_dom_point_init( |
| 1249 | this: &CanvasRenderingContext2d, |
| 1250 | x: f64, |
| 1251 | y: f64, |
| 1252 | w: f64, |
| 1253 | h: f64, |
| 1254 | radii: &DomPointInit, |
| 1255 | ) -> Result<(), JsValue>; |
| 1256 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = roundRect)] |
| 1257 | #[doc = "The `roundRect()` method." ] |
| 1258 | #[doc = "" ] |
| 1259 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/roundRect)" ] |
| 1260 | #[doc = "" ] |
| 1261 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1262 | pub unsafefn round_rect_with_f64_sequence( |
| 1263 | this: &CanvasRenderingContext2d, |
| 1264 | x: f64, |
| 1265 | y: f64, |
| 1266 | w: f64, |
| 1267 | h: f64, |
| 1268 | radii: &::wasm_bindgen::JsValue, |
| 1269 | ) -> Result<(), JsValue>; |
| 1270 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = roundRect)] |
| 1271 | #[doc = "The `roundRect()` method." ] |
| 1272 | #[doc = "" ] |
| 1273 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/roundRect)" ] |
| 1274 | #[doc = "" ] |
| 1275 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1276 | pub unsafefn round_rect_with_dom_point_init_sequence( |
| 1277 | this: &CanvasRenderingContext2d, |
| 1278 | x: f64, |
| 1279 | y: f64, |
| 1280 | w: f64, |
| 1281 | h: f64, |
| 1282 | radii: &::wasm_bindgen::JsValue, |
| 1283 | ) -> Result<(), JsValue>; |
| 1284 | # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = getLineDash)] |
| 1285 | #[doc = "The `getLineDash()` method." ] |
| 1286 | #[doc = "" ] |
| 1287 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getLineDash)" ] |
| 1288 | #[doc = "" ] |
| 1289 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1290 | pub unsafefn get_line_dash(this: &CanvasRenderingContext2d) -> ::js_sys::Array; |
| 1291 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = setLineDash)] |
| 1292 | #[doc = "The `setLineDash()` method." ] |
| 1293 | #[doc = "" ] |
| 1294 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setLineDash)" ] |
| 1295 | #[doc = "" ] |
| 1296 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1297 | pub unsafefn set_line_dash( |
| 1298 | this: &CanvasRenderingContext2d, |
| 1299 | segments: &::wasm_bindgen::JsValue, |
| 1300 | ) -> Result<(), JsValue>; |
| 1301 | # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = clearRect)] |
| 1302 | #[doc = "The `clearRect()` method." ] |
| 1303 | #[doc = "" ] |
| 1304 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/clearRect)" ] |
| 1305 | #[doc = "" ] |
| 1306 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1307 | pub unsafefn clear_rect(this: &CanvasRenderingContext2d, x: f64, y: f64, w: f64, h: f64); |
| 1308 | # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = fillRect)] |
| 1309 | #[doc = "The `fillRect()` method." ] |
| 1310 | #[doc = "" ] |
| 1311 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillRect)" ] |
| 1312 | #[doc = "" ] |
| 1313 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1314 | pub unsafefn fill_rect(this: &CanvasRenderingContext2d, x: f64, y: f64, w: f64, h: f64); |
| 1315 | # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = strokeRect)] |
| 1316 | #[doc = "The `strokeRect()` method." ] |
| 1317 | #[doc = "" ] |
| 1318 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/strokeRect)" ] |
| 1319 | #[doc = "" ] |
| 1320 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1321 | pub unsafefn stroke_rect(this: &CanvasRenderingContext2d, x: f64, y: f64, w: f64, h: f64); |
| 1322 | # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = reset)] |
| 1323 | #[doc = "The `reset()` method." ] |
| 1324 | #[doc = "" ] |
| 1325 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/reset)" ] |
| 1326 | #[doc = "" ] |
| 1327 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1328 | pub unsafefn reset(this: &CanvasRenderingContext2d); |
| 1329 | # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = restore)] |
| 1330 | #[doc = "The `restore()` method." ] |
| 1331 | #[doc = "" ] |
| 1332 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/restore)" ] |
| 1333 | #[doc = "" ] |
| 1334 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1335 | pub unsafefn restore(this: &CanvasRenderingContext2d); |
| 1336 | # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = save)] |
| 1337 | #[doc = "The `save()` method." ] |
| 1338 | #[doc = "" ] |
| 1339 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/save)" ] |
| 1340 | #[doc = "" ] |
| 1341 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1342 | pub unsafefn save(this: &CanvasRenderingContext2d); |
| 1343 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = fillText)] |
| 1344 | #[doc = "The `fillText()` method." ] |
| 1345 | #[doc = "" ] |
| 1346 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillText)" ] |
| 1347 | #[doc = "" ] |
| 1348 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1349 | pub unsafefn fill_text( |
| 1350 | this: &CanvasRenderingContext2d, |
| 1351 | text: &str, |
| 1352 | x: f64, |
| 1353 | y: f64, |
| 1354 | ) -> Result<(), JsValue>; |
| 1355 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = fillText)] |
| 1356 | #[doc = "The `fillText()` method." ] |
| 1357 | #[doc = "" ] |
| 1358 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/fillText)" ] |
| 1359 | #[doc = "" ] |
| 1360 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1361 | pub unsafefn fill_text_with_max_width( |
| 1362 | this: &CanvasRenderingContext2d, |
| 1363 | text: &str, |
| 1364 | x: f64, |
| 1365 | y: f64, |
| 1366 | max_width: f64, |
| 1367 | ) -> Result<(), JsValue>; |
| 1368 | #[cfg (feature = "TextMetrics" )] |
| 1369 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = measureText)] |
| 1370 | #[doc = "The `measureText()` method." ] |
| 1371 | #[doc = "" ] |
| 1372 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/measureText)" ] |
| 1373 | #[doc = "" ] |
| 1374 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `TextMetrics`*" ] |
| 1375 | pub fn measure_text( |
| 1376 | this: &CanvasRenderingContext2d, |
| 1377 | text: &str, |
| 1378 | ) -> Result<TextMetrics, JsValue>; |
| 1379 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = strokeText)] |
| 1380 | #[doc = "The `strokeText()` method." ] |
| 1381 | #[doc = "" ] |
| 1382 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/strokeText)" ] |
| 1383 | #[doc = "" ] |
| 1384 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1385 | pub unsafefn stroke_text( |
| 1386 | this: &CanvasRenderingContext2d, |
| 1387 | text: &str, |
| 1388 | x: f64, |
| 1389 | y: f64, |
| 1390 | ) -> Result<(), JsValue>; |
| 1391 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = strokeText)] |
| 1392 | #[doc = "The `strokeText()` method." ] |
| 1393 | #[doc = "" ] |
| 1394 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/strokeText)" ] |
| 1395 | #[doc = "" ] |
| 1396 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1397 | pub unsafefn stroke_text_with_max_width( |
| 1398 | this: &CanvasRenderingContext2d, |
| 1399 | text: &str, |
| 1400 | x: f64, |
| 1401 | y: f64, |
| 1402 | max_width: f64, |
| 1403 | ) -> Result<(), JsValue>; |
| 1404 | #[cfg (feature = "DomMatrix" )] |
| 1405 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = getTransform)] |
| 1406 | #[doc = "The `getTransform()` method." ] |
| 1407 | #[doc = "" ] |
| 1408 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getTransform)" ] |
| 1409 | #[doc = "" ] |
| 1410 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `DomMatrix`*" ] |
| 1411 | pub fn get_transform(this: &CanvasRenderingContext2d) -> Result<DomMatrix, JsValue>; |
| 1412 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = resetTransform)] |
| 1413 | #[doc = "The `resetTransform()` method." ] |
| 1414 | #[doc = "" ] |
| 1415 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/resetTransform)" ] |
| 1416 | #[doc = "" ] |
| 1417 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1418 | pub unsafefn reset_transform(this: &CanvasRenderingContext2d) -> Result<(), JsValue>; |
| 1419 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = rotate)] |
| 1420 | #[doc = "The `rotate()` method." ] |
| 1421 | #[doc = "" ] |
| 1422 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/rotate)" ] |
| 1423 | #[doc = "" ] |
| 1424 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1425 | pub unsafefn rotate(this: &CanvasRenderingContext2d, angle: f64) -> Result<(), JsValue>; |
| 1426 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = scale)] |
| 1427 | #[doc = "The `scale()` method." ] |
| 1428 | #[doc = "" ] |
| 1429 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/scale)" ] |
| 1430 | #[doc = "" ] |
| 1431 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1432 | pub unsafefn scale(this: &CanvasRenderingContext2d, x: f64, y: f64) -> Result<(), JsValue>; |
| 1433 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = setTransform)] |
| 1434 | #[doc = "The `setTransform()` method." ] |
| 1435 | #[doc = "" ] |
| 1436 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setTransform)" ] |
| 1437 | #[doc = "" ] |
| 1438 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1439 | pub unsafefn set_transform( |
| 1440 | this: &CanvasRenderingContext2d, |
| 1441 | a: f64, |
| 1442 | b: f64, |
| 1443 | c: f64, |
| 1444 | d: f64, |
| 1445 | e: f64, |
| 1446 | f: f64, |
| 1447 | ) -> Result<(), JsValue>; |
| 1448 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = setTransform)] |
| 1449 | #[doc = "The `setTransform()` method." ] |
| 1450 | #[doc = "" ] |
| 1451 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setTransform)" ] |
| 1452 | #[doc = "" ] |
| 1453 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1454 | pub unsafefn set_transform_with_default_dom_matrix_2d_init( |
| 1455 | this: &CanvasRenderingContext2d, |
| 1456 | ) -> Result<(), JsValue>; |
| 1457 | #[cfg (feature = "DomMatrix2dInit" )] |
| 1458 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = setTransform)] |
| 1459 | #[doc = "The `setTransform()` method." ] |
| 1460 | #[doc = "" ] |
| 1461 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/setTransform)" ] |
| 1462 | #[doc = "" ] |
| 1463 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `DomMatrix2dInit`*" ] |
| 1464 | pub fn set_transform_with_dom_matrix_2d_init( |
| 1465 | this: &CanvasRenderingContext2d, |
| 1466 | transform: &DomMatrix2dInit, |
| 1467 | ) -> Result<(), JsValue>; |
| 1468 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = transform)] |
| 1469 | #[doc = "The `transform()` method." ] |
| 1470 | #[doc = "" ] |
| 1471 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/transform)" ] |
| 1472 | #[doc = "" ] |
| 1473 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1474 | pub unsafefn transform( |
| 1475 | this: &CanvasRenderingContext2d, |
| 1476 | a: f64, |
| 1477 | b: f64, |
| 1478 | c: f64, |
| 1479 | d: f64, |
| 1480 | e: f64, |
| 1481 | f: f64, |
| 1482 | ) -> Result<(), JsValue>; |
| 1483 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = translate)] |
| 1484 | #[doc = "The `translate()` method." ] |
| 1485 | #[doc = "" ] |
| 1486 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/translate)" ] |
| 1487 | #[doc = "" ] |
| 1488 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1489 | pub unsafefn translate(this: &CanvasRenderingContext2d, x: f64, y: f64) -> Result<(), JsValue>; |
| 1490 | #[cfg (feature = "Element" )] |
| 1491 | # [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawCustomFocusRing)] |
| 1492 | #[doc = "The `drawCustomFocusRing()` method." ] |
| 1493 | #[doc = "" ] |
| 1494 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawCustomFocusRing)" ] |
| 1495 | #[doc = "" ] |
| 1496 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `Element`*" ] |
| 1497 | pub unsafefn draw_custom_focus_ring(this: &CanvasRenderingContext2d, element: &Element) -> bool; |
| 1498 | #[cfg (feature = "Element" )] |
| 1499 | # [wasm_bindgen (catch , method , structural , js_class = "CanvasRenderingContext2D" , js_name = drawFocusIfNeeded)] |
| 1500 | #[doc = "The `drawFocusIfNeeded()` method." ] |
| 1501 | #[doc = "" ] |
| 1502 | #[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/drawFocusIfNeeded)" ] |
| 1503 | #[doc = "" ] |
| 1504 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`, `Element`*" ] |
| 1505 | pub unsafefn draw_focus_if_needed( |
| 1506 | this: &CanvasRenderingContext2d, |
| 1507 | element: &Element, |
| 1508 | ) -> Result<(), JsValue>; |
| 1509 | } |
| 1510 | impl CanvasRenderingContext2d { |
| 1511 | #[doc = "The `CanvasRenderingContext2D.DRAWWINDOW_DRAW_CARET` const." ] |
| 1512 | #[doc = "" ] |
| 1513 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1514 | pub const DRAWWINDOW_DRAW_CARET: u32 = 1u64 as u32; |
| 1515 | #[doc = "The `CanvasRenderingContext2D.DRAWWINDOW_DO_NOT_FLUSH` const." ] |
| 1516 | #[doc = "" ] |
| 1517 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1518 | pub const DRAWWINDOW_DO_NOT_FLUSH: u32 = 2u64 as u32; |
| 1519 | #[doc = "The `CanvasRenderingContext2D.DRAWWINDOW_DRAW_VIEW` const." ] |
| 1520 | #[doc = "" ] |
| 1521 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1522 | pub const DRAWWINDOW_DRAW_VIEW: u32 = 4u64 as u32; |
| 1523 | #[doc = "The `CanvasRenderingContext2D.DRAWWINDOW_USE_WIDGET_LAYERS` const." ] |
| 1524 | #[doc = "" ] |
| 1525 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1526 | pub const DRAWWINDOW_USE_WIDGET_LAYERS: u32 = 8u64 as u32; |
| 1527 | #[doc = "The `CanvasRenderingContext2D.DRAWWINDOW_ASYNC_DECODE_IMAGES` const." ] |
| 1528 | #[doc = "" ] |
| 1529 | #[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*" ] |
| 1530 | pub const DRAWWINDOW_ASYNC_DECODE_IMAGES: u32 = 16u64 as u32; |
| 1531 | } |
| 1532 | |