Package nl.captcha
Class Captcha.Builder
java.lang.Object
nl.captcha.Captcha.Builder
- All Implemented Interfaces:
Serializable
- Enclosing class:
Captcha
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd a background using the default BackgroundProducer.addBackground(BackgroundProducer bgProd) Add a background using the given BackgroundProducer.Draw a single-pixel wide black border around the image.addNoise()Add noise using the default NoiseProducer.addNoise(NoiseProducer nProd) Add noise using the given NoiseProducer.addText()Add text to the image using the default TextProduceraddText(TextProducer txtProd) Add text to the image using the given TextProduceraddText(TextProducer txtProd, WordRenderer wRenderer) addText(WordRenderer wRenderer) Display the answer on the image using the given WordRenderer.build()Build the CAPTCHA.gimp()Gimp the image using the default GimpyRenderer.gimp(GimpyRenderer gimpy) Gimp the image using the given GimpyRenderer.toString()
-
Constructor Details
-
Builder
public Builder(int width, int height)
-
-
Method Details
-
addBackground
Add a background using the default BackgroundProducer.- Returns:
-
addBackground
Add a background using the given BackgroundProducer.- Parameters:
bgProd-- Returns:
-
addText
Add text to the image using the default TextProducer- Returns:
-
addText
Add text to the image using the given TextProducer- Parameters:
txtProd-- Returns:
-
addText
Display the answer on the image using the given WordRenderer.- Parameters:
wRenderer-- Returns:
-
addText
-
addNoise
Add noise using the default NoiseProducer.- Returns:
-
addNoise
Add noise using the given NoiseProducer.- Parameters:
nProd-- Returns:
-
gimp
Gimp the image using the default GimpyRenderer.- Returns:
-
gimp
Gimp the image using the given GimpyRenderer.- Parameters:
gimpy-- Returns:
-
addBorder
Draw a single-pixel wide black border around the image.- Returns:
-
build
Build the CAPTCHA. This method should always be called, and should always be called last.- Returns:
-
toString
-