|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectewe.fx.ArrayImageData
This implements an ImageData object using an Array to store the pixel information. You may only use an int[] as data if the type of the image is TYPE_RGB or TYPE_ARGB. You MAY use a byte[] as data for TYPE_RGB or TYPE_ARGB, but for TYPE_RGB the number of bytes per pixel must be 3 and for TYPE_ARGB it must be 4.
| Field Summary |
| Fields inherited from interface ewe.fx.ImageData |
IS_AN_IMAGE_DATA_TYPE, SCAN_LINE_BYTE_ARRAY, SCAN_LINE_INT_ARRAY, TYPE_ARGB, TYPE_GRAY_SCALE_16, TYPE_GRAY_SCALE_2, TYPE_GRAY_SCALE_256, TYPE_GRAY_SCALE_4, TYPE_INDEXED_16, TYPE_INDEXED_2, TYPE_INDEXED_256, TYPE_INDEXED_4, TYPE_MONO, TYPE_RGB, TYPE_UNKNOWN |
| Constructor Summary | |
ArrayImageData()
|
|
| Method Summary | |
Object |
getArray()
|
static Object |
getArrayFor(int imageDataType,
int width,
int height)
Create and return an array that can hold scan lines for an ImageData of a specified type with specified width and height. |
static Object |
getArrayFor(int imageDataType,
int scanLineType,
int width,
int height)
Create and return an array that can hold scan lines for an ImageData of a specified type with specified width and height, and using a specified scanline type. |
int[] |
getImageColorTable()
For indexed images, this retrieves the color table as an array of ARGB integers. |
int |
getImageHeight()
|
int |
getImageScanLineLength()
If the scan line type is SCAN_LINE_BYTE_ARRAY then this indicates the number of bytes is needed for one complete scan line. |
void |
getImageScanLines(int startLine,
int numLines,
Object destination,
int offset,
int destScanLineLength)
Place a set of scan lines into a destination array. |
int |
getImageScanLineType()
Get the type of scan line used by the image - either SCAN_LINE_BYTE_ARRAY or SCAN_LINE_INT_ARRAY |
int |
getImageType()
This returns one of the TYPE_XXX values |
int |
getImageWidth()
|
static int |
getScanLineLengthFor(int imageDataType,
int width)
Get the scan line length needed for an array representation of a particular ImageData type for a particular image width. |
static int |
getScanLineLengthFor(int imageDataType,
int scanLineType,
int width)
Get the scan line length needed for an array representation of a particular ImageData type for a particular image width, using a scanLineType of either SCAN_LINE_INT_ARRAY or SCAN_LINE_BYTE_ARRAY. |
static int |
getScanLineTypeFor(int imageDataType)
Return the scan line type that would be used by default by the specified image data type. |
boolean |
isWritableImage()
Returns if you can write data to the Image. |
ArrayImageData |
set(int imageDataType,
int width,
int height)
Create and set the internal array for the ArrayImageData so that it can hold the scan lines for an Image of the specified type with the specified dimensions. |
ArrayImageData |
set(int imageDataType,
int width,
int height,
int[] colorTable)
Create and set the internal array for the ArrayImageData so that it can hold the scan lines for an Image of the specified type with the specified dimensions. |
ArrayImageData |
set(int imageDataType,
int width,
int height,
Object array,
int offset)
|
ArrayImageData |
set(int imageDataType,
int width,
int height,
Object array,
int offset,
int arrayScanLineLength,
int[] colorTable,
boolean writable)
|
void |
setImageScanLines(int startLine,
int numLines,
Object source,
int offset,
int sourceScanLineLength)
Place a set of scan lines from a source Array into the ImageData. |
Image |
toImage()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, toString |
| Constructor Detail |
public ArrayImageData()
| Method Detail |
public Object getArray()
public Image toImage()
public static int getScanLineTypeFor(int imageDataType)
public ArrayImageData set(int imageDataType,
int width,
int height,
int[] colorTable)
You can use the getArray() method to get the array that this method creates.
public ArrayImageData set(int imageDataType,
int width,
int height)
public static Object getArrayFor(int imageDataType,
int scanLineType,
int width,
int height)
public static Object getArrayFor(int imageDataType,
int width,
int height)
public static int getScanLineLengthFor(int imageDataType,
int scanLineType,
int width)
public static int getScanLineLengthFor(int imageDataType,
int width)
public ArrayImageData set(int imageDataType,
int width,
int height,
Object array,
int offset)
public ArrayImageData set(int imageDataType,
int width,
int height,
Object array,
int offset,
int arrayScanLineLength,
int[] colorTable,
boolean writable)
public int getImageType()
ImageData
getImageType in interface ImageDatapublic int getImageHeight()
getImageHeight in interface ImageDatapublic int getImageWidth()
getImageWidth in interface ImageDatapublic boolean isWritableImage()
ImageData
isWritableImage in interface ImageDatapublic int[] getImageColorTable()
ImageData
getImageColorTable in interface ImageDatapublic int getImageScanLineType()
ImageData
getImageScanLineType in interface ImageDatapublic int getImageScanLineLength()
ImageData
getImageScanLineLength in interface ImageData
public void getImageScanLines(int startLine,
int numLines,
Object destination,
int offset,
int destScanLineLength)
ImageData
getImageScanLines in interface ImageData
public void setImageScanLines(int startLine,
int numLines,
Object source,
int offset,
int sourceScanLineLength)
ImageData
setImageScanLines in interface ImageData
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||