public class ColorCyclingMemoryImageSource
extends java.awt.image.MemoryImageSource
Constructor and Description |
---|
ColorCyclingMemoryImageSource(int w,
int h,
java.awt.image.ColorModel cm,
byte[] pix,
int off,
int scan)
Constructs an ImageProducer object which uses an array of bytes
to produce data for an Image object.
|
ColorCyclingMemoryImageSource(int w,
int h,
java.awt.image.ColorModel cm,
byte[] pix,
int off,
int scan,
java.util.Hashtable<?,?> props)
Constructs an ImageProducer object which uses an array of bytes
to produce data for an Image object.
|
ColorCyclingMemoryImageSource(int w,
int h,
java.awt.image.ColorModel cm,
int[] pix,
int off,
int scan)
Constructs an ImageProducer object which uses an array of integers
to produce data for an Image object.
|
ColorCyclingMemoryImageSource(int w,
int h,
java.awt.image.ColorModel cm,
int[] pix,
int off,
int scan,
java.util.Hashtable<?,?> props)
Constructs an ImageProducer object which uses an array of integers
to produce data for an Image object.
|
Modifier and Type | Method and Description |
---|---|
void |
addColorCycle(ColorCycle cc) |
void |
addConsumer(java.awt.image.ImageConsumer ic) |
java.awt.image.ColorModel |
getColorModel() |
int |
getHeight() |
java.util.Hashtable |
getProperties() |
int |
getWidth() |
boolean |
isBlendedColorCycling() |
boolean |
isColorCyclingAvailable() |
boolean |
isColorCyclingStarted()
Returns true if color cycling is on.
|
boolean |
isStarted() |
void |
newPixels(byte[] newpix,
java.awt.image.ColorModel newmodel,
int offset,
int scansize) |
void |
newPixels(int[] newpix,
java.awt.image.ColorModel newmodel,
int offset,
int scansize)
Changes to a new int array to hold the pixels for this image.
|
void |
putProperties(java.util.Hashtable props) |
void |
removeConsumer(java.awt.image.ImageConsumer ic) |
void |
setAnimated(boolean b) |
void |
setBlendedColorCycling(boolean newValue) |
void |
setColorCyclingStarted(boolean b)
Starts or stops color cycling.
|
void |
start()
Starts color cycling.
|
void |
stop()
Stops color cycling.
|
java.awt.image.BufferedImage |
toBufferedImage()
Creates a BufferedImage which shares its pixel data with this memory image source.
|
public ColorCyclingMemoryImageSource(int w, int h, java.awt.image.ColorModel cm, byte[] pix, int off, int scan)
w
- the width of the rectangle of pixelsh
- the height of the rectangle of pixelscm
- the specified ColorModel
pix
- an array of pixelsoff
- the offset into the array of where to store the
first pixelscan
- the distance from one row of pixels to the next in
the arrayComponent.createImage(java.awt.image.ImageProducer)
public ColorCyclingMemoryImageSource(int w, int h, java.awt.image.ColorModel cm, byte[] pix, int off, int scan, java.util.Hashtable<?,?> props)
w
- the width of the rectangle of pixelsh
- the height of the rectangle of pixelscm
- the specified ColorModel
pix
- an array of pixelsoff
- the offset into the array of where to store the
first pixelscan
- the distance from one row of pixels to the next in
the arrayprops
- a list of properties that the ImageProducer
uses to process an imageComponent.createImage(java.awt.image.ImageProducer)
public ColorCyclingMemoryImageSource(int w, int h, java.awt.image.ColorModel cm, int[] pix, int off, int scan)
w
- the width of the rectangle of pixelsh
- the height of the rectangle of pixelscm
- the specified ColorModel
pix
- an array of pixelsoff
- the offset into the array of where to store the
first pixelscan
- the distance from one row of pixels to the next in
the arrayComponent.createImage(java.awt.image.ImageProducer)
public ColorCyclingMemoryImageSource(int w, int h, java.awt.image.ColorModel cm, int[] pix, int off, int scan, java.util.Hashtable<?,?> props)
w
- the width of the rectangle of pixelsh
- the height of the rectangle of pixelscm
- the specified ColorModel
pix
- an array of pixelsoff
- the offset into the array of where to store the
first pixelscan
- the distance from one row of pixels to the next in
the arrayprops
- a list of properties that the ImageProducer
uses to process an imageComponent.createImage(java.awt.image.ImageProducer)
public int getWidth()
public int getHeight()
public java.awt.image.ColorModel getColorModel()
public java.util.Hashtable getProperties()
public void newPixels(byte[] newpix, java.awt.image.ColorModel newmodel, int offset, int scansize)
newPixels
in class java.awt.image.MemoryImageSource
public void newPixels(int[] newpix, java.awt.image.ColorModel newmodel, int offset, int scansize)
newPixels
in class java.awt.image.MemoryImageSource
newpix
- the new pixel arraynewmodel
- the specified ColorModel
offset
- the offset into the arrayscansize
- the distance from one row of pixels to the next in
the arrayMemoryImageSource.newPixels(int, int, int, int, boolean)
,
setAnimated(boolean)
public void addColorCycle(ColorCycle cc)
public void addConsumer(java.awt.image.ImageConsumer ic)
addConsumer
in interface java.awt.image.ImageProducer
addConsumer
in class java.awt.image.MemoryImageSource
public void removeConsumer(java.awt.image.ImageConsumer ic)
removeConsumer
in interface java.awt.image.ImageProducer
removeConsumer
in class java.awt.image.MemoryImageSource
public void setAnimated(boolean b)
setAnimated
in class java.awt.image.MemoryImageSource
public void setColorCyclingStarted(boolean b)
public boolean isColorCyclingStarted()
public void start()
public void stop()
public boolean isStarted()
public java.awt.image.BufferedImage toBufferedImage()
public boolean isColorCyclingAvailable()
public void putProperties(java.util.Hashtable props)
public void setBlendedColorCycling(boolean newValue)
public boolean isBlendedColorCycling()