aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/graph/painter.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-05-24 23:45:58 +0800
committercrupest <crupest@outlook.com>2019-05-24 23:45:58 +0800
commitb6db663269201fa14a6a4aa1b9042645a9e8f859 (patch)
tree1984e2c2784fb9623d4c20fbdd6fc650792e133c /include/cru/platform/graph/painter.hpp
parentb9df1bcaea0c19b2e29479cdb1ad5a39e23c4ee7 (diff)
downloadcru-b6db663269201fa14a6a4aa1b9042645a9e8f859.tar.gz
cru-b6db663269201fa14a6a4aa1b9042645a9e8f859.tar.bz2
cru-b6db663269201fa14a6a4aa1b9042645a9e8f859.zip
...
Diffstat (limited to 'include/cru/platform/graph/painter.hpp')
-rw-r--r--include/cru/platform/graph/painter.hpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/include/cru/platform/graph/painter.hpp b/include/cru/platform/graph/painter.hpp
index 199ebbad..34c895d4 100644
--- a/include/cru/platform/graph/painter.hpp
+++ b/include/cru/platform/graph/painter.hpp
@@ -1,26 +1,26 @@
#pragma once
#include "cru/common/base.hpp"
-#include "cru/common/ui_base.hpp"
#include "../matrix.hpp"
+#include "cru/common/endable.hpp"
+#include "cru/common/ui_base.hpp"
namespace cru::platform::graph {
-struct Brush;
-struct Geometry;
-struct TextLayout;
+struct IBrush;
+struct IGeometry;
+struct ITextLayout;
-struct Painter : virtual Interface {
+struct IPainter : virtual Interface, virtual IEndable<void> {
virtual Matrix GetTransform() = 0;
virtual void SetTransform(const Matrix& matrix) = 0;
virtual void Clear(const ui::Color& color) = 0;
- virtual void StrokeRectangle(const ui::Rect& rectangle, Brush* brush,
+ virtual void StrokeRectangle(const ui::Rect& rectangle, IBrush* brush,
float width) = 0;
- virtual void FillRectangle(const ui::Rect& rectangle, Brush* brush) = 0;
- virtual void StrokeGeometry(Geometry* geometry, Brush* brush,
+ virtual void FillRectangle(const ui::Rect& rectangle, IBrush* brush) = 0;
+ virtual void StrokeGeometry(IGeometry* geometry, IBrush* brush,
float width) = 0;
- virtual void FillGeometry(Geometry* geometry, Brush* brush) = 0;
- virtual void DrawText(const ui::Point& offset, TextLayout* text_layout, Brush* brush) = 0;
- virtual void EndDraw() = 0;
- virtual bool IsDisposed() = 0;
+ virtual void FillGeometry(IGeometry* geometry, IBrush* brush) = 0;
+ virtual void DrawText(const ui::Point& offset, ITextLayout* text_layout,
+ IBrush* brush) = 0;
};
-} // namespace cru::platform
+} // namespace cru::platform::graph