| java.lang.Object javax.microedition.lcdui.ImageData
ImageData | final class ImageData implements AbstractImageData(Code) | | AbstractImageData implementation based
on putpixel graphics library and stores data on Java heap.
|
Constructor Summary | |
| ImageData() Constructs empty ImageData . | | ImageData(int width, int height, boolean isMutable, boolean clearPixelData, boolean allocateAlpha) Constructs ImageData using passed in width and height. | | ImageData(int width, int height, boolean isMutable, byte[] pixelData) Constructs mutable or immutable ImageData
using passed in width, height and pixel data. |
Method Summary | |
public int | getHeight() Gets the height of the image in pixels. | byte[] | getPixelData() Gets pixel data associated with this ImageData instance. | public int | getWidth() Gets the width of the image in pixels. | public boolean | hasAlpha() Returns true if ImageData contains alpha data. | void | initImageData(int width, int height, boolean isMutable, boolean allocateAlpha) Initializes mutable or immutable ImageData
using passed in width, height. | public boolean | isMutable() Check if this image is mutable. | public void | removeAlpha() |
ImageData | ImageData()(Code) | | Constructs empty ImageData .
|
ImageData | ImageData(int width, int height, boolean isMutable, boolean clearPixelData, boolean allocateAlpha)(Code) | | Constructs ImageData using passed in width and height.
Alpha array is allocated if allocateAlpha is true.
Parameters: width - The width of the ImageData to be created. Parameters: height - The height of the ImageData to be created. Parameters: isMutable - true to create mutable ImageData ,false to create immutable ImageData Parameters: clearPixelData - if true pixel data whould be set to 0xff foreach pixel Parameters: allocateAlpha - true if alpha data should be allocated,false - if not. |
ImageData | ImageData(int width, int height, boolean isMutable, byte[] pixelData)(Code) | | Constructs mutable or immutable ImageData
using passed in width, height and pixel data.
Parameters: width - The width of the ImageData to be created. Parameters: height - The height of the ImageData to be created. Parameters: isMutable - true to create mutable ImageData ,false to create immutable ImageData Parameters: pixelData - byte array that contains pixel data for the ImageData . |
getHeight | public int getHeight()(Code) | | Gets the height of the image in pixels. The value returned
must reflect the actual height of the image when rendered.
height of the image |
getPixelData | byte[] getPixelData()(Code) | | Gets pixel data associated with this ImageData instance.
byte arra that represents pixel data associated with thisImageData instance. |
getWidth | public int getWidth()(Code) | | Gets the width of the image in pixels. The value returned
must reflect the actual width of the image when rendered.
width of the image |
hasAlpha | public boolean hasAlpha()(Code) | | Returns true if ImageData contains alpha data.
true if ImageData contains alpha data. |
initImageData | void initImageData(int width, int height, boolean isMutable, boolean allocateAlpha)(Code) | | Initializes mutable or immutable ImageData
using passed in width, height.
Alpha array is allocated if allocateAlpha is true.
Parameters: width - The width of the ImageData to be created. Parameters: height - The height of the ImageData to be created. Parameters: isMutable - true to create mutable ImageData ,false to create immutable ImageData Parameters: allocateAlpha - true if alpha data should be allocated,false - if not. |
isMutable | public boolean isMutable()(Code) | | 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.
true if the image is mutable,false otherwise |
removeAlpha | public void removeAlpha()(Code) | | Removes alpha data information
|
|
|