Skip to content

Commit

Permalink
修改资源目录
Browse files Browse the repository at this point in the history
  • Loading branch information
lvpengc committed Oct 21, 2020
1 parent 6f4df07 commit 384358f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion foundation/avatar.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ var colors = []uint32{
}
//生成头像的方式
func GenerateAvatar(width int,height int,content string)( []byte,error) {
ab := calc.NewAvatarBuilder("../static/SourceHanSansSC-Medium.ttf", &calc.SourceHansSansSCMedium{})
ab := calc.NewAvatarBuilder("SourceHanSansSC-Medium.ttf", &calc.SourceHansSansSCMedium{})
ab.SetBackgroundColorHex(colors[3])
ab.SetFrontgroundColor(color.White)
ab.SetFontSize(80)
Expand Down
5 changes: 4 additions & 1 deletion foundation/avatar_test.go
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
package foundation

import (
"fmt"
"testing"
)

func Test_ge(t *testing.T) {

GenerateAvatar()
d,err:=GenerateAvatar(122,122,"121")
fmt.Println(d)
fmt.Println(err)

}

0 comments on commit 384358f

Please sign in to comment.