public class RGBImageData extends ImageAdapter implements IImage
imageData
background, height, width
CREATE_OPTION_DONT_SCALE_UP, CREATE_OPTION_IGNORE_ALPHA, CREATE_OPTION_KEEP_ASPECT_RATIO, CREATE_OPTION_ROUGH_SCALING, 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_MASK, TYPE_MONO, TYPE_RGB, TYPE_UNKNOWN
Constructor and Description |
---|
RGBImageData()
If you use this constructor, make sure you call the set() method before
using any of the other methods.
|
RGBImageData(ImageData image) |
Modifier and Type | Method and Description |
---|---|
static boolean |
actsAsRGBImageData(ImageData image)
Return true if the specified ImageData acts in the same way that an RGBImageData would
act.
|
void |
free()
This only frees this Object's local data - it does not free the Image the RGBImage
wraps.
|
int[] |
getImageColorTable()
This always returns null.
|
int |
getImageScanLineLength()
This always returns the width of the original image.
|
void |
getImageScanLines(int startLine,
int numLines,
Object destArray,
int offset,
int destScanLineLength)
Get the image scan lines, always as ARGB integer values.
|
int |
getImageScanLineType()
This always returns SCAN_LINE_INT_ARRAY;
|
int |
getImageType()
This returns either TYPE_ARGB or TYPE_RGB.
|
void |
setImageScanLines(int startLine,
int numLines,
Object sourceArray,
int offset,
int sourceScanLineLength)
Set the image scan lines, always as ARGB integer values.
|
static ImageData |
toImageData(ImageData image,
RGBImageData wrapper)
If the specified Image implements RGBImageData in exactly the same way as
an RGBImageData does, then return the Image itself.
|
draw, drawableToIImage, drawRGB, getPixels, isReadableImage, isWriteableImage, set, setPixels, toIImage, usesAlpha
createImageFor, draw, draw, freeImage, getBackground, getCompatibleImagePoints, getDPI, getHeight, getImageData, getImageHeight, getImageWidth, getNativeDrawable, getPixelsUsingScanLines, getScanLinesUsingPixels, getWidth, scanLinesComplete, setPixelsUsingScanLines, setScanLinePixels, setScanLinesUsingPixels
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getBackground, usesAlpha
freeImage, getImageHeight, getImageWidth, getPixels, isReadableImage, isWriteableImage, setPixels
public RGBImageData()
public RGBImageData(ImageData image)
public static boolean actsAsRGBImageData(ImageData image)
public static ImageData toImageData(ImageData image, RGBImageData wrapper)
public int getImageType()
getImageType
in interface ImageData
getImageType
in class ImageAdapter
public int getImageScanLineType()
getImageScanLineType
in interface ImageData
getImageScanLineType
in class ImageAdapter
public int getImageScanLineLength()
getImageScanLineLength
in interface ImageData
getImageScanLineLength
in class ImageAdapter
public void getImageScanLines(int startLine, int numLines, Object destArray, int offset, int destScanLineLength)
getImageScanLines
in interface ImageData
getImageScanLines
in class ImageAdapter
public void setImageScanLines(int startLine, int numLines, Object sourceArray, int offset, int sourceScanLineLength) throws IllegalStateException
setImageScanLines
in interface ImageData
setImageScanLines
in class ImageAdapter
IllegalStateException
public int[] getImageColorTable()
getImageColorTable
in interface ImageData
getImageColorTable
in class ImageAdapter
public void free()
free
in interface Drawable
free
in class ImageAdapter
Drawable.free()