You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: draw.go
    path of file: ./repos/ZeroBot-Plugin/plugin/score
    
    the code of the file until where you have to start completion: // Package score 签到
package score

import (
	"bytes"
	"errors"
	"fmt"
	"image"
	"image/color"
	"strconv"
	"sync"
	"time"

	"github.com/FloatTech/floatbox/file"
	"github.com/FloatTech/gg"
	"github.com/FloatTech/imgfactory"
	"github.com/FloatTech/rendercard"
	"github.com/FloatTech/zbputils/control"
	"github.com/FloatTech/zbputils/img/text"
	"github.com/disintegration/imaging"

	"github.com/FloatTech/ZeroBot-Plugin/kanban/banner"
)

type scoredrawer func(a *scdata) (image.Image, error)

func drawScore16(a *scdata) (image.Image, error) {
	// 绘图
	getAvatar, err := initPic(a.picfile, a.uid)
	if err != nil {
		return nil, err
	}
	back, err := gg.LoadImage(a.picfile)
	if err != nil {
		return nil, err
	}
	// 避免图片过大，最大 1280*720
	back = imgfactory.Limit(back, 1280, 720)
	imgDX := back.Bounds().Dx()
	imgDY := back.Bounds().Dy()
	canvas := gg.NewContext(imgDX, imgDY)
	// draw Aero Style
	aeroStyle := gg.NewContext(imgDX-202, imgDY-202)
	aeroStyle.DrawImage(imaging.Blur(back, 2.5), -100, -100)
	// aero draw image.
	aeroStyle.DrawRoundedRectangle(0, 0, float64(imgDX-200), float64(imgDY-200), 16)
	// SideLine
	aeroStyle.SetLineWidth(3)
	aeroStyle.SetRGBA255(255, 255, 255, 100)
	aeroStyle.StrokePreserve()
	aeroStyle.SetRGBA255(255, 255, 255, 140)
	// fill
	aeroStyle.Fill()
	// draw background
	canvas.DrawImage(back, 0, 0)
	// 
    
func customtext(a *scdata, fontdata []byte, cw, ch, aw float64, textcolor color.Color) (img image.Image, err error) {
	canvas := gg.NewContext(int(cw), int(ch))
	canvas.SetColor(textcolor)
	scw, sch := cw*6/10, ch*6/10
	err = canvas.ParseFontFace(fontdata, (ch-sch)/2/2/2)
	if err != nil {
		return
	}
	canvas.DrawStringAnchored(a.nickname, (ch-sch)/2/2+aw/2+aw/40*2, (ch-sch)/2/2, 0, 0.5)
	err = canvas.ParseFontFace(fontdata, (ch-sch)/2/2/3*2)
	if err != nil {
		return
	}
	canvas.DrawStringAnchored(time.Now().Format("2006/01/02"), cw-cw/6, ch/2-sch/2-canvas.FontHeight(), 0.5, 0.5)

	err = canvas.ParseFontFace(fontdata, (ch-sch)/2/2/2)
	if err != nil {
		return
	}
	nextrankScore := 0
	if a.rank < 10 {
		nextrankScore = rankArray[a.rank+1]
	} else {
		nextrankScore = SCOREMAX
	}
	nextLevelStyle := strconv.Itoa(a.level) + "/" + strconv.Itoa(nextrankScore)

	canvas.DrawStringAnchored("Level "+strconv.Itoa(a.rank), cw/3*2-scw/2, ch/2+sch/2+canvas.FontHeight(), 0, 0.5)
	canvas.DrawStringAnchored(nextLevelStyle, cw/3*2+scw/2, ch/2+sch/2+canvas.FontHeight(), 1, 0.5)

	err = canvas.ParseFontFace(fontdata, (ch-sch)/2/2/3)
	if err != nil {
		return
	}

	canvas.DrawStringAnchored("Create By ZeroBot-Plugin "+banner.Version, 0+4, ch, 0, -0.5)

	err = canvas.ParseFontFace(fontdata, (ch-sch)/2/5*3)
	if err != nil {
		return
	}

	tempfh := canvas.FontHeight()

	canvas.DrawStringAnchored(getHourWord(time.Now()), ((cw-scw)-(cw/3-scw/2))/8, (ch-sch)/2+sch/4, 0, 0.5)

	err = canvas.ParseFontFace(fontdata, (ch-sch)/2/5)
	if err != nil {
		return
	}

	canvas.DrawStringAnchored("ATRI币 + "+strconv.Itoa(a.inc), ((cw-scw)-(cw/3-scw/2))/8, (ch-sch)/2+sch/4+tempfh, 0, 0.5)
	canvas.DrawStringAnchored("EXP + 1", ((cw-scw)-(cw/3-scw/2))/8, (ch-sch)/2+sch/4+tempfh+canvas.FontHeight(), 0, 1)

	err = canvas.ParseFontFace(fontdata, (ch-sch)/2/4)
	if err != nil {
		return
	}

	canvas.DrawStringAnchored("你有 "+strconv.Itoa(a.score)+" 枚ATRI币", ((cw-scw)-(cw/3-scw/2))/8, (ch-sch)/2+sch/4*3, 0, 0.5)

	img = canvas.Image()
	return
}