mirror of
https://github.com/rustwasm/wasm-bindgen.git
synced 2025-01-08 14:13:51 +03:00
parent
db91cc2a28
commit
a396d03d9e
@ -8,6 +8,9 @@
|
||||
* Add bindings for `RTCPeerConnectionIceErrorEvent`.
|
||||
[#3835](https://github.com/rustwasm/wasm-bindgen/pull/3835)
|
||||
|
||||
* Add bindings for `CanvasState.reset()`, affecting `CanvasRenderingContext2D` and `OffscreenCanvasRenderingContext2D`.
|
||||
[#3844](https://github.com/rustwasm/wasm-bindgen/pull/3844)
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
## [0.2.91](https://github.com/rustwasm/wasm-bindgen/compare/0.2.90...0.2.91)
|
||||
|
@ -1266,6 +1266,13 @@ extern "C" {
|
||||
#[doc = ""]
|
||||
#[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
|
||||
pub fn stroke_rect(this: &CanvasRenderingContext2d, x: f64, y: f64, w: f64, h: f64);
|
||||
# [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = reset)]
|
||||
#[doc = "The `reset()` method."]
|
||||
#[doc = ""]
|
||||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/reset)"]
|
||||
#[doc = ""]
|
||||
#[doc = "*This API requires the following crate features to be activated: `CanvasRenderingContext2d`*"]
|
||||
pub fn reset(this: &CanvasRenderingContext2d);
|
||||
# [wasm_bindgen (method , structural , js_class = "CanvasRenderingContext2D" , js_name = restore)]
|
||||
#[doc = "The `restore()` method."]
|
||||
#[doc = ""]
|
||||
|
@ -1222,6 +1222,13 @@ extern "C" {
|
||||
#[doc = ""]
|
||||
#[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
|
||||
pub fn stroke_rect(this: &OffscreenCanvasRenderingContext2d, x: f64, y: f64, w: f64, h: f64);
|
||||
# [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = reset)]
|
||||
#[doc = "The `reset()` method."]
|
||||
#[doc = ""]
|
||||
#[doc = "[MDN Documentation](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvasRenderingContext2D/reset)"]
|
||||
#[doc = ""]
|
||||
#[doc = "*This API requires the following crate features to be activated: `OffscreenCanvasRenderingContext2d`*"]
|
||||
pub fn reset(this: &OffscreenCanvasRenderingContext2d);
|
||||
# [wasm_bindgen (method , structural , js_class = "OffscreenCanvasRenderingContext2D" , js_name = restore)]
|
||||
#[doc = "The `restore()` method."]
|
||||
#[doc = ""]
|
||||
|
@ -131,6 +131,7 @@ interface mixin CanvasState {
|
||||
// state
|
||||
undefined save(); // push state on state stack
|
||||
undefined restore(); // pop state stack and restore state
|
||||
undefined reset(); // clears the backing buffer, drawing state stack, any defined paths, and styles
|
||||
};
|
||||
|
||||
interface mixin CanvasTransform {
|
||||
|
Loading…
Reference in New Issue
Block a user