|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object image.Image image.RasterImage
public class RasterImage
Represents a raster Image drawn into a Buffer. Because rotating and scaling arbitrary shapes/images is difficult, we can rasterize, then apply effects. It also allows us to merge images (i.e., overlays) into a single image to make drawing more efficient.
Constructor Summary | |
---|---|
RasterImage(int w,
int h)
Construct a RasterImage with the given width/height |
Method Summary | |
---|---|
java.awt.Graphics2D |
getGraphics()
Get the Graphics2D associated with this RasterImage |
java.awt.Color |
getPixel(int x,
int y)
Get the java.awt.Color of the pixel at the given x/y |
java.lang.String |
getPixelAsString(int x,
int y)
Get a String of the Color pixel at the given x/y. |
int |
height()
Return the height of this Image |
void |
paint(java.awt.Graphics g,
int xx,
int yy)
Draw this image into a Graphics |
void |
setPixel(int x,
int y,
java.awt.Color color)
Set the pixel at the given x/y to the given Color |
void |
setPixel(int x,
int y,
double red,
double green,
double blue)
Set the pixel at the given x/y to the given RGB intensities. |
void |
setPixel(int x,
int y,
double alpha,
double red,
double green,
double blue)
Set the pixel at the given x/y to the given ARGB intensities. |
void |
setPixel(int x,
int y,
int argb)
Set the pixel at the given x/y to the given ARGB integer. |
void |
setPixel(int x,
int y,
int red,
int green,
int blue)
Set the pixel at the given x/y to the given RGB intensities. |
void |
setPixel(int x,
int y,
int alpha,
int red,
int green,
int blue)
Set the pixel at the given x/y to the given ARGB intensities. |
void |
setPixel(int x,
int y,
java.lang.String color)
Set the pixel at the given x/y to the given String Color |
int |
width()
Return the width of this Image |
Methods inherited from class image.Image |
---|
flipHorizontal, flipVertical, overlay, overlay, overlayxy, overlayxy, overlayxy, overlayxy, overlayxy, overlayxy, rasterize, rotate, rotate, toFile, toScene, toWhiteFile, toWhiteScene |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public RasterImage(int w, int h)
Method Detail |
---|
public void paint(java.awt.Graphics g, int xx, int yy)
paint
in class Image
public int width()
width
in class Image
public int height()
height
in class Image
public java.awt.Graphics2D getGraphics()
public java.awt.Color getPixel(int x, int y)
public java.lang.String getPixelAsString(int x, int y)
public void setPixel(int x, int y, java.lang.String color)
public void setPixel(int x, int y, java.awt.Color color)
Color
public void setPixel(int x, int y, int argb)
public void setPixel(int x, int y, int red, int green, int blue)
public void setPixel(int x, int y, int alpha, int red, int green, int blue)
public void setPixel(int x, int y, double red, double green, double blue)
public void setPixel(int x, int y, double alpha, double red, double green, double blue)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |