Documentation ¶
Index ¶
- type Img
- func (m *Img) GenerateDriverMath() (content, answer string)
- func (m *Img) GenerateDriverMathString() (content, answer string, err error)
- func (m *Img) GenerateDriverPuzzle() (bgImage string, puzzleImage string, targetX int, err error)
- func (m *Img) GenerateDriverString() (content, answer string, err error)
- type ImgOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Img ¶
type Img struct { Height int //图片高度 Width int //图片宽度 NoiseCount int //干扰线 Count int //验证码数量 Source string //数据源 SourceLength int //数据源长度 FontColor color.Color SizePoint float64 //字体大小 BgColor color.NRGBA //背景颜色 FontStyle font.Face //字体 UploadImg image.Image MathNum int //算术验证码数量 PuzzleX int // 滑动拼图的X位置 PuzzleY int // 滑动拼图的Y位置 PuzzleWidth int // 拼图块的宽度 PuzzleHeight int // 拼图块的高度 }
func DefaultImg ¶
func DefaultImg() Img
func LoadLocalImg ¶
func NewDriverString ¶
func (*Img) GenerateDriverMath ¶
func (*Img) GenerateDriverMathString ¶
func (*Img) GenerateDriverPuzzle ¶
func (*Img) GenerateDriverString ¶
type ImgOptions ¶
type ImgOptions struct { Height int //图片高度 Width int //图片宽度 NoiseCount int //干扰线 Count int //验证码数量 Source string //数据源 SourceLength int //数据源长度 SizePoint float64 //字体大小 Bgcolor color.NRGBA //背景颜色 FontStyle font.Face //字体 UploadImg image.Image MathNum int //算术验证码数量 PuzzleX int // 滑动拼图的X位置 PuzzleY int // 滑动拼图的Y位置 PuzzleWidth int // 拼图块的宽度 PuzzleHeight int // 拼图块的高度 }
Click to show internal directories.
Click to hide internal directories.