Class CssGradientUtil
java.lang.Object
com.itextpdf.styledxmlparser.css.util.CssGradientUtil
Utilities class for CSS gradient functions parsing.
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisCssLinearGradientValue(String cssValue) Checks whether the provided value is a linear gradient or repeating linear gradient function.parseCssLinearGradient(String cssGradientValue, float emValue, float remValue) Parses the provided linear gradient or repeating linear gradient function
-
Method Details
-
isCssLinearGradientValue
Checks whether the provided value is a linear gradient or repeating linear gradient function. This method does not check the validity of arguments list.- Parameters:
-
cssValue- the value to check - Returns:
-
trueif the provided argument is the linear gradient or repeating linear gradient function (even if the arguments list is invalid)
-
parseCssLinearGradient
public static StrategyBasedLinearGradientBuilder parseCssLinearGradient(String cssGradientValue, float emValue, float remValue) Parses the provided linear gradient or repeating linear gradient function- Parameters:
-
cssGradientValue- the value to parse -
emValue- the current element's em value -
remValue- the current element's rem value - Returns:
-
the
StrategyBasedLinearGradientBuilderconstructed from the parsed linear gradient ornullif the argument value is not a linear gradient or repeating linear gradient function - Throws:
-
StyledXMLParserException- if the provided argument is a linear gradient or repeating linear gradient function, but the arguments list is invalid
-