aboutsummaryrefslogtreecommitdiff
path: root/include/cru/platform/graphics/util
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2021-03-13 17:40:18 +0800
committercrupest <crupest@outlook.com>2021-03-13 17:40:18 +0800
commit7703063a5816b089483e78ccd74bb9902ccfbea8 (patch)
treeb4b0fd45eb6a89831921d6b78c322e6aa882c239 /include/cru/platform/graphics/util
parent49dfb2bc9f965b398aa12e711148696d28443eaf (diff)
downloadcru-7703063a5816b089483e78ccd74bb9902ccfbea8.tar.gz
cru-7703063a5816b089483e78ccd74bb9902ccfbea8.tar.bz2
cru-7703063a5816b089483e78ccd74bb9902ccfbea8.zip
...
Diffstat (limited to 'include/cru/platform/graphics/util')
-rw-r--r--include/cru/platform/graphics/util/Painter.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/cru/platform/graphics/util/Painter.hpp b/include/cru/platform/graphics/util/Painter.hpp
index af3a1997..90457cf4 100644
--- a/include/cru/platform/graphics/util/Painter.hpp
+++ b/include/cru/platform/graphics/util/Painter.hpp
@@ -10,7 +10,7 @@ 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);
+ painter->SetTransform(matrix * old);
action(painter);
painter->SetTransform(old);
}