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 Summary

    Constructors
    Constructor
    Description
    Mask(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.
    The Mask will be maked fully
    Mask(Mask obj)
     
    Mask(Mask other, int x, int y, int width, int height)
     
    Mask(Texture from, Texture texture, int x, int y, int width, int height)
    Creates a new instance of Mask from a texture
    Mask(BooleanGrid mask1, int maskW, int maskH, int x, int y, int width, int height)
     
    Mask(ITexture texture)
     
    Mask(ITexture texture, boolean[] mask)
     
    Mask(ITexture texture, BooleanGrid mask)
     
  • Method Summary

    Modifier and Type
    Method
    Description
     
    void
    creates a full-rectangular mask
    boolean
    get(int x, int y)
     
    void
    save(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 Details

    • 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:
    • 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(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 maskW, int maskH, 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

    • 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)