|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.octo.captcha.component.image.textpaster.AbstractTextPaster
com.octo.captcha.component.image.textpaster.NonLinearRandomAngleTextPaster
public class NonLinearRandomAngleTextPaster
A TextPaster that pasts the characters on the background image, turned around a random angle from the
center of the character and past at a random y position.
| Field Summary |
|---|
| Fields inherited from class com.octo.captcha.component.image.textpaster.AbstractTextPaster |
|---|
myRandom |
| Constructor Summary | |
|---|---|
NonLinearRandomAngleTextPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
java.awt.Color textColor)
Deprecated. |
|
NonLinearRandomAngleTextPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator)
Deprecated. |
|
NonLinearRandomAngleTextPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator,
java.lang.Boolean manageColorPerGlyph)
Deprecated. |
|
| Method Summary | |
|---|---|
void |
addRenderingHints(java.awt.RenderingHints.Key key,
java.lang.Object value)
Deprecated. Adds RenderingHints for the drawing of the characters. |
protected double |
getRandomAngle()
Deprecated. Returns a random angle between 0 and 360 degrees in radians (inclusive). |
protected void |
pasteCharacter(java.awt.Graphics2D g2d,
java.text.AttributedString character)
Deprecated. Draws a certain character on the BufferedImage with a random angle and y pos. |
java.awt.image.BufferedImage |
pasteText(java.awt.image.BufferedImage background,
java.text.AttributedString attributedWord)
Deprecated. Pastes the attributed string on the backround image and return the final image. |
| Methods inherited from class com.octo.captcha.component.image.textpaster.AbstractTextPaster |
|---|
getColorGenerator, getMaxAcceptedWordLenght, getMaxAcceptedWordLength, getMinAcceptedWordLenght, getMinAcceptedWordLength, isManageColorPerGlyph, setColorGenerator |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NonLinearRandomAngleTextPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
java.awt.Color textColor)
public NonLinearRandomAngleTextPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator)
public NonLinearRandomAngleTextPaster(java.lang.Integer minAcceptedWordLength,
java.lang.Integer maxAcceptedWordLength,
ColorGenerator colorGenerator,
java.lang.Boolean manageColorPerGlyph)
| Method Detail |
|---|
public java.awt.image.BufferedImage pasteText(java.awt.image.BufferedImage background,
java.text.AttributedString attributedWord)
throws CaptchaException
TextPaster
CaptchaException - if any exception accurs during paste routine.TextPaster.pasteText(java.awt.image.BufferedImage, java.text.AttributedString)
protected void pasteCharacter(java.awt.Graphics2D g2d,
java.text.AttributedString character)
BufferedImage with a random angle and y pos.
If the characters angle is greater then 90 degrees and lower then 270 degrees, the bottom
of the character will be underlined.
g2d - The graphics of the BufferedImagecharacter - The character to be drawnprotected double getRandomAngle()
public void addRenderingHints(java.awt.RenderingHints.Key key,
java.lang.Object value)
RenderingHints for the drawing of the characters.
key - The RenderingHints Keyvalue - The RenderingHints value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||