com.sun.jimi.core.raster
Class OneshotByteRasterImage

java.lang.Object
  |
  +--com.sun.jimi.core.raster.JimiRasterImageSupport
        |
        +--com.sun.jimi.core.raster.MemoryByteRasterImage
              |
              +--com.sun.jimi.core.raster.OneshotByteRasterImage

public class OneshotByteRasterImage
extends MemoryByteRasterImage

In-memory implementation of byte-based storage. Luke Gorrie


Field Summary
protected  byte[] pixelBuffer
           
protected  int rowByteWidth
           
protected  byte[] rowUnpackedBuffer
           
 
Fields inherited from class com.sun.jimi.core.raster.MemoryByteRasterImage
imageData, pixelBuffer
 
Fields inherited from class com.sun.jimi.core.raster.JimiRasterImageSupport
abort, colorModel, error, finished, forceRGB, modified, newFrameData, productionAllowed, productionStarted, properties, rowBuf, sourceColorModel, waitForOptions
 
Constructor Summary
OneshotByteRasterImage(int width, int height, java.awt.image.ColorModel cm, boolean onebit)
           
 
Method Summary
protected  void addWaitingConsumer(java.awt.image.ImageConsumer consumer)
           
 void getRectanglePacked(int x, int y, int width, int height, byte[] buffer, int offset, int scansize)
           
 void getRowPacked(int y, byte[] 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 sendRectanglePacked(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 setRowPacked(int y, byte[] pixels, int offset)
           
 
Methods inherited from class com.sun.jimi.core.raster.MemoryByteRasterImage
asByteArray, getAppropriateColorModel, getPixel, getPixelRGB, getRectangle, getRectangleRGB, getRow, getRowRGB, setRow, storePixel, storeRectangle, storeRow
 
Methods inherited from class com.sun.jimi.core.raster.JimiRasterImageSupport
addConsumer, addDirectConsumer, 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
 

Field Detail

pixelBuffer

protected byte[] pixelBuffer

rowUnpackedBuffer

protected byte[] rowUnpackedBuffer

rowByteWidth

protected int rowByteWidth
Constructor Detail

OneshotByteRasterImage

public OneshotByteRasterImage(int width,
                              int height,
                              java.awt.image.ColorModel cm,
                              boolean onebit)
Method Detail

initStorage

protected void initStorage()
                    throws JimiException
Overrides:
initStorage in class MemoryByteRasterImage

setRectangle

public void setRectangle(int x,
                         int y,
                         int width,
                         int height,
                         byte[] pixels,
                         int offset,
                         int scansize)
                  throws ImageAccessException
Overrides:
setRectangle in class MemoryByteRasterImage

setPixel

public void setPixel(int x,
                     int y,
                     byte value)
              throws ImageAccessException
Overrides:
setPixel in class MemoryByteRasterImage

sendRectangle

protected void sendRectangle(int x,
                             int y,
                             int width,
                             int height,
                             byte[] pixels,
                             int offset,
                             int scansize)
Overrides:
sendRectangle in class MemoryByteRasterImage

sendRow

protected void sendRow(int y,
                       byte[] pixels,
                       int offset)
Overrides:
sendRow in class MemoryByteRasterImage

sendPixel

protected void sendPixel(int x,
                         int y,
                         byte value)
Overrides:
sendPixel in class MemoryByteRasterImage

setRectanglePacked

public void setRectanglePacked(int x,
                               int y,
                               int width,
                               int height,
                               byte[] pixels,
                               int offset,
                               int scansize)
                        throws ImageAccessException
Overrides:
setRectanglePacked in class MemoryByteRasterImage

setRowPacked

public void setRowPacked(int y,
                         byte[] pixels,
                         int offset)
                  throws ImageAccessException
Overrides:
setRowPacked in class MemoryByteRasterImage

getRectanglePacked

public void getRectanglePacked(int x,
                               int y,
                               int width,
                               int height,
                               byte[] buffer,
                               int offset,
                               int scansize)
                        throws ImageAccessException
Overrides:
getRectanglePacked in class MemoryByteRasterImage

getRowPacked

public void getRowPacked(int y,
                         byte[] buffer,
                         int offset)
                  throws ImageAccessException
Overrides:
getRowPacked in class MemoryByteRasterImage

sendRectanglePacked

protected void sendRectanglePacked(int x,
                                   int y,
                                   int width,
                                   int height,
                                   byte[] pixels,
                                   int offset,
                                   int scansize)
                            throws ImageAccessException

addWaitingConsumer

protected void addWaitingConsumer(java.awt.image.ImageConsumer consumer)
Overrides:
addWaitingConsumer in class JimiRasterImageSupport

sendToConsumerFully

protected void sendToConsumerFully(java.awt.image.ImageConsumer consumer)
                            throws ImageAccessException
Overrides:
sendToConsumerFully in class MemoryByteRasterImage

sendRegionToConsumerFully

protected void sendRegionToConsumerFully(java.awt.image.ImageConsumer consumer,
                                         java.awt.Rectangle region)
                                  throws ImageAccessException
Overrides:
sendRegionToConsumerFully in class MemoryByteRasterImage