From a04627baa74b2b6660addeb9853225852634cf34 Mon Sep 17 00:00:00 2001 From: Yuqian Yang Date: Mon, 3 Nov 2025 20:18:23 +0800 Subject: Move WithTransform. --- include/cru/platform/graphics/util/Painter.h | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 include/cru/platform/graphics/util/Painter.h (limited to 'include/cru/platform/graphics/util') diff --git a/include/cru/platform/graphics/util/Painter.h b/include/cru/platform/graphics/util/Painter.h deleted file mode 100644 index e36d5c55..00000000 --- a/include/cru/platform/graphics/util/Painter.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once -#include "../Painter.h" - -#include -#include - -namespace cru::platform::graphics::util { -template -void WithTransform(IPainter* 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->PushState(); - painter->ConcatTransform(matrix); - action(painter); - painter->PopState(); -} -} // namespace cru::platform::graphics::util -- cgit v1.2.3