/** * @ 生成验证图片 * @ codeLength 验证码长度4-16 * @ fineNess 图片清晰度0-100 * @ imgWidth 图片宽度16-360 * @ imgHeight 图片高度16-320 * @ fontFamily 字体家族名称"宋体" * @ fontSize 字体大小8-72 * @ fontStyle 字体样式 * @ pointX 绘制起始 X 坐标点 * @ pointY 绘制起始 Y 坐标点 * @ sessionKey 保存验证码值到 Session 的 key * @ codeStyle 验证码类型 * */ public byte[] WriterCode(int codeLength, int fineNess, int imgWidth, int imgHeight, string fontFamily, int fontSize, FontStyleType fontStyle, int pointX, int pointY, string sessionKey, CodeStyleType codeStyle) { this.codeLen = codeLength; this.fineness = fineNess; this.imgWidth = imgWidth; this.imgHeight = imgHeight; this.fontFamily = fontFamily; this.fontSize = fontSize; this.fontStyle = fontStyle; this.posX = pointX; this.posY = pointY; this.sessionkey = sessionKey; this.codestyle = codeStyle; return(WriterCode()); }
/** * @ 指定要生成的验证码类型,然后使用默认的设置生成验证码 * @ codeStyle 验证码类型,0英文字母,1中文字符,3数字 * */ public byte[] WriterCode(CodeStyleType codeStyle) { codestyle = codeStyle; return(WriterCode()); }