All Packages Class Hierarchy This Package Previous Next Index
Class javax.media.j3d.ImageComponent2D
java.lang.Object
|
+----javax.media.j3d.SceneGraphObject
|
+----javax.media.j3d.NodeComponent
|
+----javax.media.j3d.ImageComponent
|
+----javax.media.j3d.ImageComponent2D
- public class ImageComponent2D
- extends ImageComponent
This class defines a 2D image component.
This is used for texture images, background images and raster components
of Shape3D nodes.
-
ImageComponent2D(int, BufferedImage)
- Constructs an 2D image component object using the specified format,
and BufferedImage.
-
ImageComponent2D(int, int, int)
- Constructs an 2D image component object using the specified format,
width and height.
-
getImage()
- Retrieves a copy of the image in this ImageComponent2D object.
-
set(BufferedImage)
- Copies the specified BufferedImage to this 2D image component object.
ImageComponent2D
public ImageComponent2D(int format,
int width,
int height)
- Constructs an 2D image component object using the specified format,
width and height.
- Parameters:
- format - the image component format, one of: FORMAT_RGB,
FORMAT_RGBA, etc.
- width - the number of columns of pixels in this image component
object
- height - the number of rows of pixels in this image component
object
- Throws: IllegalArgumentException
- if format is invalid or
width/height are non-positive.
ImageComponent2D
public ImageComponent2D(int format,
BufferedImage image)
- Constructs an 2D image component object using the specified format,
and BufferedImage. A copy of the BufferedImage is made.
- Parameters:
- format - the image component format, one of: FORMAT_RGB,
FORMAT_RGBA, etc.
- image - the BufferedImage used to create this 2D image component.
- Throws: IllegalArgumentException
- if format is invalid or
width/height are non-positive.
set
public final void set(BufferedImage image)
- Copies the specified BufferedImage to this 2D image component object.
- Parameters:
- image - BufferedImage object containing the image.
The format and size must be the same as the current format in this
ImageComponent2D object.
getImage
public final BufferedImage getImage()
- Retrieves a copy of the image in this ImageComponent2D object.
- Returns:
- a new BufferedImage object created from the image in this
ImageComponent2D object
All Packages Class Hierarchy This Package Previous Next Index