Class Mask

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

public final class Mask extends Object implements Serializable, Cloneable
See Also:
  • 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 mask
      this - width of mask
    • 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:
      from - the source texture
      texture -
      x -
      y -
      width -
      this -
    • Mask

      public Mask(Mask other, int x, int y, int width, int height)
    • Mask

      public Mask(boolean[] mask1, int maskW, int maskH, int x, int y, int width, int height)
    • Mask

      public Mask(BooleanGrid mask1, int x, int y, int width, int height)
    • Mask

      public Mask(ITexture texture, boolean[] mask)
    • Mask

      public Mask(ITexture texture, BooleanGrid mask)
    • Mask

      public Mask(ITexture texture)
    • Mask

      public Mask(Mask obj)
  • Method Details

    • getWidth

      public int getWidth()
    • getHeight

      public int getHeight()
    • isSubMask

      public boolean isSubMask()
    • getOffsetX

      public int getOffsetX()
    • getOffsetY

      public int getOffsetY()
    • clone

      public Object 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 - coordinate
      y - coordinate
      val - new value
    • get

      public boolean get(int x, int y)
    • save

      public void save(String name)