Package railo.runtime.img.filter.LightFilter

Examples of railo.runtime.img.filter.LightFilter.Material


    if(value instanceof LightFilter.Material)
      return (LightFilter.Material) value;
   
    Struct sct = Caster.toStruct(value,null);
    if(sct!=null){
      Material material = new LightFilter.Material();
      material.setDiffuseColor(toColorRGB(sct.get("color"), argName+".color"));
      material.setOpacity(Caster.toFloatValue(sct.get("opacity")));
      return material;
    }
    String str = Caster.toString(value,null);
    if(str!=null){
      String[] arr = ListUtil.listToStringArray(str, ',');
      if(arr.length==2) {
        Material material = new LightFilter.Material();
        material.setDiffuseColor(toColorRGB(arr[0], argName+"[1]"));
        material.setOpacity(Caster.toFloatValue(arr[1]));
        return material;
      }
      throw new FunctionException(ThreadLocalPageContext.get(), "ImageFilter", 3, "parameters", "use the following format [color,opacity]");
     
    }
View Full Code Here

TOP

Related Classes of railo.runtime.img.filter.LightFilter.Material

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.