public static class Images.Captcha extends InputStream
| 限定符和类型 | 字段和说明 |
|---|---|
BackgroundProducer |
background |
List<Font> |
fonts |
List<GimpyRenderer> |
gimpy |
int |
h |
List<Color> |
noise |
String |
text |
List<Color> |
textColor |
int |
w |
| 构造器和说明 |
|---|
Images.Captcha(int w,
int h) |
| 限定符和类型 | 方法和说明 |
|---|---|
Images.Captcha |
addFont(Font font) |
Images.Captcha |
addGimpy(GimpyRenderer gimpyRenderer) |
Images.Captcha |
addNoise()
Add noise to the captcha.
|
Images.Captcha |
addNoise(Color color) |
Images.Captcha |
addNoise(String color)
Add noise to the captcha.
|
String |
getText()
Tell the captche to draw a text and retrieve it
|
String |
getText(int length)
Tell the captche to draw a text of the specified size and retrieve it
|
String |
getText(int length,
String chars) |
String |
getText(String color)
Tell the captche to draw a text using the specified color (ex. #000000) and retrieve it
|
String |
getText(String color,
int length)
Tell the captche to draw a text of the specified size using the specified color (ex. #000000) and retrieve it
|
String |
getText(String color,
int length,
String chars) |
int |
read() |
int |
read(byte[] b) |
Images.Captcha |
setBackground(String color)
Set a solid background.
|
Images.Captcha |
setBackground(String from,
String to)
Set a gradient background.
|
Images.Captcha |
setSquigglesBackground()
Set a squiggles background
|
available, close, mark, markSupported, read, reset, skippublic String text
public BackgroundProducer background
public List<GimpyRenderer> gimpy
public int w
public int h
public String getText()
public String getText(String color)
color - colorpublic String getText(int length)
length - lengthpublic String getText(String color, int length)
color - colorlength - lengthpublic Images.Captcha addGimpy(GimpyRenderer gimpyRenderer)
public Images.Captcha addFont(Font font)
public Images.Captcha addNoise()
public Images.Captcha addNoise(Color color)
public Images.Captcha addNoise(String color)
color - colorpublic Images.Captcha setBackground(String from, String to)
from - fromto - topublic Images.Captcha setBackground(String color)
color - colorpublic Images.Captcha setSquigglesBackground()
public int read()
throws IOException
read 在类中 InputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read 在类中 InputStreamIOExceptionCopyright © 2014–2016. All rights reserved.