feat(后端架构): 完善GG后端,修复渐变与选区异常
build.yaml / build (push) Successful in 37s

This commit is contained in:
xiaoqidun committed 2026-09-23 18:43:53 +08:00
1 parent c15547f0d2
commit f44d0d8a60
30 files changed
+2075 -463

No files matched your search

-12
View File
@@ -287,15 +287,3 @@ func reflectShdGrad(gradient canvas.Grad, period, lo, hi float64) canvas.Grad {
}
return append(result, canvas.Stop{Offset: 1, Color: gradient.At(reflectShdPosition(hi / period))})
}
// reflectShdPosition 获取镜像周期内的位置
// 入参: position 渐变位置
// 返回: float64 周期内的位置
func reflectShdPosition(position float64) float64 {
index := math.Floor(position)
position -= index
if math.Mod(index, 2) != 0 {
return 1 - position
}
return position
}