artofillusion.procedural
Class ImageModule

java.lang.Object
  extended by artofillusion.procedural.Module
      extended by artofillusion.procedural.ImageModule

public class ImageModule
extends Module

This is a Module which outputs an image.


Field Summary
static int HLS_MODEL
           
static int HSV_MODEL
           
static int RGB_MODEL
           
 
Fields inherited from class artofillusion.procedural.Module
linkFrom, linkFromIndex
 
Constructor Summary
ImageModule(java.awt.Point position)
           
 
Method Summary
 void calcSize()
          Calculate the size on the screen of this module.
 Module duplicate()
          Create a duplicate of this module.
 boolean edit(ProcedureEditor editor, Scene theScene)
          Allow the user to set a new value.
 double getAverageValue(int which, double blur)
          Get the value of one of the components.
 void getColor(int which, RGBColor c, double blur)
          Calculate the color.
 int getColorModel()
          Get the color model to output (RGB, HSV, or HLS).
 ImageMap getMap()
          Get the image map used by this module.
 boolean getMirrorX()
          Get whether the image is mirrored in the X direction.
 boolean getMirrorY()
          Get whether the image is mirrored in the Y direction.
 boolean getTileX()
          Get whether the image is tiled in the X direction.
 boolean getTileY()
          Get whether the image is tiled in the Y direction.
 void getValueGradient(int which, Vec3 grad, double blur)
          Get the gradient of one of the components.
 double getXScale()
          Get the X scale.
 double getYScale()
          Get the Y scale.
 void init(PointInfo p)
          New point, so the color will need to be recalculated.
 void readFromStream(java.io.DataInputStream in, Scene theScene)
          Read in the parameters.
 void setColorModel(int model)
          Get the color model to output (RGB, HSV, or HLS).
 void setMap(ImageMap map)
          Set the image map used by this module.
 void setMirrorX(boolean b)
          Set whether the image is mirrored in the X direction.
 void setMirrorY(boolean b)
          Set whether the image is mirrored in the Y direction.
 void setTileX(boolean b)
          Set whether the image is tiled in the X direction.
 void setTileY(boolean b)
          Set whether the image is tiled in the Y direction.
 void setXScale(double scale)
          Set the X scale.
 void setYScale(double scale)
          Set the Y scale.
 void writeToStream(java.io.DataOutputStream out, Scene theScene)
          Write out the parameters.
 
Methods inherited from class artofillusion.procedural.Module
checkFeedback, draw, getBounds, getClickedPort, getInputIndex, getInputPorts, getName, getOutputIndex, getOutputPorts, getValueError, inputConnected, layout, setInput, setPosition
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RGB_MODEL

public static final int RGB_MODEL
See Also:
Constant Field Values

HSV_MODEL

public static final int HSV_MODEL
See Also:
Constant Field Values

HLS_MODEL

public static final int HLS_MODEL
See Also:
Constant Field Values
Constructor Detail

ImageModule

public ImageModule(java.awt.Point position)
Method Detail

getMap

public ImageMap getMap()
Get the image map used by this module.


setMap

public void setMap(ImageMap map)
Set the image map used by this module.


getXScale

public double getXScale()
Get the X scale.


setXScale

public void setXScale(double scale)
Set the X scale.


getYScale

public double getYScale()
Get the Y scale.


setYScale

public void setYScale(double scale)
Set the Y scale.


getTileX

public boolean getTileX()
Get whether the image is tiled in the X direction.


setTileX

public void setTileX(boolean b)
Set whether the image is tiled in the X direction.


getTileY

public boolean getTileY()
Get whether the image is tiled in the Y direction.


setTileY

public void setTileY(boolean b)
Set whether the image is tiled in the Y direction.


getMirrorX

public boolean getMirrorX()
Get whether the image is mirrored in the X direction.


setMirrorX

public void setMirrorX(boolean b)
Set whether the image is mirrored in the X direction.


getMirrorY

public boolean getMirrorY()
Get whether the image is mirrored in the Y direction.


setMirrorY

public void setMirrorY(boolean b)
Set whether the image is mirrored in the Y direction.


getColorModel

public int getColorModel()
Get the color model to output (RGB, HSV, or HLS).


setColorModel

public void setColorModel(int model)
Get the color model to output (RGB, HSV, or HLS).


init

public void init(PointInfo p)
New point, so the color will need to be recalculated.

Overrides:
init in class Module

getColor

public void getColor(int which,
                     RGBColor c,
                     double blur)
Calculate the color.

Overrides:
getColor in class Module

getAverageValue

public double getAverageValue(int which,
                              double blur)
Get the value of one of the components.

Overrides:
getAverageValue in class Module

getValueGradient

public void getValueGradient(int which,
                             Vec3 grad,
                             double blur)
Get the gradient of one of the components.

Overrides:
getValueGradient in class Module

calcSize

public void calcSize()
Description copied from class: Module
Calculate the size on the screen of this module. The default implementation makes it large enough to display the name of the module.

Overrides:
calcSize in class Module

duplicate

public Module duplicate()
Create a duplicate of this module.

Overrides:
duplicate in class Module

edit

public boolean edit(ProcedureEditor editor,
                    Scene theScene)
Allow the user to set a new value.

Overrides:
edit in class Module

writeToStream

public void writeToStream(java.io.DataOutputStream out,
                          Scene theScene)
                   throws java.io.IOException
Write out the parameters.

Overrides:
writeToStream in class Module
Throws:
java.io.IOException

readFromStream

public void readFromStream(java.io.DataInputStream in,
                           Scene theScene)
                    throws java.io.IOException
Read in the parameters.

Overrides:
readFromStream in class Module
Throws:
java.io.IOException


Copyright © 1999-2011 by Peter Eastman.