Package org.newdawn.slick

Examples of org.newdawn.slick.SlickException


      loadChildren(root, Transform
          .createTranslateTransform(0, -docHeight));

      return diagram;
    } catch (Exception e) {
      throw new SlickException("Failed to load inkscape document", e);
    }
  }
View Full Code Here


  public static void write(Image image, String format, OutputStream out, boolean writeAlpha) throws SlickException {
    try {
      ImageWriter writer = ImageWriterFactory.getWriterForFormat(format);
      writer.saveImage(image, format, out, writeAlpha);
    } catch (IOException e) {
      throw new SlickException("Unable to write out the image in format: "+format, e);
    }
  }
View Full Code Here

   */
  public static void write(Image image, String dest, boolean writeAlpha) throws SlickException {
    try {
      int ext = dest.lastIndexOf('.');
      if (ext < 0) {
        throw new SlickException("Unable to determine format from: "+dest);
      }
     
      String format = dest.substring(ext+1);
      write(image, format, new FileOutputStream(dest), writeAlpha);
    } catch (IOException e) {
      throw new SlickException("Unable to write to the destination: "+dest, e);
    }
  }
View Full Code Here

   */
  public static void write(Image image, String format, String dest, boolean writeAlpha) throws SlickException {
    try {
      write(image, format, new FileOutputStream(dest), writeAlpha);
    } catch (IOException e) {
      throw new SlickException("Unable to write to the destination: "+dest, e);
    }
  }
View Full Code Here

    writer = (ImageWriter) writers.get(format.toUpperCase());
    if (writer != null) {
      return writer;
    }
   
    throw new SlickException("No image writer available for: "+format);
  }
View Full Code Here

    container.setShowFPS(false);

    try {
      dataMap = new DataMap("testdata/map.dat");
    } catch (IOException e) {
      throw new SlickException("Failed to load map data", e);
    }
    builder = new NavMeshBuilder();
    navMesh = builder.build(dataMap);
   
    System.out.println("Navmesh shapes: "+navMesh.getSpaceCount());
View Full Code Here

      for (int i = 0; i < 5; i++) {
        // a single duplicate of the first emitter is created here
        ConfigurableEmitter newOne = explosionEmitter.duplicate();
        // we might get null as a result - protect against that
        if (newOne == null)
          throw new SlickException("Failed to duplicate explosionEmitter");
        // give the new emitter a new unique name
        newOne.name = newOne.name + "_" + i;
        // place it somewhere on a row below the original emitter
        newOne.setPosition((i+1)* (800/6), 400);
        // and add it to the original particle system to get the new emitter updated and rendered
        explosionSystem.addEmitter(newOne);
      }
    } catch (IOException e) {
      throw new SlickException("Failed to load particle systems", e);
    }
  }
View Full Code Here

    try {
      fire = ParticleIO.loadConfiguredSystem("testdata/system.xml");
      trail = ParticleIO.loadConfiguredSystem("testdata/smoketrail.xml");
     
    } catch (IOException e) {
      throw new SlickException("Failed to load particle systems", e);
    }
    image = new Image("testdata/rocket.png");
 
    spawnRocket();
  }
View Full Code Here

TOP

Related Classes of org.newdawn.slick.SlickException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.