diff options
author | crupest <crupest@outlook.com> | 2020-10-30 00:07:57 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2020-10-30 00:07:57 +0800 |
commit | 6aa2201797a9ed64ce0178215ae941d0c5f09579 (patch) | |
tree | 9a74ee8d9f616afbe693ef7825a71474850831b5 /include/cru/platform/graphics/Geometry.hpp | |
parent | b4cb4fb7552d35c267bdb66913e4c822f16346ab (diff) | |
download | cru-6aa2201797a9ed64ce0178215ae941d0c5f09579.tar.gz cru-6aa2201797a9ed64ce0178215ae941d0c5f09579.tar.bz2 cru-6aa2201797a9ed64ce0178215ae941d0c5f09579.zip |
...
Diffstat (limited to 'include/cru/platform/graphics/Geometry.hpp')
-rw-r--r-- | include/cru/platform/graphics/Geometry.hpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/include/cru/platform/graphics/Geometry.hpp b/include/cru/platform/graphics/Geometry.hpp new file mode 100644 index 00000000..b0ce6ad9 --- /dev/null +++ b/include/cru/platform/graphics/Geometry.hpp @@ -0,0 +1,20 @@ +#pragma once +#include "Resource.hpp" + +namespace cru::platform::graphics { +struct IGeometry : virtual IGraphResource { + virtual bool FillContains(const Point& point) = 0; +}; + +// After called Build, calling every method will throw a + +struct IGeometryBuilder : virtual IGraphResource { + virtual void BeginFigure(const Point& point) = 0; + virtual void LineTo(const Point& point) = 0; + virtual void QuadraticBezierTo(const Point& control_point, + const Point& end_point) = 0; + virtual void CloseFigure(bool close) = 0; + + virtual std::unique_ptr<IGeometry> Build() = 0; +}; +} // namespace cru::platform::graph |