diff options
Diffstat (limited to 'include/cru/platform/graphics/util/Painter.hpp')
| -rw-r--r-- | include/cru/platform/graphics/util/Painter.hpp | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/include/cru/platform/graphics/util/Painter.hpp b/include/cru/platform/graphics/util/Painter.hpp deleted file mode 100644 index 2e0fbb51..00000000 --- a/include/cru/platform/graphics/util/Painter.hpp +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once -#include "../Painter.hpp" - -#include <functional> -#include <type_traits> - -namespace cru::platform::graphics::util { -template <typename Fn> -void WithTransform(IPainter* painter, const Matrix& matrix, const Fn& action) { - static_assert(std::is_invocable_v<decltype(action), IPainter*>, - "Action must can be be invoked with painter."); - const auto old = painter->GetTransform(); - painter->PushState(); - painter->ConcatTransform(matrix); - action(painter); - painter->PopState(); -} -} // namespace cru::platform::graphics::util |
