Package ru.snake.spritepacker.core

Examples of ru.snake.spritepacker.core.Texture


    return true;
  }

  private Sprite createSprite(int width, int height, boolean crop,
      TextureLoader textureLoader, BufferedImage image, String namer) {
    Texture texture;
    Point offset;

    if (crop) {
      offset = new Point();
View Full Code Here


    return value instanceof Texture;
  }

  @Override
  protected void updateIcon(Object value) {
    Texture texture = (Texture) value;
    Icon textureIcon = getTextureIcon(texture);

    icon.setIcon(textureIcon);
  }
View Full Code Here

    icon.setIcon(textureIcon);
  }

  @Override
  protected void updateText(Object value) {
    Texture texture = (Texture) value;
    RenderedImage image = texture.image;

    label.setText(String.format(TEXTURE_NAME_FORMAT, image.getWidth(),
        image.getHeight()));
  }
View Full Code Here

  }

  @Override
  protected void updateIcon(Object value) {
    Sprite sprite = (Sprite) value;
    Texture texture = sprite.texture;
    Icon textureIcon = getTextureIcon(texture);

    icon.setIcon(textureIcon);
  }
View Full Code Here

    if (!(value instanceof Texture)) {
      return;
    }

    Texture texture = (Texture) value;

    factory.setActiveTexture(texture);
  }
View Full Code Here

    setIcon(ICON_NAME, false);
  }

  @Override
  public void actionPerformed(ActionEvent e) {
    Texture texture = factory.getActiveTexture();

    if (texture == null) {
      Dialogs.warning(parent,
          Messages.getString("RemoveTextureAction.NO_TEXTURE")); //$NON-NLS-1$
View Full Code Here

    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

    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

          continue;
        }

        int offsetx = (Integer) offsxselected;
        int offsety = (Integer) offsyselected;
        Texture texture = (Texture) texselected;

        Sprite sptere = new Sprite(offsetx, offsety, spritename,
            texture);

        factory.addSprite(animation, sptere);
View Full Code Here

TOP

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

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.