I have created a TextPaster that rotates charcaters randomly 360 degrees. If a character is between 90 and 270 degrees it will be underlined. This TextPaster also places the character at a random height (like the NonLinearTextPaster). I thought maybe this TextPaster can be used in JCaptcha.
I have attached the source code to this issue. You can see the captcha in action at http://smsdudes.com/captcha.htm
Any feedback is welcome.
Cheers
Martijn
Java 5 and 6. Tomcat 6.0.14
Thanks for the contribution
I have improved the textpaster. Each glyph that is placed at a random angle and random height is now placed more accurate at its position. This is meanly because of the use of 'font.createGlyphVector(frc, character).getGlyphOutline(0);' at line 60. This creates a Shape for each character (glyph). Which can be placed more accurate then when using g.drawString() for placing each character at a random angle and height. I think this approach for drawing each character separately is more effective then using g.drawString() in general for that purpose. G.drawString() is meant to draw complete strings in a certain straight line. Anyhow that is what I think. Cheers Martijn