Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/afocus/captcha
/ functions
Functions
33 in github.com/afocus/captcha
⨍
Functions
33
◇
Types & classes
7
↓ 4 callers
Function
NewImage
NewImage 创建一个新的图片
draw.go:19
↓ 4 callers
Function
offRGBA
(src *image.RGBA, x, y int)
bilinear.go:135
↓ 2 callers
Method
SetFont
SetFont 设置字体 可以设置多个
captcha.go:83
↓ 2 callers
Method
drawBkg
绘制背景
captcha.go:131
↓ 2 callers
Method
drawCircle8
(xc, yc, x, y int, c color.Color)
draw.go:64
↓ 2 callers
Method
drawNoises
绘制噪点
captcha.go:140
↓ 2 callers
Method
drawString
绘制文字
captcha.go:170
↓ 2 callers
Function
sign
(x int)
draw.go:24
↓ 1 callers
Method
AddFont
AddFont 添加一个字体
captcha.go:53
↓ 1 callers
Method
Create
Create 生成一个验证码图片
captcha.go:218
↓ 1 callers
Method
CreateCustom
(str string)
captcha.go:234
↓ 1 callers
Method
DrawCircle
DrawCircle 画圆 xc,yc 圆心坐标 r 半径 fill是否填充颜色
draw.go:77
↓ 1 callers
Method
DrawLine
DrawLine 画直线 Bresenham算法(https://zh.wikipedia.org/zh-cn/布雷森漢姆直線演算法) x1,y1 起点 x2,y2终点
draw.go:34
↓ 1 callers
Method
DrawString
DrawString 写字
draw.go:103
↓ 1 callers
Method
FillBkg
填充背景
draw.go:122
↓ 1 callers
Method
RGBA
(src *image.RGBA, x, y float64)
bilinear.go:17
↓ 1 callers
Method
Rotate
Rotate 旋转
draw.go:117
↓ 1 callers
Method
SetBkgColor
(colors ...color.Color)
captcha.go:107
↓ 1 callers
Method
SetDisturbance
(d DisturLevel)
captcha.go:92
↓ 1 callers
Method
SetFrontColor
(colors ...color.Color)
captcha.go:98
↓ 1 callers
Method
SetSize
(w, h int)
captcha.go:116
↓ 1 callers
Method
distortTo
水波纹, amplude=振幅, period=周期 copy from https://github.com/dchest/captcha/blob/master/image.go
draw.go:128
↓ 1 callers
Function
findLinearSrc
(b image.Rectangle, sx, sy float64)
bilinear.go:64
↓ 1 callers
Function
inBounds
(b image.Rectangle, x, y float64)
draw.go:147
↓ 1 callers
Method
pt
(x, y int)
draw.go:199
↓ 1 callers
Function
radian
(angle float64)
draw.go:167
↓ 1 callers
Method
randFont
()
captcha.go:126
↓ 1 callers
Method
randStr
生成随机字符串 size 个数 kind 模式
captcha.go:250
↓ 1 callers
Method
transformRGBA
()
draw.go:204
Method
AddFontFromBytes
AddFontFromBytes allows to load font from slice of bytes, for example, load the font packed by https://github.com/jteeuwen/go-bindata
captcha.go:70
Function
New
()
captcha.go:42
Method
Rotate
(angle float64, src *image.RGBA)
draw.go:171
Function
main
()
examples/main.go:13