package org.newdawn.slick.tests; import java.io.IOException; import org.newdawn.slick.AppGameContainer; import org.newdawn.slick.BasicGame; import org.newdawn.slick.GameContainer; import org.newdawn.slick.Graphics; import org.newdawn.slick.Image; import org.newdawn.slick.Input; import org.newdawn.slick.SlickException; import org.newdawn.slick.imageout.ImageOut; import org.newdawn.slick.particles.ParticleIO; import org.newdawn.slick.particles.ParticleSystem; /** * A test for saving images * * @author kevin */ public class ImageOutTest extends BasicGame { /** The game container */ private GameContainer container; /** The fire particle system */ private ParticleSystem fire; /** The graphics context */ private Graphics g; /** The image we're going to use to copy into */ private Image copy; /** The message to display */ private String message; /** * Create a new image rendering test */ public ImageOutTest() { super("Image Out Test"); } /** * @see org.newdawn.slick.BasicGame#init(org.newdawn.slick.GameContainer) */ public void init(GameContainer container) throws SlickException { this.container = container; try { fire = ParticleIO.loadConfiguredSystem("testdata/system.xml"); } catch (IOException e) { throw new SlickException("Failed to load particle systems", e); } copy = new Image(400,300); String[] formats = ImageOut.getSupportedFormats(); message = "Formats supported: "; for (int i=0;i