public static class Images.Captcha
extends java.io.InputStream
| Modifier and Type | Field and Description |
|---|---|
jj.play.ns.nl.captcha.backgrounds.BackgroundProducer |
background |
java.util.List<java.awt.Font> |
fonts |
jj.play.ns.nl.captcha.gimpy.GimpyRenderer |
gimpy |
int |
h |
java.awt.Color |
noise |
java.lang.String |
text |
java.awt.Color |
textColor |
int |
w |
| Constructor and Description |
|---|
Captcha(int w,
int h) |
| Modifier and Type | Method and Description |
|---|---|
Images.Captcha |
addNoise()
Add noise to the captcha.
|
Images.Captcha |
addNoise(java.lang.String color)
Add noise to the captcha.
|
java.lang.String |
getText()
Tell the captche to draw a text and retrieve it
|
java.lang.String |
getText(int length)
Tell the captche to draw a text of the specified size and retrieve it
|
java.lang.String |
getText(int length,
java.lang.String chars)
Tell the captche to draw a text of the specified size using specials characters and retrieve it
|
java.lang.String |
getText(java.lang.String color)
Tell the captche to draw a text using the specified color (ex.
|
java.lang.String |
getText(java.lang.String color,
int length)
Tell the captche to draw a text of the specified size using the specified color (ex.
|
java.lang.String |
getText(java.lang.String color,
int length,
java.lang.String chars)
Tell the captche to draw a text of the specified size using specials characters and a the specified color
(ex.
|
int |
read() |
int |
read(byte[] b) |
Images.Captcha |
setBackground(java.lang.String color)
Set a solid background.
|
Images.Captcha |
setBackground(java.lang.String from,
java.lang.String to)
Set a gradient background.
|
Images.Captcha |
setSquigglesBackground()
Set a squiggles background
|
public java.lang.String text
public jj.play.ns.nl.captcha.backgrounds.BackgroundProducer background
public jj.play.ns.nl.captcha.gimpy.GimpyRenderer gimpy
public java.awt.Color textColor
public java.util.List<java.awt.Font> fonts
public int w
public int h
public java.awt.Color noise
public java.lang.String getText()
public java.lang.String getText(java.lang.String color)
color - a String that represents an opaque color as a 24-bit integerpublic java.lang.String getText(int length)
length - the specified size of the textpublic java.lang.String getText(java.lang.String color,
int length)
color - a String that represents an opaque color as a 24-bit integerlength - the specified size of the textpublic java.lang.String getText(int length,
java.lang.String chars)
length - the specified size of the textchars - List of allowed characterspublic java.lang.String getText(java.lang.String color,
int length,
java.lang.String chars)
color - a String that represents an opaque color as a 24-bit integerlength - the specified size of the textchars - List of allowed characterspublic Images.Captcha addNoise()
public Images.Captcha addNoise(java.lang.String color)
color - a String that represents an opaque color as a 24-bit integerpublic Images.Captcha setBackground(java.lang.String from, java.lang.String to)
from - a String that represents an opaque color use to start the gradientto - a String that represents an opaque color use to end the gradientpublic Images.Captcha setBackground(java.lang.String color)
color - a String that represents an opaque color as a 24-bit integerpublic Images.Captcha setSquigglesBackground()
public int read()
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionpublic int read(byte[] b)
throws java.io.IOException
read in class java.io.InputStreamjava.io.IOExceptionGuillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly