aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/graph/util
diff options
context:
space:
mode:
Diffstat (limited to 'include/cru/platform/graph/util')
-rw-r--r--include/cru/platform/graph/util/painter.hpp (renamed from include/cru/platform/graph/util/painter_util.hpp)7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/cru/platform/graph/util/painter_util.hpp b/include/cru/platform/graph/util/painter.hpp
index 7a655a34..72d96bc1 100644
--- a/include/cru/platform/graph/util/painter_util.hpp
+++ b/include/cru/platform/graph/util/painter.hpp
@@ -6,13 +6,12 @@
namespace cru::platform::graph::util {
template <typename Fn>
-inline void WithTransform(Painter* painter, const Matrix& matrix,
- const Fn& action) {
- static_assert(std::is_invocable_v<decltype(action), Painter*>,
+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->SetTransform(old * matrix);
action(painter);
painter->SetTransform(old);
}
-} // namespace cru::platform::util
+} // namespace cru::platform::graph::util