All Packages Class Hierarchy This Package Previous Next Index
Class COM.ibm.beans.gauge.ImageManipulator
java.lang.Object
|
+----COM.ibm.beans.gauge.ImageManipulator
- public class ImageManipulator
- extends Object
This class provides several useful manipulation functions for
use on Images.
ANTICLOCKWISE_90
- Rotation constant for 90 degree anti-clockwise rotation.
CLOCKWISE_90
- Rotation constant for 90 degree clockwise rotation.
COLUMNS
- Flow method constant for creating columns of images.
CYCLE
- Flow method constant for creating cycling images in a
chessboard type pattern.
FLOW_HORIZONTAL
- Flow method constant for flowing images horizontally.
FLOW_VERTICAL
- Flow method constant for flowing images vertically.
LEFT_TO_RIGHT
- Reflection constant for left to right reflection.
NO_REFLECTION
- Reflection constant for no reflection.
NO_ROTATION
- Rotation constant for 0 degree rotation.
ROTATE_180
- Rotation constant for 180 degree rotation.
ROWS
- Flow method constant for creating rows of images.
TOP_TO_BOTTOM
- Reflection constant for top to bottom reflection.
TOPLEFT_TO_BOTTOMRIGHT
- Reflection constant for top left to bottom right
reflection.
TOPRIGHT_TO_BOTTOMLEFT
- Reflection constant for top right to bottom left
reflection.
copyright()
- Copyright method to ensure that short copyright string
appears in class file.
createColorExchangedImage(Image,
Color, Color)
- Return a version of the supplied Image where
replacementColor has been substituted for originalColor
throughout.
createColorExchangedImage(Image,
Color, Color, int, Region)
- Return a version of the supplied Image where
replacementColor has been substituted for all colors
whose Red, Green and Blue components are all within the
given tolerance of the originalColor.
createReflectedImage(Image,
int)
- Return a version of the supplied Image reflected along
the axis specified.
createRepeatedImage(Image,
int, int)
- Return an image consisting of repeated copies of the
source image.
createRepeatedImage(Image[],
int, int, int)
- Return an image consisting of composed repeated copies of
the source images.
createRotatedImage(Image)
- Return a version of the supplied Image rotated by 90
degrees clockwise.
createRotatedImage(Image,
int)
- Return a version of the supplied Image rotated by the
amount specified.
createSubsetImage(Image,
int, int, int, int)
- Return an image which contains a copy of a subset of the
given image.
createSubsetImages(Image,
int)
- Split an image into the given number of pieces, each the
height of the original image and sharing the total width
evenly.
createTransparentImage(Image,
Color)
- Return a version of the supplied Image with all pixels of
the supplied Color set to be transparent.
createTransparentImage(Image,
Color, int, int, Region)
- Return a version of the supplied Image with all pixels of
the supplied Color within the specified Region set to the
specified alpha value, using the tolerance value
provided.
createTransparentImage(Image,
int)
- Return a version of the supplied Image with the given
alpha value applied to every pixel in that Image.
createTransparentImage(Image,
int, Region)
- Return a version of the supplied Image with the given
alpha value applied to every pixel within the specified
Region of the specified Image.
renderRepeatedImage(Graphics,
Image, int, int, int, int)
- Draw repeated copies of the source image onto the
supplied Graphics at the position specified.
renderRepeatedImage(Graphics,
Image[], int, int, int, int, int)
- Draws repeated copies of the source images onto the
supplied Graphics.
NO_ROTATION
public static final int NO_ROTATION
- Rotation constant for 0 degree rotation.
CLOCKWISE_90
public static final int CLOCKWISE_90
- Rotation constant for 90 degree clockwise rotation.
ANTICLOCKWISE_90
public static final int ANTICLOCKWISE_90
- Rotation constant for 90 degree anti-clockwise rotation.
ROTATE_180
public static final int ROTATE_180
- Rotation constant for 180 degree rotation.
NO_REFLECTION
public static final int NO_REFLECTION
- Reflection constant for no reflection.
TOP_TO_BOTTOM
public static final int TOP_TO_BOTTOM
- Reflection constant for top to bottom reflection.
LEFT_TO_RIGHT
public static final int LEFT_TO_RIGHT
- Reflection constant for left to right reflection.
TOPLEFT_TO_BOTTOMRIGHT
public static final int TOPLEFT_TO_BOTTOMRIGHT
- Reflection constant for top left to bottom right
reflection.
TOPRIGHT_TO_BOTTOMLEFT
public static final int TOPRIGHT_TO_BOTTOMLEFT
- Reflection constant for top right to bottom left
reflection.
FLOW_HORIZONTAL
public static final int FLOW_HORIZONTAL
- Flow method constant for flowing images horizontally.
FLOW_VERTICAL
public static final int FLOW_VERTICAL
- Flow method constant for flowing images vertically.
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.
createReflectedImage
public static Image createReflectedImage(Image source,
int axis)
- Return a version of the supplied Image reflected along
the axis specified.
createColorExchangedImage
public static Image createColorExchangedImage(Image source,
Color originalColor,
Color replacementColor)
- Return a version of the supplied Image where
replacementColor has been substituted for originalColor
throughout.
createColorExchangedImage
public static Image createColorExchangedImage(Image source,
Color originalColor,
Color replacementColor,
int tolerance,
Region region)
- Return a version of the supplied Image where
replacementColor has been substituted for all colors
whose Red, Green and Blue components are all within the
given tolerance of the originalColor. The tolerance may
be in the range 0 (only exact matches will be
substituted) and 255 (all colors will be substituted)
createTransparentImage
public static Image createTransparentImage(Image source,
int alpha)
- Return a version of the supplied Image with the given
alpha value applied to every pixel in that Image.
createTransparentImage
public static Image createTransparentImage(Image source,
int alpha,
Region region)
- Return a version of the supplied Image with the given
alpha value applied to every pixel within the specified
Region of the specified Image.
createTransparentImage
public static Image createTransparentImage(Image source,
Color transparentColor)
- Return a version of the supplied Image with all pixels of
the supplied Color set to be transparent.
createTransparentImage
public static Image createTransparentImage(Image source,
Color transparentColor,
int alpha,
int tolerance,
Region region)
- Return a version of the supplied Image with all pixels of
the supplied Color within the specified Region set to the
specified alpha value, using the tolerance value
provided.
createRotatedImage
public static Image createRotatedImage(Image source)
- Return a version of the supplied Image rotated by 90
degrees clockwise.
createRotatedImage
public static Image createRotatedImage(Image source,
int rotation)
- Return a version of the supplied Image rotated by the
amount specified.
- See Also:
- NO_ROTATION, CLOCKWISE_90, ANTICLOCKWISE_90, ROTATE_180
createSubsetImages
public static Image[] createSubsetImages(Image img,
int fragments)
- Split an image into the given number of pieces, each the
height of the original image and sharing the total width
evenly.
createSubsetImage
public static Image createSubsetImage(Image src,
int x,
int y,
int w,
int h)
- Return an image which contains a copy of a subset of the
given image.
createRepeatedImage
public static Image createRepeatedImage(Image srcImageArray[],
int xCopies,
int yCopies,
int flowMethod)
- Return an image consisting of composed repeated copies of
the source images. The flowMethod parameter controls how
the images are deployed.
- Parameters:
- srcImageArray - an array of images to be tiled
- xCopies - the number of cells across to fill
- yCopies - the number of cells down to fill
- flowMethod - one of the flow method constants
- See Also:
- ROWS, COLUMNS,
CYCLE, FLOW_HORIZONTAL, FLOW_VERTICAL
renderRepeatedImage
public static void renderRepeatedImage(Graphics g,
Image srcImage,
int xCopies,
int yCopies,
int x,
int y)
- Draw repeated copies of the source image onto the
supplied Graphics at the position specified.
- Parameters:
- g - is the Graphics on which to draw the result
- srcImage - an array of images to be tiled
- xCopies - the number of cells across to fill
- yCopies - the number of cells down to fill
- x - the x position at which to draw the result
- y - the y position at which to draw the result
createRepeatedImage
public static Image createRepeatedImage(Image srcImage,
int xCopies,
int yCopies)
- Return an image consisting of repeated copies of the
source image.
- Parameters:
- srcImage - an image to tile
- xCopies - the number of cells across to fill
- yCopies - the number of cells down to fill
renderRepeatedImage
public static void renderRepeatedImage(Graphics g,
Image srcImageArray[],
int xCopies,
int yCopies,
int x,
int y,
int flowMethod)
- Draws repeated copies of the source images onto the
supplied Graphics. at the position specified. The
flowMethod parameter controls how the images are
deployed.
- Parameters:
- g - the Graphics on which to draw the result
- srcImageArray - an array of images to be tiled
- xCopies - the number of cells across to fill
- yCopies - the number of cells down to fill
- x - the x position at which to draw the result
- y - the y position at which to draw the result
- flowMethod - one of the flow method constants
- See Also:
- ROWS, COLUMNS,
CYCLE, FLOW_HORIZONTAL, FLOW_VERTICAL
All Packages Class Hierarchy This Package Previous Next Index
Copyright ©
Taligent, Inc. 1996 - 1997.
Copyright © IBM Corporation 1996 - 1997.
All Rights Reserved.