public class GridSheet.CellRaster.CImage
extends java.lang.Object
implements java.awt.image.ImageObserver
GridSheet.CellRaster that manages Images with Midas colors| Modifier and Type | Field and Description |
|---|---|
java.awt.image.ColorModel |
colormodel
Image ColorModel, see setColors(..)
|
int |
h
image height
|
java.awt.Image |
image
The image
|
java.awt.image.MemoryImageSource |
source
image Source
|
int |
w
image width
|
| Constructor and Description |
|---|
CImage(java.awt.Graphics g,
int width,
int height,
byte[] buf,
java.awt.Color[] colors)
CImage Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
draw(java.awt.Graphics g,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2)
Calls
Graphics.drawImage(Image, int, int, int, int, int, int, int, int, ImageObserver)
to draw a specified area of the image |
boolean |
imageUpdate(java.awt.Image img,
int infoflags,
int x,
int y,
int width,
int height)
Updates a given image, TODO: needs to be implemented
|
void |
setColors(java.awt.Color[] colors)
Sets the Image's color model based on an Array of NeXtMidas colors
|
public java.awt.Image image
public java.awt.image.ColorModel colormodel
public java.awt.image.MemoryImageSource source
public int w
public int h
public CImage(java.awt.Graphics g,
int width,
int height,
byte[] buf,
java.awt.Color[] colors)
g - Graphics context usedwidth - width of the Imageheight - height of the Imagebuf - the array of pixels for the Imagecolors - colors for the Image's color modelpublic void setColors(java.awt.Color[] colors)
colors - Array of Midas Colorspublic void draw(java.awt.Graphics g,
int dx1,
int dy1,
int dx2,
int dy2,
int sx1,
int sy1,
int sx2,
int sy2)
Graphics.drawImage(Image, int, int, int, int, int, int, int, int, ImageObserver)
to draw a specified area of the imageg - Graphics context useddx1 - first x-coordinate of the destinationdy1 - first y-coordinate of the destinationdx2 - second x-coordinate of the destinationdy2 - second y-coordinate of the destinationsx1 - first x-coordinate of the sourcesy1 - first y-coordinate of the sourcesx2 - second x-coordinate of the sourcesy2 - second y-coordinate of the sourcepublic boolean imageUpdate(java.awt.Image img,
int infoflags,
int x,
int y,
int width,
int height)
imageUpdate in interface java.awt.image.ImageObserverimg - Image to be updatedinfoflags - Image info flags (refer to ImageObserver.imageUpdate(Image, int, int, int, int, int))x - x-coordinate for the Imagey - y-coordinate for the Imagewidth - width for the Imageheight - height for the Image