Class GssFunctions.BaseBlendColors
- java.lang.Object
-
- com.google.common.css.compiler.gssfunctions.GssFunctions.BaseBlendColors
-
- All Implemented Interfaces:
GssFunction
- Direct Known Subclasses:
GssFunctions.BlendColorsHsb,GssFunctions.BlendColorsRgb
- Enclosing class:
- GssFunctions
public abstract static class GssFunctions.BaseBlendColors extends java.lang.Object implements GssFunction
Base implementation of the color blending GSS function. Returns a color half way between the two colors supplied as arguments.
-
-
Constructor Summary
Constructors Constructor Description BaseBlendColors()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract java.lang.Stringblend(java.lang.String startColor, java.lang.String endColor)java.util.List<CssValueNode>getCallResultNodes(java.util.List<CssValueNode> args, ErrorManager errorManager)Returns the string representation in hex format for a color half way in between the two supplied colors.java.lang.StringgetCallResultString(java.util.List<java.lang.String> args)Processes a list of strings as function arguments and returns a string result.java.lang.IntegergetNumExpectedArguments()Returns the number of expected arguments of this GSS function.
-
-
-
Method Detail
-
getNumExpectedArguments
public java.lang.Integer getNumExpectedArguments()
Returns the number of expected arguments of this GSS function.- Specified by:
getNumExpectedArgumentsin interfaceGssFunction- Returns:
- Number of expected arguments
-
getCallResultNodes
public java.util.List<CssValueNode> getCallResultNodes(java.util.List<CssValueNode> args, ErrorManager errorManager)
Returns the string representation in hex format for a color half way in between the two supplied colors.- Specified by:
getCallResultNodesin interfaceGssFunction- Parameters:
args- The list of arguments- Returns:
- The computed color
-
getCallResultString
public java.lang.String getCallResultString(java.util.List<java.lang.String> args) throws GssFunctionExceptionDescription copied from interface:GssFunctionProcesses a list of strings as function arguments and returns a string result. Errors are reported by throwingGssFunctionException.- Specified by:
getCallResultStringin interfaceGssFunction- Throws:
GssFunctionException
-
blend
public abstract java.lang.String blend(java.lang.String startColor, java.lang.String endColor)
-
-