Class Texture

java.lang.Object
  extended by Texture

public class Texture
extends java.lang.Object

Represents a surface texture. Basically, this should be a rectangle, usually something that is repeated across a surface.


Method Summary
 TextureColumn getColumn(int c)
          Returns a column of this texture.
 int getHeight()
          Returns the height of this texture, in pixels.
 java.awt.Color getMeanColor()
          Returns the average color for this texture.
 int getWidth()
          Returns the width of this texture, in pixels.
static Texture load(java.lang.String filename)
          Creates a texture for the given filename.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getHeight

public int getHeight()
Returns the height of this texture, in pixels.


getWidth

public int getWidth()
Returns the width of this texture, in pixels.


getMeanColor

public java.awt.Color getMeanColor()
Returns the average color for this texture.


getColumn

public TextureColumn getColumn(int c)
Returns a column of this texture. This column may then be mappped onto the screen.


load

public static Texture load(java.lang.String filename)
Creates a texture for the given filename. The filename may be for a GIF or JPEG file.