示例#1
0
 /**
  * Load an image.
  *
  * @param path - Path to image
  * @return Image - The image path is pointing to.
  */
 public static Image load(String path) throws SlickException {
   if (error_img == null) init();
   if (path == null) throw new IllegalArgumentException("Path is null.");
   try {
     return new Image(path);
   } catch (Exception e) {
     System.err.println("There is no image at \"" + path + "\".");
     return error_img;
   }
 }