zombie.core.textures
Class ImageData

java.lang.Object
  extended by zombie.core.textures.ImageData
All Implemented Interfaces:
java.io.Serializable

public class ImageData
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Field Summary
static WrappedBuffer data
          the data of image
 int id
           
 boolean[] mask
           
 
Constructor Summary
ImageData(java.awt.image.BufferedImage image)
           
ImageData(java.io.BufferedInputStream b, boolean bDoMask)
           
ImageData(java.io.BufferedInputStream b, boolean bDoMask, Texture.PZFileformat format)
           
ImageData(int width, int height)
          creates a new empty imageData
ImageData(java.lang.String path)
           
ImageData(TextureID texture, WrappedBuffer bb)
           
 
Method Summary
 WrappedBuffer getData()
           
 int getHeight()
           
 int getHeightHW()
           
 int getWidth()
           
 int getWidthHW()
           
 boolean isSolid()
           
 void Load(java.awt.image.BufferedImage image)
           
 void makeTransp(byte red, byte green, byte blue)
          make the image transparent
 void makeTransp(byte red, byte green, byte blue, byte alpha)
          make the image transparent
 void setData(java.awt.image.BufferedImage image)
           
 void setData(java.awt.image.Raster rasterData)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

public static WrappedBuffer data
the data of image


mask

public boolean[] mask

id

public int id
Constructor Detail

ImageData

public ImageData(TextureID texture,
                 WrappedBuffer bb)

ImageData

public ImageData(java.awt.image.BufferedImage image)

ImageData

public ImageData(java.lang.String path)

ImageData

public ImageData(int width,
                 int height)
creates a new empty imageData

Parameters:
width - the width of imageData
height - the height of imageData
useAlpha - indicates the internal format of image: RGBA or RGB

ImageData

public ImageData(java.io.BufferedInputStream b,
                 boolean bDoMask,
                 Texture.PZFileformat format)

ImageData

public ImageData(java.io.BufferedInputStream b,
                 boolean bDoMask)
Method Detail

Load

public void Load(java.awt.image.BufferedImage image)

getData

public WrappedBuffer getData()

makeTransp

public void makeTransp(byte red,
                       byte green,
                       byte blue)
make the image transparent

Parameters:
red - the red value (0-255)
green - the green value (0-255)
blue - the blue value (0-255)

makeTransp

public void makeTransp(byte red,
                       byte green,
                       byte blue,
                       byte alpha)
make the image transparent

Parameters:
red - the red value (0-255)
green - the green value (0-255)
blue - the blue value (0-255)
alpha - the alpha value that will be setted (0-255)

setData

public void setData(java.awt.image.BufferedImage image)

setData

public void setData(java.awt.image.Raster rasterData)

getHeight

public int getHeight()

getHeightHW

public int getHeightHW()

isSolid

public boolean isSolid()

getWidth

public int getWidth()

getWidthHW

public int getWidthHW()