public class ExampleImageGenerator
extends java.lang.Object
Constructor and Description |
---|
ExampleImageGenerator()
Creates an image creator object with the default settings
The image site is 400 x 400 pixels
A linear color transition from white (left upper corner) to green (right lower corner) is drawn.
|
Modifier and Type | Method and Description |
---|---|
java.awt.image.BufferedImage |
getImage()
Generates the example image according to the given settings.
|
void |
setHeight(int iHeight)
Sets the height of the image that should be generated.
|
void |
setLeftUpperColor(java.awt.Color pColor)
Sets the color in the left upper corner that should be used for the color transition.
|
void |
setRightLowerColor(java.awt.Color pColor)
Sets the color in the left upper corner that should be used for the color transition.
|
void |
setWidth(int iWidth)
Sets the width of the image that should be generated.
|
public ExampleImageGenerator()
public void setWidth(int iWidth)
iWidth
- The width of the image that should be generated in pixels. Values lower that 1 are mapped to 1.public void setHeight(int iHeight)
iHeight
- The height of the image that should be generated in pixels. Values lower that 1 are mapped to 1.public void setLeftUpperColor(java.awt.Color pColor)
pColor
- The color in the left upper corner that should be used for the color transition. If the color is null, nothing is changed.public void setRightLowerColor(java.awt.Color pColor)
pColor
- The color in the left upper corner that should be used for the color transition. If the color is null, nothing is changed.public java.awt.image.BufferedImage getImage()