aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/painter_util.hpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2019-04-10 19:42:46 +0800
committercrupest <crupest@outlook.com>2019-04-10 19:42:46 +0800
commit7351020a582d70a1495249fba87d342c8a1fb634 (patch)
treee80f225041dc3816b3dce21c7e15aadbb211602e /include/cru/platform/painter_util.hpp
parenta94a806f69586e08a30fff0cdb3e52b0ce7acfa5 (diff)
downloadcru-7351020a582d70a1495249fba87d342c8a1fb634.tar.gz
cru-7351020a582d70a1495249fba87d342c8a1fb634.tar.bz2
cru-7351020a582d70a1495249fba87d342c8a1fb634.zip
Refactor.
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