Package de.lessvoid.nifty.tools

Examples of de.lessvoid.nifty.tools.Alpha


    if ((areaProviderProperty != null) || (renderStrategyProperty != null)) {
      image.setImageMode(ImageModeFactory.getSharedInstance().createImageMode(areaProviderProperty,
          renderStrategyProperty));
    }

    alpha = new Alpha(parameter.getProperty("alpha", "#f"));
    inset = new SizeValue(parameter.getProperty("inset", "0px"));
    width = new SizeValue(parameter.getProperty("width", element.getWidth() + "px"));
    height = new SizeValue(parameter.getProperty("height", element.getHeight() + "px"));
    center = Boolean.valueOf(parameter.getProperty("center", "false"));
    hideIfNotEnoughSpace = Boolean.valueOf(parameter.getProperty("hideIfNotEnoughSpace", "false"));
View Full Code Here


  public void activate(final Nifty nifty, final Element element, final EffectProperties parameter) {
    // startColor and endColor (only alpha component used) are the old version of this
    // and are kept here only for backward compatibility. The current attributes are "start" and "end" alpha values.
    if (parameter.getProperty("startColor") != null) {
      start = new Alpha(new Color(parameter.getProperty("startColor", "#000000ff")).getAlpha());
    }
    if (parameter.getProperty("endColor") != null) {
      end = new Alpha(new Color(parameter.getProperty("endColor", "#ffffffff")).getAlpha());
    }
    if (parameter.getProperty("start") != null) {
      start = new Alpha(parameter.getProperty("start"));
    }
    if (parameter.getProperty("end") != null) {
      end = new Alpha(parameter.getProperty("end"));
    }
    interpolator = parameter.getInterpolator();
  }
View Full Code Here

      final Falloff falloff,
      final NiftyRenderEngine r) {
    if (interpolator != null) {
      r.setColorAlpha(interpolator.getValue(normalizedTime));
    } else {
      Alpha a = start.linear(end, normalizedTime);
      r.setColorAlpha(a.getAlpha());
    }
  }
View Full Code Here

TOP

Related Classes of de.lessvoid.nifty.tools.Alpha

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.