diff options
author | crupest <crupest@outlook.com> | 2023-10-09 22:25:54 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2023-10-09 22:25:54 +0800 |
commit | 78760fd8a5b310ca4e8de502e510b95c9b4c880c (patch) | |
tree | d53da9e28decf583d027cc8eb023c591e02ee73f /include/cru/platform/graphics/web_canvas/WebCanvasRef.h | |
parent | 1907d4fffd24e6d6bd1b7db7d903da60e53888dc (diff) | |
download | cru-78760fd8a5b310ca4e8de502e510b95c9b4c880c.tar.gz cru-78760fd8a5b310ca4e8de502e510b95c9b4c880c.tar.bz2 cru-78760fd8a5b310ca4e8de502e510b95c9b4c880c.zip |
...
Diffstat (limited to 'include/cru/platform/graphics/web_canvas/WebCanvasRef.h')
-rw-r--r-- | include/cru/platform/graphics/web_canvas/WebCanvasRef.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/include/cru/platform/graphics/web_canvas/WebCanvasRef.h b/include/cru/platform/graphics/web_canvas/WebCanvasRef.h new file mode 100644 index 00000000..4cb960bd --- /dev/null +++ b/include/cru/platform/graphics/web_canvas/WebCanvasRef.h @@ -0,0 +1,24 @@ +#pragma once + +#include "cru/common/Base.h" + +#include <emscripten/val.h> + +namespace cru::platform::graphics::web_canvas { + class WebCanvasRef { + public: + explicit WebCanvasRef(emscripten::val canvas_val); + + CRU_DEFAULT_COPY(WebCanvasRef) + CRU_DEFAULT_MOVE(WebCanvasRef) + + CRU_DEFAULT_DESTRUCTOR(WebCanvasRef) + + public: + int GetWidth() const; + int GetHeight() const; + + private: + emscripten::val val_; + }; +} |