net.jot.captcha
Class JOTCaptchaImage
java.lang.Object
net.jot.image.JOTAbstractImage
net.jot.captcha.JOTCaptchaImage
public class JOTCaptchaImage
- extends JOTAbstractImage
Implements a 'CAPTCHA' image.
'CAPTCHA' gotta be one of the worst acronysm i ever came across !
it stands for "Completely Automated Public Turing test to tell Computers and Humans Apart"
Anyway our Captcha here, is the common image with letters/numbers inside which is hard for a computer to parse
but easy for a human.
This is use mostly to prevent "robotized" use of a form to fill your website with junk/spam.
- Author:
- thibautc
|
Method Summary |
protected void |
drawWavyHorizontalLine(int lineThickness,
int x,
int x2,
int y,
JOTAbstractPixel pixel,
int wavyness,
boolean holes)
|
void |
drawWavyLine(int lineThickness,
int x,
int y,
int x2,
int y2,
JOTAbstractPixel pixel,
boolean holes)
Draw a wavy line with given thickness (uses wavyness)
If holes is enabled, some blank pixel with be mixed, leaving holes |
void |
drawWavyLine(int x,
int y,
int x2,
int y2,
JOTAbstractPixel pixel,
boolean holes)
Draw a wavy line with a thickness of 1 pixel (uses wavyness) |
protected void |
drawWavyVerticalLine(int lineThickness,
int x,
int y,
int y2,
JOTAbstractPixel pixel,
int wavyness,
boolean holes)
|
int |
getWaviness()
|
void |
setWaviness(int waviness)
|
| Methods inherited from class net.jot.image.JOTAbstractImage |
drawFilledRectangle, drawHorizontalLine, drawLine, drawRectangle, drawVerticalLine, fillImage, getColorDepth, getData, getHeight, getPixel, getWidth, setPixel, writeToStream |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JOTCaptchaImage
public JOTCaptchaImage(int width,
int height)
JOTCaptchaImage
public JOTCaptchaImage(int width,
int height,
int ALPHA_TYPE)
drawWavyLine
public void drawWavyLine(int x,
int y,
int x2,
int y2,
JOTAbstractPixel pixel,
boolean holes)
- Draw a wavy line with a thickness of 1 pixel (uses wavyness)
- Parameters:
x - y - x2 - y2 - pixel -
drawWavyLine
public void drawWavyLine(int lineThickness,
int x,
int y,
int x2,
int y2,
JOTAbstractPixel pixel,
boolean holes)
- Draw a wavy line with given thickness (uses wavyness)
If holes is enabled, some blank pixel with be mixed, leaving holes
- Parameters:
lineThickness - x - y - x2 - y2 - pixel -
drawWavyHorizontalLine
protected void drawWavyHorizontalLine(int lineThickness,
int x,
int x2,
int y,
JOTAbstractPixel pixel,
int wavyness,
boolean holes)
drawWavyVerticalLine
protected void drawWavyVerticalLine(int lineThickness,
int x,
int y,
int y2,
JOTAbstractPixel pixel,
int wavyness,
boolean holes)
setWaviness
public void setWaviness(int waviness)
getWaviness
public int getWaviness()