|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectartofillusion.image.ImageOrColor
public class ImageOrColor
ImageOrColor represents a color which can potentially vary with position. It provides a Widget with which the user can edit it. They can choose either a single color, or an ImageMap which is then multiplied by a user specified color.
Constructor Summary | |
---|---|
ImageOrColor(java.io.DataInputStream in,
Scene theScene)
The following two methods are used for reading and writing files. |
|
ImageOrColor(RGBColor theColor)
|
|
ImageOrColor(RGBColor scaleColor,
ImageMap theMap)
|
Method Summary | |
---|---|
void |
copy(ImageOrColor obj)
Make this object identical to another one. |
ImageOrColor |
duplicate()
Create a duplicate of this object. |
void |
getAverageColor(RGBColor theColor)
Return the average color over the entire image. |
RGBColor |
getColor()
Get the color by which the image is multiplied. |
void |
getColor(RGBColor theColor,
boolean wrapx,
boolean wrapy,
double x,
double y,
double xsize,
double ysize)
Given a texture coordinate (x and y each between 0 and 1), return the average color of a region of width (xsize, ysize) centered at that location. |
Widget |
getEditingPanel(BFrame parent,
Scene theScene)
Get a Widget with which the user can edit the color. |
ImageMap |
getImage()
Get the image, or null if it is a single color. |
void |
writeToFile(java.io.DataOutputStream out,
Scene theScene)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageOrColor(RGBColor theColor)
public ImageOrColor(RGBColor scaleColor, ImageMap theMap)
public ImageOrColor(java.io.DataInputStream in, Scene theScene) throws java.io.IOException
java.io.IOException
Method Detail |
---|
public ImageMap getImage()
public RGBColor getColor()
public void getColor(RGBColor theColor, boolean wrapx, boolean wrapy, double x, double y, double xsize, double ysize)
public void getAverageColor(RGBColor theColor)
public ImageOrColor duplicate()
public void copy(ImageOrColor obj)
public void writeToFile(java.io.DataOutputStream out, Scene theScene) throws java.io.IOException
java.io.IOException
public Widget getEditingPanel(BFrame parent, Scene theScene)
parent
- a parent BFrame which can be used for displaying dialogstheScene
- the Scene from which to get images
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |