diff options
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 |