com.sun.jimi.core.raster
Class MemoryBitRasterImage

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

public class MemoryBitRasterImage
extends JimiRasterImageSupport
implements BitRasterImage

One-bit-per-pixel packed image representation.


Field Summary
protected  byte[] imageData
           
protected  byte[] pixelBuffer
           
protected  byte[] rowBuffer
           
protected  int rowByteWidth
           
protected  byte[] rowUnpackedBuffer
           
 
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
MemoryBitRasterImage(int width, int height, java.awt.image.ColorModel cm)
           
 
Method Summary
 byte[] asByteArray()
           
 java.awt.image.ColorModel getColorModel()
           
 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)
           
 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 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)
           
protected  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 storeRectanglePacked(int x, int y, int width, int height, byte[] pixels, int offset, int scansize)
           
 
Methods inherited from class com.sun.jimi.core.raster.JimiRasterImageSupport
addConsumer, addDirectConsumer, addWaitingConsumer, catchupConsumer, getAppropriateColorModel, getChannelRectangle, getChannelRow, 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

imageData

protected byte[] imageData

pixelBuffer

protected byte[] pixelBuffer

rowBuffer

protected byte[] rowBuffer

rowUnpackedBuffer

protected byte[] rowUnpackedBuffer

rowByteWidth

protected int rowByteWidth
Constructor Detail

MemoryBitRasterImage

public MemoryBitRasterImage(int width,
                            int height,
                            java.awt.image.ColorModel cm)
Method Detail

initStorage

protected void initStorage()
                    throws JimiException

getColorModel

public java.awt.image.ColorModel getColorModel()
Overrides:
getColorModel in class JimiRasterImageSupport

setRectangle

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

sendRectangle

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

storeRectangle

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

setRow

public void setRow(int y,
                   byte[] pixels,
                   int offset)
            throws ImageAccessException

setPixel

public void setPixel(int x,
                     int y,
                     byte value)
              throws ImageAccessException

sendPixel

protected void sendPixel(int x,
                         int y,
                         byte value)

storePixel

protected void storePixel(int x,
                          int y,
                          byte value)
                   throws ImageAccessException

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

getRow

public void getRow(int y,
                   byte[] buffer,
                   int offset)
            throws ImageAccessException

getPixel

public byte getPixel(int x,
                     int y)
              throws ImageAccessException

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

storeRectanglePacked

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

sendRectanglePacked

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

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)
Overrides:
sendToConsumerFully in class JimiRasterImageSupport

sendRegionToConsumerFully

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

asByteArray

public byte[] asByteArray()