feat(强化兼容): 改进字体渲染

This commit is contained in:
2026-01-07 15:29:08 +08:00
parent 191ff30b97
commit 308076a9f6
11 changed files with 2065 additions and 344 deletions
+14
View File
@@ -63,6 +63,20 @@ func NewMatrix(s string) Matrix {
}
}
// Multiply 矩阵乘法 (m * o)
// 入参: o 右侧矩阵
// 返回: Matrix 结果矩阵
func (m Matrix) Multiply(o Matrix) Matrix {
return Matrix{
a: m.a*o.a + m.c*o.b,
b: m.b*o.a + m.d*o.b,
c: m.a*o.c + m.c*o.d,
d: m.b*o.c + m.d*o.d,
e: m.a*o.e + m.c*o.f + m.e,
f: m.b*o.e + m.d*o.f + m.f,
}
}
// Transform 应用变换矩阵
// 入参: x X坐标, y Y坐标
// 返回: float64 变换后X, float64 变换后Y