Package ru.snake.spritepacker.core

Examples of ru.snake.spritepacker.core.TextureLoader


    factory.setPreference(PROP_GAP_Y, String.valueOf(propGapY));
    factory.setPreference(PROP_CROP, String.valueOf(propCrop));
    factory.setPreference(PROP_TRANSPARENT, String.valueOf(propTransparent));
    factory.setPreference(PROP_COLORED, String.valueOf(propColored));

    TextureLoader textureLoader = factory.getTextureLoader();
    List<Sprite> sprites = new ArrayList<Sprite>();
    Point current = new Point(0, propOffsetY);

    while (current.y + propHeight < image.getHeight()) {
      current.x = propOffsetX;
View Full Code Here


  }

  private void importAsIs(File[] images) {
    List<Sprite> spritelist = new ArrayList<Sprite>(images.length);

    TextureLoader textureLoader = factory.getTextureLoader();

    for (File each : images) {
      Texture texture = textureLoader.load(each);

      if (texture == null) {
        continue;
      }
View Full Code Here

  private void importCropped(File[] images) {
    List<Sprite> spritelist = new ArrayList<Sprite>(images.length);
    List<Point> offsetlist = new ArrayList<Point>(images.length);

    TextureLoader textureLoader = factory.getTextureLoader();

    for (File each : images) {
      Point point = new Point();
      Texture texture = textureLoader.loadCroped(each, point);

      if (texture == null) {
        continue;
      }
View Full Code Here

    if (file == null) {
      return;
    }

    TextureLoader textureLoader = factory.getTextureLoader();

    if (Dialogs.confirm(parent,
        Messages.getString("ImportTextureAction.MESSAGE"))) { //$NON-NLS-1$
      textureLoader.loadCroped(file);
    } else {
      textureLoader.load(file);
    }
  }
View Full Code Here

TOP

Related Classes of ru.snake.spritepacker.core.TextureLoader

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.