From e69911a8b161b81ce3f7b209175766da2b7b3d4b Mon Sep 17 00:00:00 2001 From: crupest Date: Thu, 12 Dec 2019 19:53:17 +0800 Subject: ... --- include/cru/platform/matrix.hpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'include/cru/platform/matrix.hpp') diff --git a/include/cru/platform/matrix.hpp b/include/cru/platform/matrix.hpp index cbb55c78..030e1378 100644 --- a/include/cru/platform/matrix.hpp +++ b/include/cru/platform/matrix.hpp @@ -1,5 +1,5 @@ #pragma once -#include "graphic_base.hpp" +#include "graph_base.hpp" #include @@ -39,7 +39,7 @@ struct Matrix { Point TransformPoint(const Point& point) const { return Point{point.x * m11 + point.y * m21 + m31, - point.x * m12 + point.y * m22 + m32}; + point.x * m12 + point.y * m22 + m32}; } static Matrix Identity() { @@ -50,10 +50,8 @@ struct Matrix { return Matrix{1.0f, 0.0f, 0.0f, 1.0f, x, y}; } - static Matrix Scale(float sx, float sy) { return Scale(sx, sy, 0.0f, 0.0f); } - - static Matrix Scale(float sx, float sy, float cx, float cy) { - return Matrix{sx, 0.0f, 0.0f, sy, cx - sx * cx, cy - sy * cy}; + static Matrix Scale(float sx, float sy) { + return Matrix{sx, 0.0f, 0.0f, sy, 0.0f, 0.0f}; } static Matrix Rotation(float angle) { -- cgit v1.2.3