|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartofillusion.image.ImageMap
public abstract class ImageMap
ImageMap represents an image which can be used for texturing an object. The number of components can range from one (monochrome) to four (ARGB). It also provides a scaled down Image object which can be used to preview the image.
This is an abstract class. Subclasses implement specific ways of storing images.
Field Summary | |
---|---|
static int |
PREVIEW_HEIGHT
|
static int |
PREVIEW_WIDTH
|
Constructor Summary | |
---|---|
ImageMap()
|
Method Summary | |
---|---|
abstract float |
getAverageComponent(int component)
Get the average value for a particular component, over the entire image. |
abstract void |
getColor(RGBColor theColor,
boolean wrapx,
boolean wrapy,
double x,
double y,
double xsize,
double ysize)
Get the color at a particular location. |
abstract float |
getComponent(int component,
boolean wrapx,
boolean wrapy,
double x,
double y,
double xsize,
double ysize)
Get the value of a single component at a particular location in the image. |
abstract int |
getComponentCount()
Get the number of components in the image. |
abstract void |
getGradient(Vec2 grad,
int component,
boolean wrapx,
boolean wrapy,
double x,
double y,
double xsize,
double ysize)
Get the gradient of a single component at a particular location in the image. |
abstract int |
getHeight()
Get the height of the image. |
int |
getID()
Get an ID number which is unique (within this session) for this image. |
abstract java.awt.Image |
getPreview()
Get a scaled down copy of the image, to use for previews. |
abstract int |
getWidth()
Get the width of the image. |
static ImageMap |
loadImage(java.io.File file)
Construct an appropriate subclass of ImageMap from an image file. |
abstract void |
writeToStream(java.io.DataOutputStream out)
Write out the object's representation to an output stream. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int PREVIEW_WIDTH
public static final int PREVIEW_HEIGHT
Constructor Detail |
---|
public ImageMap()
Method Detail |
---|
public static ImageMap loadImage(java.io.File file) throws java.lang.Exception
java.lang.Exception
public abstract int getWidth()
public abstract int getHeight()
public abstract int getComponentCount()
public abstract float getComponent(int component, boolean wrapx, boolean wrapy, double x, double y, double xsize, double ysize)
public abstract float getAverageComponent(int component)
public abstract void getColor(RGBColor theColor, boolean wrapx, boolean wrapy, double x, double y, double xsize, double ysize)
public abstract void getGradient(Vec2 grad, int component, boolean wrapx, boolean wrapy, double x, double y, double xsize, double ysize)
public abstract java.awt.Image getPreview()
public int getID()
public abstract void writeToStream(java.io.DataOutputStream out) throws java.io.IOException
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |