chore: 更新 go.mod 和 go.sum 文件,添加新的依赖项并移除旧版本的 imagedd 依赖

This commit is contained in:
lixiangwuxian
2025-05-10 14:46:56 +08:00
parent 015cd887bb
commit 5bf7d65ce8
3 changed files with 10 additions and 7 deletions

View File

@@ -6,7 +6,6 @@ import (
"image/color"
"image/draw"
"log"
"math"
"os"
"strings"
"time"
@@ -619,15 +618,17 @@ func (p PlayerDataLite) LastDiffToImage(lastDayQueryData PlayerDataLite) string
}
baseboard.AddSprite(&textSpirit)
totalWidth := textImg.Bounds().Dx() + avatar.Bounds().Dx()
totalHeight := math.Max(float64(textImg.Bounds().Dy()), float64(avatar.Bounds().Dy()))
minX, minY, maxX, maxY := baseboard.GetRenderBounds()
totalWidth := maxX - minX
totalHeight := maxY - minY
background := image.NewRGBA(image.Rect(0, 0, int(totalWidth), int(totalHeight)))
draw.Draw(background, background.Bounds(), image.White, image.Point{}, draw.Src)
backgroundSpirit := sprite.Sprite{
Name: "background",
Image: background,
Index: 0,
Name: "background",
Image: background,
Index: 0,
Position: image.Point{X: minX, Y: minY},
}
baseboard.AddSprite(&backgroundSpirit)