MCPcopy Create free account

hub / github.com/afocus/captcha / functions

Functions33 in github.com/afocus/captcha

↓ 4 callersFunctionNewImage
NewImage 创建一个新的图片
draw.go:19
↓ 4 callersFunctionoffRGBA
(src *image.RGBA, x, y int)
bilinear.go:135
↓ 2 callersMethodSetFont
SetFont 设置字体 可以设置多个
captcha.go:83
↓ 2 callersMethoddrawBkg
绘制背景
captcha.go:131
↓ 2 callersMethoddrawCircle8
(xc, yc, x, y int, c color.Color)
draw.go:64
↓ 2 callersMethoddrawNoises
绘制噪点
captcha.go:140
↓ 2 callersMethoddrawString
绘制文字
captcha.go:170
↓ 2 callersFunctionsign
(x int)
draw.go:24
↓ 1 callersMethodAddFont
AddFont 添加一个字体
captcha.go:53
↓ 1 callersMethodCreate
Create 生成一个验证码图片
captcha.go:218
↓ 1 callersMethodCreateCustom
(str string)
captcha.go:234
↓ 1 callersMethodDrawCircle
DrawCircle 画圆 xc,yc 圆心坐标 r 半径 fill是否填充颜色
draw.go:77
↓ 1 callersMethodDrawLine
DrawLine 画直线 Bresenham算法(https://zh.wikipedia.org/zh-cn/布雷森漢姆直線演算法) x1,y1 起点 x2,y2终点
draw.go:34
↓ 1 callersMethodDrawString
DrawString 写字
draw.go:103
↓ 1 callersMethodFillBkg
填充背景
draw.go:122
↓ 1 callersMethodRGBA
(src *image.RGBA, x, y float64)
bilinear.go:17
↓ 1 callersMethodRotate
Rotate 旋转
draw.go:117
↓ 1 callersMethodSetBkgColor
(colors ...color.Color)
captcha.go:107
↓ 1 callersMethodSetDisturbance
(d DisturLevel)
captcha.go:92
↓ 1 callersMethodSetFrontColor
(colors ...color.Color)
captcha.go:98
↓ 1 callersMethodSetSize
(w, h int)
captcha.go:116
↓ 1 callersMethoddistortTo
水波纹, amplude=振幅, period=周期 copy from https://github.com/dchest/captcha/blob/master/image.go
draw.go:128
↓ 1 callersFunctionfindLinearSrc
(b image.Rectangle, sx, sy float64)
bilinear.go:64
↓ 1 callersFunctioninBounds
(b image.Rectangle, x, y float64)
draw.go:147
↓ 1 callersMethodpt
(x, y int)
draw.go:199
↓ 1 callersFunctionradian
(angle float64)
draw.go:167
↓ 1 callersMethodrandFont
()
captcha.go:126
↓ 1 callersMethodrandStr
生成随机字符串 size 个数 kind 模式
captcha.go:250
↓ 1 callersMethodtransformRGBA
()
draw.go:204
MethodAddFontFromBytes
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
FunctionNew
()
captcha.go:42
MethodRotate
(angle float64, src *image.RGBA)
draw.go:171
Functionmain
()
examples/main.go:13