diff options
author | crupest <crupest@outlook.com> | 2023-10-12 17:10:18 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2023-10-12 17:10:18 +0800 |
commit | 9a077caa6d3f7eb8255ae68916dccac9b50a4333 (patch) | |
tree | 486f5f01d5de8ff1b236029e1b955df1d70728a8 /include/cru/platform/graphics/web_canvas/WebCanvasGeometry.h | |
parent | 6fc14693d01f2be98b45d70405b16883607d4666 (diff) | |
download | cru-9a077caa6d3f7eb8255ae68916dccac9b50a4333.tar.gz cru-9a077caa6d3f7eb8255ae68916dccac9b50a4333.tar.bz2 cru-9a077caa6d3f7eb8255ae68916dccac9b50a4333.zip |
...
Diffstat (limited to 'include/cru/platform/graphics/web_canvas/WebCanvasGeometry.h')
-rw-r--r-- | include/cru/platform/graphics/web_canvas/WebCanvasGeometry.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/include/cru/platform/graphics/web_canvas/WebCanvasGeometry.h b/include/cru/platform/graphics/web_canvas/WebCanvasGeometry.h new file mode 100644 index 00000000..af4cee91 --- /dev/null +++ b/include/cru/platform/graphics/web_canvas/WebCanvasGeometry.h @@ -0,0 +1,27 @@ +#pragma once + +#include "../Geometry.h" +#include "WebCanvasResource.h" + +#include <emscripten/val.h> + +namespace cru::platform::graphics::web_canvas { +/** + * \remarks See IGeometryBuilder for platform limitation. + */ +class WebCanvasGeometryBuilder : public WebCanvasResource, + public virtual IGeometryBuilder { + public: + WebCanvasGeometryBuilder(WebCanvasGraphicsFactory* factory); + + ~WebCanvasGeometryBuilder() override; + + Point GetCurrentPosition() override; + + void MoveTo(const Point& point) override; + + private: + Point current_postion_; + emscripten::val path2d_; +}; +} // namespace cru::platform::graphics::web_canvas |