Package de.lessvoid.nifty.render.image

Examples of de.lessvoid.nifty.render.image.ImageModeHelper


   * create a RenderImageMode from the given String.
   * @param imageMode imageMode String
   * @return a RenderImageMode
   */
  public static NiftyImageMode valueOf(final String imageMode) {
    String areaProviderProperty = new ImageModeHelper().getAreaProviderProperty(imageMode);
    String renderStrategyProperty = new ImageModeHelper().getRenderStrategyProperty(imageMode);

    return new NiftyImageMode(ImageModeFactory.getSharedInstance().createImageMode(areaProviderProperty,
        renderStrategyProperty));
  }
View Full Code Here


  }

  private NiftyImage loadImage(final String name, final Nifty nifty, final EffectProperties parameter) {
    NiftyImage image = nifty.getRenderEngine().createImage(parameter.getProperty(name), false);

    String areaProviderProperty = new ImageModeHelper().getAreaProviderProperty(parameter);
    String renderStrategyProperty = new ImageModeHelper().getRenderStrategyProperty(parameter);
    if ((areaProviderProperty != null) || (renderStrategyProperty != null)) {
      image.setImageMode(ImageModeFactory.getSharedInstance().createImageMode(areaProviderProperty,
          renderStrategyProperty));
    }
View Full Code Here

  private boolean activeBeforeStartDelay; // this will render the effect even when using a startDelay value so that it will already render before the startDelay

  public void activate(final Nifty nifty, final Element element, final EffectProperties parameter) {
    image = nifty.getRenderEngine().createImage(parameter.getProperty("filename"), false);

    String areaProviderProperty = new ImageModeHelper().getAreaProviderProperty(parameter);
    String renderStrategyProperty = new ImageModeHelper().getRenderStrategyProperty(parameter);
    if ((areaProviderProperty != null) || (renderStrategyProperty != null)) {
      image.setImageMode(ImageModeFactory.getSharedInstance().createImageMode(areaProviderProperty,
          renderStrategyProperty));
    }
View Full Code Here

  private Pulsator pulsater;

  public void activate(final Nifty nifty, final Element element, final EffectProperties parameter) {
    image = nifty.getRenderEngine().createImage(parameter.getProperty("filename"), true);

    String areaProviderProperty = new ImageModeHelper().getAreaProviderProperty(parameter);
    String renderStrategyProperty = new ImageModeHelper().getRenderStrategyProperty(parameter);
    if ((areaProviderProperty != null) || (renderStrategyProperty != null)) {
      image.setImageMode(ImageModeFactory.getSharedInstance().createImageMode(areaProviderProperty,
          renderStrategyProperty));
    }
View Full Code Here

          attributes.getAsBoolean("filter", Convert.DEFAULT_IMAGE_FILTER));
    if (image == null) {
      return;
    }
   
  String areaProviderProperty = new ImageModeHelper().getAreaProviderProperty(attributes.getAttributes());
  String renderStrategyProperty = new ImageModeHelper().getRenderStrategyProperty(attributes.getAttributes());
    ImageMode imageMode = convert.imageMode(areaProviderProperty, renderStrategyProperty);

    image.setImageMode(imageMode);
    imageRenderer.setImage(image);
  }
View Full Code Here

          attributes.getAsBoolean("filter", Convert.DEFAULT_IMAGE_FILTER));
    if (image == null) {
      return;
    }

  String areaProviderProperty = new ImageModeHelper().getAreaProviderProperty(attributes.getAttributes());
  String renderStrategyProperty = new ImageModeHelper().getRenderStrategyProperty(attributes.getAttributes());
    ImageMode imageMode = convert.imageMode(areaProviderProperty, renderStrategyProperty);

    image.setImageMode(imageMode);
    imageRenderer.setImage(image);
   
View Full Code Here

   */
  @Override
  public void execute(Element element, float effectTime, Falloff falloff,
      NiftyRenderEngine r) {
    NiftyImage image = element.getRenderer(ImageRenderer.class).getImage();
    String areaProviderProperty = new ImageModeHelper()
        .getAreaProviderProperty("sprite:" + spriteWidth + "," + spriteHeight + ","
            + spriteNo);
    String renderStrategyProperty = new ImageModeHelper()
        .getRenderStrategyProperty("sprite:" + spriteWidth + "," + spriteHeight
            + "," + spriteNo);
    image.setImageMode(ImageModeFactory.getSharedInstance()
        .createImageMode(areaProviderProperty, renderStrategyProperty));
    element.getRenderer(ImageRenderer.class).setImage(image);
View Full Code Here

    int progressFreeValue = imageHeight - pixelHeight;

    NiftyImage image = progressElement.getRenderer(ImageRenderer.class)
        .getImage();
    String areaProviderProperty = new ImageModeHelper()
        .getAreaProviderProperty("subImage:0," + progressFreeValue
            + ",27," + pixelHeight);
    String renderStrategyProperty = new ImageModeHelper()
        .getRenderStrategyProperty("subImage:0," + progressFreeValue
            + ",27," + pixelHeight);
    image.setImageMode(ImageModeFactory.getSharedInstance()
        .createImageMode(areaProviderProperty, renderStrategyProperty));
    progressElement.getRenderer(ImageRenderer.class).setImage(image);
View Full Code Here

TOP

Related Classes of de.lessvoid.nifty.render.image.ImageModeHelper

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.