diff options
author | crupest <crupest@outlook.com> | 2023-10-12 21:44:26 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2023-10-12 21:44:26 +0800 |
commit | 2025756fab9103a3baa8999445e61628cfb9b392 (patch) | |
tree | f076e51fb4580e77c50579743128176ba4c0e86c /src/platform/graphics/web_canvas/WebCanvasRef.cpp | |
parent | 3c5aa6583d7ab2533ff721282d1efd52d07281c7 (diff) | |
download | cru-2025756fab9103a3baa8999445e61628cfb9b392.tar.gz cru-2025756fab9103a3baa8999445e61628cfb9b392.tar.bz2 cru-2025756fab9103a3baa8999445e61628cfb9b392.zip |
...
Diffstat (limited to 'src/platform/graphics/web_canvas/WebCanvasRef.cpp')
-rw-r--r-- | src/platform/graphics/web_canvas/WebCanvasRef.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/platform/graphics/web_canvas/WebCanvasRef.cpp b/src/platform/graphics/web_canvas/WebCanvasRef.cpp index 886131f6..c4ad9b17 100644 --- a/src/platform/graphics/web_canvas/WebCanvasRef.cpp +++ b/src/platform/graphics/web_canvas/WebCanvasRef.cpp @@ -13,4 +13,8 @@ WebCanvasRef::WebCanvasRef(emscripten::val canvas_val) int WebCanvasRef::GetWidth() const { return val_["width"].as<int>(); } int WebCanvasRef::GetHeight() const { return val_["height"].as<int>(); } + +void WebCanvasRef::Save() const { val_.call<void>("save"); } + +void WebCanvasRef::Restore() const { val_.call<void>("restore"); } } // namespace cru::platform::graphics::web_canvas |