Versions in this module Expand all Collapse all v1 v1.0.0 Feb 5, 2021 Changes in this version + func ColorToRGB(colorVal int) color.RGBA + func RandFontFamily() (*truetype.Font, error) + func RandLightColor() color.RGBA + func RandText(num int) string + func Random(min int64, max int64) float64 + func ReadFonts(dirPth string, suffix string) (err error) + func SetFontFamily(fontPath ...string) + type CaptchaComplex int + const CaptchaComplexHigh + const CaptchaComplexLower + const CaptchaComplexMedium + type CaptchaImage struct + Complex int + Error error + func NewCaptchaImage(width int, height int, bgColor color.RGBA) *CaptchaImage + func (captcha *CaptchaImage) DrawBorder(borderColor color.RGBA) *CaptchaImage + func (captcha *CaptchaImage) DrawHollowLine() *CaptchaImage + func (captcha *CaptchaImage) DrawLine(num int) *CaptchaImage + func (captcha *CaptchaImage) DrawNoise(complex CaptchaComplex) *CaptchaImage + func (captcha *CaptchaImage) DrawSineLine() *CaptchaImage + func (captcha *CaptchaImage) DrawText(text string) *CaptchaImage + func (captcha *CaptchaImage) DrawTextNoise(complex CaptchaComplex) *CaptchaImage + func (captcha *CaptchaImage) Img() (io io.Reader) + func (captcha *CaptchaImage) SaveImage(w io.Writer, imageFormat ImageFormat) error + type ImageFormat int + const ImageFormatGif + const ImageFormatJpeg + const ImageFormatPng + type Point struct + X int + Y int + func NewPoint(x int, y int) *Point