Class Mask
java.lang.Object
zombie.core.textures.Mask
- All Implemented Interfaces:
Serializable, Cloneable
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMask(boolean[] mask1, int maskW, int maskH, int x, int y, int width, int height) Mask(int width, int height) Creates a new instance of Mask.Creates a new instance of Mask from a textureMask(BooleanGrid mask1, int x, int y, int width, int height) Mask(ITexture texture, BooleanGrid mask) -
Method Summary
-
Constructor Details
-
Mask
public Mask(int width, int height) Creates a new instance of Mask. The Mask will be maked fully- Parameters:
width- height of maskthis- width of mask
-
Mask
-
Mask
-
Mask
public Mask(boolean[] mask1, int maskW, int maskH, int x, int y, int width, int height) -
Mask
-
Mask
-
Mask
-
Mask
-
Mask
-
-
Method Details
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
isSubMask
public boolean isSubMask() -
getOffsetX
public int getOffsetX() -
getOffsetY
public int getOffsetY() -
clone
-
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- coordinatey- coordinateval- new value
-
get
public boolean get(int x, int y) -
save
-