aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/graph
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/platform/graph')
-rw-r--r--include/cru/platform/graph/graph_factory.hpp3
-rw-r--r--include/cru/platform/graph/util/painter_util.hpp4
2 files changed, 5 insertions, 2 deletions
diff --git a/include/cru/platform/graph/graph_factory.hpp b/include/cru/platform/graph/graph_factory.hpp
index 69afc7b3..0b1034cc 100644
--- a/include/cru/platform/graph/graph_factory.hpp
+++ b/include/cru/platform/graph/graph_factory.hpp
@@ -55,5 +55,8 @@ class GraphFactory : public NativeResource {
virtual TextLayout* CreateTextLayout(std::shared_ptr<Font> font,
std::wstring text) = 0;
+
+ virtual bool IsAutoDelete() const = 0;
+ virtual void SetAutoDelete(bool value) = 0;
};
} // namespace cru::platform::graph
diff --git a/include/cru/platform/graph/util/painter_util.hpp b/include/cru/platform/graph/util/painter_util.hpp
index 71e125c3..7a655a34 100644
--- a/include/cru/platform/graph/util/painter_util.hpp
+++ b/include/cru/platform/graph/util/painter_util.hpp
@@ -6,9 +6,9 @@
namespace cru::platform::graph::util {
template <typename Fn>
-inline void WithTransform(IPainter* painter, const Matrix& matrix,
+inline void WithTransform(Painter* painter, const Matrix& matrix,
const Fn& action) {
- static_assert(std::is_invocable_v<decltype(action), IPainter*>,
+ static_assert(std::is_invocable_v<decltype(action), Painter*>,
"Action must can be be invoked with painter.");
const auto old = painter->GetTransform();
painter->SetTransform(old * matrix);