2 Star 0 Fork 0

hero/momo

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
types.go 766 Bytes
一键复制 编辑 原始数据 按行查看 历史
hero 提交于 2024-08-01 15:51 . upd:captcha移动到rbac模块下
/**
* @Author Awen
* @Date 2024/06/01
* @Email wengaolng@gmail.com
**/
package canvas
import (
"image/color"
"github.com/golang/freetype/truetype"
)
// AreaRect .
type AreaRect struct {
MinX, MaxX, MinY, MaxY int
}
// MakeAreaRect .
func MakeAreaRect(x0, y0, x1, y1 int) *AreaRect {
return &AreaRect{
MinX: x0,
MaxX: x1,
MinY: y0,
MaxY: y1,
}
}
// PositionRect .
type PositionRect struct {
X, Y, Width, Height int
}
// MakePositionRect .
func MakePositionRect(x, y, h, w int) *PositionRect {
return &PositionRect{
X: x,
Y: y,
Height: h,
Width: w,
}
}
// DrawStringParams .
type DrawStringParams struct {
Color color.Color
Size int
Width int
Height int
FontDPI int
Text string
Font *truetype.Font
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/linqwen/momo.git
git@gitee.com:linqwen/momo.git
linqwen
momo
momo
v1.7.4

搜索帮助