com.sun.jimi.core.raster
Class MemoryByteRasterImage
java.lang.Object
|
+--com.sun.jimi.core.raster.JimiRasterImageSupport
|
+--com.sun.jimi.core.raster.MemoryByteRasterImage
- Direct Known Subclasses:
- OneshotByteRasterImage, VMemByteRasterImage
- public class MemoryByteRasterImage
- extends JimiRasterImageSupport
- implements ByteRasterImage, BitRasterImage
In-memory implementation of byte-based storage.
Luke Gorrie
Fields inherited from class com.sun.jimi.core.raster.JimiRasterImageSupport |
abort,
colorModel,
error,
finished,
forceRGB,
modified,
newFrameData,
productionAllowed,
productionStarted,
properties,
rowBuf,
sourceColorModel,
waitForOptions |
Method Summary |
byte[] |
asByteArray()
|
protected java.awt.image.ColorModel |
getAppropriateColorModel(java.awt.image.ColorModel cm)
|
byte |
getPixel(int x,
int y)
|
int |
getPixelRGB(int x,
int y)
|
void |
getRectangle(int x,
int y,
int width,
int height,
byte[] buffer,
int offset,
int scansize)
|
void |
getRectanglePacked(int x,
int y,
int width,
int height,
byte[] buffer,
int offset,
int scansize)
|
void |
getRectangleRGB(int x,
int y,
int width,
int height,
int[] buffer,
int offset,
int scansize)
|
void |
getRow(int y,
byte[] buffer,
int offset)
|
void |
getRowPacked(int y,
byte[] buffer,
int offset)
|
void |
getRowRGB(int y,
int[] buffer,
int offset)
|
protected void |
initStorage()
|
protected void |
sendPixel(int x,
int y,
byte value)
|
protected void |
sendRectangle(int x,
int y,
int width,
int height,
byte[] pixels,
int offset,
int scansize)
|
protected void |
sendRegionToConsumerFully(java.awt.image.ImageConsumer consumer,
java.awt.Rectangle region)
|
protected void |
sendRow(int y,
byte[] pixels,
int offset)
|
protected void |
sendToConsumerFully(java.awt.image.ImageConsumer consumer)
|
void |
setPixel(int x,
int y,
byte value)
|
void |
setRectangle(int x,
int y,
int width,
int height,
byte[] pixels,
int offset,
int scansize)
|
void |
setRectanglePacked(int x,
int y,
int width,
int height,
byte[] pixels,
int offset,
int scansize)
|
void |
setRow(int y,
byte[] pixels,
int offset)
|
void |
setRowPacked(int y,
byte[] pixels,
int offset)
|
void |
storePixel(int x,
int y,
byte value)
|
void |
storeRectangle(int x,
int y,
int width,
int height,
byte[] pixels,
int offset,
int scansize)
|
void |
storeRow(int y,
byte[] pixels,
int offset)
|
Methods inherited from class com.sun.jimi.core.raster.JimiRasterImageSupport |
addConsumer,
addDirectConsumer,
addWaitingConsumer,
catchupConsumer,
getChannelRectangle,
getChannelRow,
getColorModel,
getCroppedImageProducer,
getDirectConsumer,
getFactory,
getHeight,
getImageProducer,
getOptions,
getProperties,
getRectangleARGBChannels,
getRectangleRGBAChannels,
getRectangleRGBChannels,
getWidth,
hasDirectConsumer,
initConsumer,
isConsumer,
isError,
mustWaitForOptions,
produceCroppedImage,
removeConsumer,
requestTopDownLeftRightResend,
setColorModel,
setDecodingController,
setError,
setFactory,
setFinished,
setImageConsumerHints,
setModified,
setOptions,
setWaitForOptions,
startProduction,
waitFinished,
waitInfoAvailable |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
imageData
protected byte[] imageData
pixelBuffer
protected byte[] pixelBuffer
MemoryByteRasterImage
public MemoryByteRasterImage(int width,
int height,
java.awt.image.ColorModel cm)
initStorage
protected void initStorage()
throws JimiException
getRectangleRGB
public void getRectangleRGB(int x,
int y,
int width,
int height,
int[] buffer,
int offset,
int scansize)
throws ImageAccessException
getRowRGB
public void getRowRGB(int y,
int[] buffer,
int offset)
throws ImageAccessException
getPixelRGB
public int getPixelRGB(int x,
int y)
throws ImageAccessException
getRectangle
public void getRectangle(int x,
int y,
int width,
int height,
byte[] buffer,
int offset,
int scansize)
throws ImageAccessException
- Specified by:
- getRectangle in interface ByteRasterImage
getRow
public void getRow(int y,
byte[] buffer,
int offset)
throws ImageAccessException
- Specified by:
- getRow in interface ByteRasterImage
getPixel
public byte getPixel(int x,
int y)
throws ImageAccessException
- Specified by:
- getPixel in interface ByteRasterImage
setRectangle
public void setRectangle(int x,
int y,
int width,
int height,
byte[] pixels,
int offset,
int scansize)
throws ImageAccessException
- Specified by:
- setRectangle in interface ByteRasterImage
setRow
public void setRow(int y,
byte[] pixels,
int offset)
throws ImageAccessException
- Specified by:
- setRow in interface ByteRasterImage
setPixel
public void setPixel(int x,
int y,
byte value)
throws ImageAccessException
- Specified by:
- setPixel in interface ByteRasterImage
storeRectangle
public void storeRectangle(int x,
int y,
int width,
int height,
byte[] pixels,
int offset,
int scansize)
throws ImageAccessException
storeRow
public void storeRow(int y,
byte[] pixels,
int offset)
throws ImageAccessException
storePixel
public void storePixel(int x,
int y,
byte value)
throws ImageAccessException
sendRectangle
protected void sendRectangle(int x,
int y,
int width,
int height,
byte[] pixels,
int offset,
int scansize)
sendRow
protected void sendRow(int y,
byte[] pixels,
int offset)
sendPixel
protected void sendPixel(int x,
int y,
byte value)
setRectanglePacked
public void setRectanglePacked(int x,
int y,
int width,
int height,
byte[] pixels,
int offset,
int scansize)
throws ImageAccessException
- Specified by:
- setRectanglePacked in interface BitRasterImage
setRowPacked
public void setRowPacked(int y,
byte[] pixels,
int offset)
throws ImageAccessException
- Specified by:
- setRowPacked in interface BitRasterImage
getRectanglePacked
public void getRectanglePacked(int x,
int y,
int width,
int height,
byte[] buffer,
int offset,
int scansize)
throws ImageAccessException
- Specified by:
- getRectanglePacked in interface BitRasterImage
getRowPacked
public void getRowPacked(int y,
byte[] buffer,
int offset)
throws ImageAccessException
- Specified by:
- getRowPacked in interface BitRasterImage
sendToConsumerFully
protected void sendToConsumerFully(java.awt.image.ImageConsumer consumer)
throws ImageAccessException
- Overrides:
- sendToConsumerFully in class JimiRasterImageSupport
sendRegionToConsumerFully
protected void sendRegionToConsumerFully(java.awt.image.ImageConsumer consumer,
java.awt.Rectangle region)
throws ImageAccessException
- Overrides:
- sendRegionToConsumerFully in class JimiRasterImageSupport
getAppropriateColorModel
protected java.awt.image.ColorModel getAppropriateColorModel(java.awt.image.ColorModel cm)
- Overrides:
- getAppropriateColorModel in class JimiRasterImageSupport
asByteArray
public byte[] asByteArray()
- Specified by:
- asByteArray in interface ByteRasterImage