aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/painter_util.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/platform/painter_util.hpp')
-rw-r--r--include/cru/platform/painter_util.hpp18
1 files changed, 0 insertions, 18 deletions
diff --git a/include/cru/platform/painter_util.hpp b/include/cru/platform/painter_util.hpp
deleted file mode 100644
index 5711d099..00000000
--- a/include/cru/platform/painter_util.hpp
+++ /dev/null
@@ -1,18 +0,0 @@
-#pragma once
-#include "painter.hpp"
-
-#include <functional>
-#include <type_traits>
-
-namespace cru::platform::util {
-template <typename Fn>
-inline void WithTransform(Painter* painter, const Matrix& matrix,
- const Fn& action) {
- 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);
- action(painter);
- painter->SetTransform(old);
-}
-} // namespace cru::platform::util