com.octo.captcha.component.image.backgroundgenerator
Class AbstractBackgroundGenerator

java.lang.Object
  extended by com.octo.captcha.component.image.backgroundgenerator.AbstractBackgroundGenerator
All Implemented Interfaces:
BackgroundGenerator
Direct Known Subclasses:
EllipseBackgroundGenerator, FileReaderRandomBackgroundGenerator, FunkyBackgroundGenerator, GradientBackgroundGenerator, MultipleShapeBackgroundGenerator, UniColorBackgroundGenerator

public abstract class AbstractBackgroundGenerator
extends java.lang.Object
implements BackgroundGenerator

Abstract base class for background generator.
Sub classes must implement the getBackground() method that return a newly generated background.
use constructor to specify your backgroundGenerator properties. This base class only use two parameter, width and height of the generated background. By default widht = 200 and height= 100.


Method Summary
 int getImageHeight()
           
 int getImageWidth()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.octo.captcha.component.image.backgroundgenerator.BackgroundGenerator
getBackground
 

Method Detail

getImageHeight

public int getImageHeight()
Specified by:
getImageHeight in interface BackgroundGenerator
Returns:
the generated image height

getImageWidth

public int getImageWidth()
Specified by:
getImageWidth in interface BackgroundGenerator
Returns:
teh generated image width


Copyright 2003-2009 JCaptcha. All Rights Reserved.