nl.captcha.backgrounds
Class GradiatedBackgroundProducer
java.lang.Object
nl.captcha.backgrounds.GradiatedBackgroundProducer
- All Implemented Interfaces:
- BackgroundProducer
public class GradiatedBackgroundProducer
- extends java.lang.Object
- implements BackgroundProducer
Creates a gradiated background with the given from and to
Color values. If none are specified they default to light gray and white
respectively.
- Author:
- James Childers
Method Summary |
java.awt.image.BufferedImage |
addBackground(java.awt.image.BufferedImage image)
Add the background to the given image. |
java.awt.image.BufferedImage |
getBackground(int width,
int height)
|
void |
setFromColor(java.awt.Color fromColor)
|
void |
setToColor(java.awt.Color toColor)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GradiatedBackgroundProducer
public GradiatedBackgroundProducer()
GradiatedBackgroundProducer
public GradiatedBackgroundProducer(java.awt.Color from,
java.awt.Color to)
getBackground
public java.awt.image.BufferedImage getBackground(int width,
int height)
- Specified by:
getBackground
in interface BackgroundProducer
addBackground
public java.awt.image.BufferedImage addBackground(java.awt.image.BufferedImage image)
- Description copied from interface:
BackgroundProducer
- Add the background to the given image.
- Specified by:
addBackground
in interface BackgroundProducer
- Parameters:
image
- The image onto which the background will be rendered.
- Returns:
- The image with the background rendered.
setFromColor
public void setFromColor(java.awt.Color fromColor)
setToColor
public void setToColor(java.awt.Color toColor)
Copyright © 2010-2011 James Childers. All Rights Reserved.