org.newdawn.slick
Class PackedSpriteSheet

java.lang.Object
  extended by org.newdawn.slick.PackedSpriteSheet

public class PackedSpriteSheet
extends java.lang.Object

A sprite sheet packed and defined by the Pacific Software Image Packer available from: http://homepage.ntlworld.com/config/imagepacker/

Author:
kevin

Constructor Summary
PackedSpriteSheet(java.lang.String def)
          Create a new packed sprite sheet based on a ImagePacker definition file
PackedSpriteSheet(java.lang.String def, Color trans)
          Create a new packed sprite sheet based on a ImagePacker definition file
PackedSpriteSheet(java.lang.String def, int filter)
          Create a new packed sprite sheet based on a ImagePacker definition file
PackedSpriteSheet(java.lang.String def, int filter, Color trans)
          Create a new packed sprite sheet based on a ImagePacker definition file
 
Method Summary
 Image getFullImage()
          Get the full image contaning all the sprites/sections
 Image getSprite(java.lang.String name)
          Get a single named sprite from the sheet
 SpriteSheet getSpriteSheet(java.lang.String name)
          Get a sprite sheet that has been packed into the greater image
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PackedSpriteSheet

public PackedSpriteSheet(java.lang.String def)
                  throws SlickException
Create a new packed sprite sheet based on a ImagePacker definition file

Parameters:
def - The location of the definition file to read
Throws:
SlickException - Indicates a failure to read the definition file

PackedSpriteSheet

public PackedSpriteSheet(java.lang.String def,
                         Color trans)
                  throws SlickException
Create a new packed sprite sheet based on a ImagePacker definition file

Parameters:
def - The location of the definition file to read
trans - The color to be treated as transparent
Throws:
SlickException - Indicates a failure to read the definition file

PackedSpriteSheet

public PackedSpriteSheet(java.lang.String def,
                         int filter)
                  throws SlickException
Create a new packed sprite sheet based on a ImagePacker definition file

Parameters:
def - The location of the definition file to read
filter - The image filter to use when loading the packed sprite image
Throws:
SlickException - Indicates a failure to read the definition file

PackedSpriteSheet

public PackedSpriteSheet(java.lang.String def,
                         int filter,
                         Color trans)
                  throws SlickException
Create a new packed sprite sheet based on a ImagePacker definition file

Parameters:
def - The location of the definition file to read
filter - The image filter to use when loading the packed sprite image
trans - The color to be treated as transparent
Throws:
SlickException - Indicates a failure to read the definition file
Method Detail

getFullImage

public Image getFullImage()
Get the full image contaning all the sprites/sections

Returns:
The full image containing all the sprites/sections

getSprite

public Image getSprite(java.lang.String name)
Get a single named sprite from the sheet

Parameters:
name - The name of the sprite to retrieve
Returns:
The sprite requested (image of)

getSpriteSheet

public SpriteSheet getSpriteSheet(java.lang.String name)
Get a sprite sheet that has been packed into the greater image

Parameters:
name - The name of the sprite sheet to retrieve
Returns:
The sprite sheet from the packed sheet


Copyright © 2006 New Dawn Software. All Rights Reserved.