zombie.core.textures
Class Mask

java.lang.Object
  extended by zombie.core.textures.Mask
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Mask
extends java.lang.Object
implements java.io.Serializable, java.lang.Cloneable

Author:
LEMMY
See Also:
Serialized Form

Constructor Summary
Mask(int width, int height)
          Creates a new instance of Mask.
The Mask will be maked fully
Mask(ITexture texture)
           
Mask(ITexture texture, boolean[] mask)
           
Mask(Mask obj)
           
Mask(Texture from, Texture texture, int x, int y, int width, int height)
          Creates a new instance of Mask from a texture
 
Method Summary
 java.lang.Object clone()
           
 void full()
          creates a full-rectangular mask
 boolean get(int x, int y)
           
 void save(java.lang.String name)
           
 void set(int x, int y, boolean val)
          changes the x,y value of the mask
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mask

public Mask(int width,
            int height)
Creates a new instance of Mask.
The Mask will be maked fully

Parameters:
width - width of mask
height - height of mask
See Also:
full()

Mask

public Mask(Texture from,
            Texture texture,
            int x,
            int y,
            int width,
            int height)
Creates a new instance of Mask from a texture

Parameters:
texture - the source texture

Mask

public Mask(ITexture texture,
            boolean[] mask)

Mask

public Mask(ITexture texture)

Mask

public Mask(Mask obj)
Method Detail

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

full

public void full()
creates a full-rectangular mask


set

public void set(int x,
                int y,
                boolean val)
changes the x,y value of the mask

Parameters:
x - coordinate
y - coordinate
val - new value

get

public boolean get(int x,
                   int y)

save

public void save(java.lang.String name)