FileDocCategorySizeDatePackage
ImageData.javaAPI DocphoneME MR2 API (J2ME)3153Wed May 02 18:00:08 BST 2007javax.microedition.lcdui

ImageData

public final class ImageData extends Object implements AbstractImageData
Image that is based on platform decoder and storage.

Fields Summary
private int
width
The width, height of this Image
private int
height
private boolean
isMutable
If this Image is mutable.
private int
nativeImageData
Native image data pointer.
Constructors Summary
ImageData()
Constructs ImageData with width and height set to zero.

        width = 0;
        height = 0;
    
ImageData(int width, int height, boolean isMutable)
Constructs ImageData using passed in width and height.

param
width The width of the ImageData to be created.
param
height The height of the ImageData to be created.
param
isMutable true to create mutable ImageData, false to create immutable ImageData

        this.width = width;
        this.height = height;
        this.isMutable = isMutable;
    
Methods Summary
private native voidfinalize()
Cleanup any native resources used by an ImmutableImage

public intgetHeight()
Gets the height of the image in pixels. The value returned must reflect the actual height of the image when rendered.

return
height of the image

        return height;
    
public intgetWidth()
Gets the width of the image in pixels. The value returned must reflect the actual width of the image when rendered.

return
width of the image

        return width;
    
public booleanisMutable()
Check if this image is mutable. Mutable images can be modified by rendering to them through a Graphics object obtained from the getGraphics() method of this object.

return
true if the image is mutable, false otherwise

        return isMutable;