Versions in this module Expand all Collapse all v0 v0.0.3 Jul 13, 2022 Changes in this version + func GenerateRandCode(size int, charType CharType) []byte v0.0.2 Jul 13, 2022 Changes in this version + type Bilinear struct + func (Bilinear) RGBA(src *image.RGBA, x, y float64) color.RGBA + type BilinearSrc struct + type Captcha struct + func New() *Captcha + func (c *Captcha) AddFont(path string) error + func (c *Captcha) AddFontFromBytes(contents []byte) error + func (c *Captcha) Create(num int, t CharType) (*Image, string) + func (c *Captcha) CreateCustom(str string) *Image + func (c *Captcha) GenerateRandCode(size int, charType CharType) []byte + func (c *Captcha) SetBkgColor(colors ...color.Color) + func (c *Captcha) SetDisturbance(d DisturLevel) + func (c *Captcha) SetFont(paths ...string) error + func (c *Captcha) SetFrontColor(colors ...color.Color) + func (c *Captcha) SetSize(w, h int) + type CharType int + const ALL + const CLEAR + const LOWER + const NUM + const UPPER + type DisturLevel int + const HIGH + const MEDIUM + const NORMAL + type Image struct + func NewImage(w, h int) *Image + func (img *Image) DrawCircle(xc, yc, r int, fill bool, c color.Color) + func (img *Image) DrawLine(x1, y1, x2, y2 int, c color.Color) + func (img *Image) DrawString(font *truetype.Font, c color.Color, str string, fontsize float64) + func (img *Image) FillBkg(c image.Image) + func (img *Image) Rotate(angle float64) image.Image