Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Driver ¶
type Driver struct {
//Height png height in pixel.
Height int
//Width Captcha png width in pixel.
Width int
//NoiseCount text noise count.
NoiseCount int
//ShowLineOptions := OptionShowHollowLine | OptionShowSlimeLine | OptionShowSineLine .
ShowLineOptions int
//Length random string length.
Length int
//Source is a unicode which is the rand string from.
Source string
//BgColor captcha image background color (optional)
BgColor *color.RGBA
//Fonts list of font names to use
Fonts []string
// contains filtered or unexported fields
}
Driver is a driver of unicode Chinese characters.
func NewDriver ¶
func NewDriver(height int, width int, noiseCount int, showLineOptions int, length int, source string, bgColor *color.RGBA, fonts []string) *Driver
NewDriver creates a driver of Chinese characters
func (*Driver) DrawCaptcha ¶
func (d *Driver) DrawCaptcha(content string) (item base64Captcha.Item, err error)
DrawCaptcha generates captcha item(image)
func (*Driver) GenerateIdQuestionAnswer ¶
GenerateIdQuestionAnswer generates captcha content and its answer
Click to show internal directories.
Click to hide internal directories.