All Packages Class Hierarchy This Package Previous Next Index
Class com.ibm.eou.toolkit.graphics.Fill
java.lang.Object
|
+----com.ibm.eou.toolkit.graphics.Fill
- public class Fill
- extends Object
This class provides static methods that generate colour gradient filled images using a ColorGradient
to define the range of colours to be used, and an implementation of Region to limit the
extents of the colour gradient fill.
- See Also:
- Region, ColorGradient
-
COLUMNS
- Flow method constant for creating columns of images.
-
CYCLE
- Flow method constant for creating cycling images in a chessboard type pattern.
-
E_W
- Fill direction of East to West
-
N_S
- Fill direction of North to South
-
NE_SW
- Fill direction of Northeast to Southwest
-
NW_SE
- Fill direction of Northwest to Southeast
-
ROWS
- Flow method constant for creating rows of images.
-
S_N
- Fill direction of South to North
-
SE_NW
- Fill direction of Southeast to Northwest
-
SW_NE
- Fill direction of Southwest to Northeast
-
W_E
- Fill direction of West to East
-
copyright()
- Copyright method to ensure that short copyright string appears
in class file.
-
createArcImage(ColorGradient, Dimension, Point)
- Return an image of the given dimension with the color gradient sweeping about the point.
-
createArcImage(ColorGradient, Dimension, Point, int, int)
- Return an image of the given dimension with the color gradient sweeping about the point.
-
createArcImage(ColorGradient, Region, Point)
- Return an image with the color gradient sweeping about the point and filling the region.
-
createArcImage(ColorGradient, Region, Point, int, int)
- Return an image with the color gradient sweeping about the point and filling the region.
-
createLinearImage(ColorGradient, Dimension, int)
- Return an image of the given dimension containing a linear representation of the color gradient.
-
createLinearImage(ColorGradient, Dimension, int, int, int)
- Return an image of the given dimension containing a linear representation of
the color gradient The start and end parameters are percentages
of the default gradient length.
-
createLinearImage(ColorGradient, Region, int)
- Return an image containing a linear representation of the color gradient inside the region,
at the given angle.
-
createLinearImage(ColorGradient, Region, int, int, int)
- Return an image containing a linear representation of the color gradient
inside the specified region.
-
createRadialImage(ColorGradient, Dimension, Point)
- Return an image of the given dimension with the color gradient emenating from a point.
-
createRadialImage(ColorGradient, Dimension, Point, int, int)
- Return an image of the given dimension with the color gradient emanating from a point.
-
createRadialImage(ColorGradient, Region, Point)
- Return an image with the color gradient emanating from a point and filling the region.
-
createRadialImage(ColorGradient, Region, Point, int, int)
- Return an image with the color gradient emanating from a point and filling the region.
-
createTiledImage(Image, int, int, int, int)
- Return a new image consisting of the given image tiled.
-
createTiledImage(Image[], int, int, int, int, int)
- Return a new image consisting of the given image(s) tiled.
-
renderTiledImage(Graphics, Image, int, int, int, int, int, int)
- Draw a new image consisting of the given image tiled onto the supplied Graphics at the position specified.
-
renderTiledImage(Graphics, Image[], int, int, int, int, int, int, int)
- Draw a new image consisting of the given image(s) tiled onto the supplied Graphics at the position specified.
N_S
public static final int N_S
- Fill direction of North to South
S_N
public static final int S_N
- Fill direction of South to North
E_W
public static final int E_W
- Fill direction of East to West
W_E
public static final int W_E
- Fill direction of West to East
NW_SE
public static final int NW_SE
- Fill direction of Northwest to Southeast
SE_NW
public static final int SE_NW
- Fill direction of Southeast to Northwest
NE_SW
public static final int NE_SW
- Fill direction of Northeast to Southwest
SW_NE
public static final int SW_NE
- Fill direction of Southwest to Northeast
ROWS
public static final int ROWS
- Flow method constant for creating rows of images.
COLUMNS
public static final int COLUMNS
- Flow method constant for creating columns of images.
CYCLE
public static final int CYCLE
- Flow method constant for creating cycling images in a chessboard type pattern.
copyright
public static String copyright()
- Copyright method to ensure that short copyright string appears
in class file.
createLinearImage
public static Image createLinearImage(ColorGradient colorGradient,
Region region,
int angle,
int start,
int end)
- Return an image containing a linear representation of the color gradient
inside the specified region. The start and end parameters are percentages
of the default gradient length, with the defaults being 0 and 100 respectively.
Start values greater than zero and end values less than 100 will compress the
gradient within the region. Start values less than zero and end values greater than 100
will expand the gradient within the region such that not all of the color gradient
range is visible.
The angle is measured in degrees anticlockwise from east.
- See Also:
- N_S, S_N, E_W, W_E, NW_SE, SE_NW, SW_NE, NE_SW
createLinearImage
public static Image createLinearImage(ColorGradient colorGradient,
Region region,
int angle)
- Return an image containing a linear representation of the color gradient inside the region,
at the given angle. The angle is measured in degrees anticlockwise from east.
- See Also:
- N_S, S_N, E_W, W_E, NW_SE, SE_NW, SW_NE, NE_SW
createLinearImage
public static Image createLinearImage(ColorGradient colorGradient,
Dimension size,
int angle,
int start,
int end)
- Return an image of the given dimension containing a linear representation of
the color gradient The start and end parameters are percentages
of the default gradient length. The default being 0 and 100 respectively.
Start values greater than zero and end values less than 100 will compress the
gradient within the region. Start values less than zero and end values greater than 100
will expand the gradient within the region such that not all of the color gradient
range is visible.
The angle is measured in degrees anticlockwise from east.
- See Also:
- N_S, S_N, E_W, W_E, NW_SE, SE_NW, SW_NE, NE_SW
createLinearImage
public static Image createLinearImage(ColorGradient colorGradient,
Dimension size,
int angle)
- Return an image of the given dimension containing a linear representation of the color gradient.
The angle is measured in degrees anticlockwise from east.
- See Also:
- N_S, S_N, E_W, W_E, NW_SE, SE_NW, SW_NE, NE_SW
createRadialImage
public static Image createRadialImage(ColorGradient colorGradient,
Region region,
Point offset,
int inner,
int outer)
- Return an image with the color gradient emanating from a point and filling the region.
The
offset contains positive or negative x and y percentage offsets of the gradient
centre from the centre of the region.
The inner and outer parameters are percentages of the maximum distance
from the centre of the circle to the corners of the bounding box. These may be used to restrict the
extent of the gradient, and to create effects such as an anulus.
createRadialImage
public static Image createRadialImage(ColorGradient colorGradient,
Dimension size,
Point offset,
int inner,
int outer)
- Return an image of the given dimension with the color gradient emanating from a point.
The
offset contains positive or negative x and y percentage offsets of the gradient centre
from the centre of the region.
The inner and outer parameters are percentages of the maximum distance
from the centre of the circle to the corners of the bounding box These may be used to restrict the
extent of the gradient, and to create effects such as an anulus.
createRadialImage
public static Image createRadialImage(ColorGradient colorGradient,
Region region,
Point offset)
- Return an image with the color gradient emanating from a point and filling the region.
The
offset contains positive or negative x and y percentage offsets of the gradient centre
from the centre of the region.
createRadialImage
public static Image createRadialImage(ColorGradient colorGradient,
Dimension size,
Point offset)
- Return an image of the given dimension with the color gradient emenating from a point.
The
offset contains positive or negative x and y percentage offsets of the gradient centre
from the centre of the region.
createArcImage
public static Image createArcImage(ColorGradient colorGradient,
Region region,
Point offset)
- Return an image with the color gradient sweeping about the point and filling the region.
The
offset contains positive or negative x and y percentage offsets of the
gradient sweep axis from the centre of the region.
createArcImage
public static Image createArcImage(ColorGradient colorGradient,
Dimension size,
Point offset)
- Return an image of the given dimension with the color gradient sweeping about the point.
The
offset contains positive or negative x and y percentage offsets of the
gradient sweep axis from the centre of the region.
createArcImage
public static Image createArcImage(ColorGradient colorGradient,
Region region,
Point offset,
int startAngle,
int extent)
- Return an image with the color gradient sweeping about the point and filling the region.
The
offset contains positive or negative x and y percentage offsets of the
gradient sweep axis from the centre of the region.
The startAngle is the angle at which the gradient sweep is started in degrees
(0 is east and 90 is north) and the extent is the angle to be subtended in
an anticlockwise direction.
createArcImage
public static Image createArcImage(ColorGradient colorGradient,
Dimension size,
Point offset,
int startAngle,
int extent)
- Return an image of the given dimension with the color gradient sweeping about the point.
The
offset contains positive or negative x and y percentage offsets of the
gradient sweep axis from the centre of the region.
The startAngle is the angle at which the gradient sweep is started in degrees
(0 is east and 90 is north) and the extent is the angle to be subtended in an
anticlockwise direction.
createTiledImage
public static Image createTiledImage(Image srcImage,
int width,
int height,
int xOffset,
int yOffset)
- Return a new image consisting of the given image tiled.
The tile origin deteremines where tiling logically commences (although tiling extends in all directions),
ie it fixes one corner where tiles meet. The flowMethod parameter controls how the images are deployed,
and can be one of { CYCLE, ROWS, COLUMNS } as described above, starting from the tile origin.
- Parameters:
- srcImage - an image to be tiled
- width - the width of the area to be filled
- height - the height of the area to be filled
- xOffset - the x offset of the tile origin
- yOffset - the y offset of the tile origin
createTiledImage
public static Image createTiledImage(Image srcImageArray[],
int width,
int height,
int xOffset,
int yOffset,
int flowMethod)
- Return a new image consisting of the given image(s) tiled.
The tile origin deteremines where tiling logically commences (although tiling extends in all directions),
ie it fixes one corner where tiles meet. The flowMethod parameter controls how the images are deployed,
and can be one of { CYCLE, ROWS, COLUMNS } as described above, starting from the tile origin.
- Parameters:
- srcImageArray - an array of images to be tiled
- flowMethod - one of the constants shown below
- width - the width of the area to be filled
- height - the height of the area to be filled
- xOffset - the x offset of the tile origin
- yOffset - the y offset of the tile origin
- See Also:
- CYCLE, ROWS, COLUMNS
renderTiledImage
public static void renderTiledImage(Graphics g,
Image srcImage,
int width,
int height,
int xOffset,
int yOffset,
int x,
int y)
- Draw a new image consisting of the given image tiled onto the supplied Graphics at the position specified.
The tile origin deteremines where tiling logically commences (although tiling extends in all directions),
ie it fixes one corner where tiles meet.
- Parameters:
- g - the Graphics on which to draw the result
- srcImage - an image to tile
- width - the width of the area to be filled
- height - the height of the area to be filled
- xOffset - the x offset of the tile origin
- yOffset - the y offset of the tile origin
- x - the x position at which to draw the result
- y - the y position at which to draw the result
renderTiledImage
public static void renderTiledImage(Graphics g,
Image srcImageArray[],
int width,
int height,
int xOffset,
int yOffset,
int x,
int y,
int flowMethod)
- Draw a new image consisting of the given image(s) tiled onto the supplied Graphics at the position specified.
The tile origin deteremines where tiling logically commences (although tiling extends in all directions),
ie it fixes one corner where tiles meet. The flowMethod parameter controls how the images are deployed,
and can be one of { CYCLE, ROWS, COLUMNS } as described above, starting from the tile origin.
- Parameters:
- g - the Graphics on which to draw the result
- srcImageArray - an array of images to be tiled
- flowMethod - one of the constants shown below
- width - the width of the area to be filled
- height - the height of the area to be filled
- xOffset - the x offset of the tile origin
- yOffset - the y offset of the tile origin
- x - the x position at which to draw the result
- y - the y position at which to draw the result
- See Also:
- CYCLE, ROWS, COLUMNS
All Packages Class Hierarchy This Package Previous Next Index