From 7351020a582d70a1495249fba87d342c8a1fb634 Mon Sep 17 00:00:00 2001 From: crupest Date: Wed, 10 Apr 2019 19:42:46 +0800 Subject: Refactor. --- include/cru/platform/painter_util.hpp | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 include/cru/platform/painter_util.hpp (limited to 'include/cru/platform/painter_util.hpp') 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 -#include - -namespace cru::platform::util { -template -inline void WithTransform(Painter* painter, const Matrix& matrix, - const Fn& action) { - static_assert(std::is_invocable_v, - "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 -- cgit v1.2.3