java.lang.Object
org.jhotdraw8.css.function.AbstractCssFunction<T>
org.jhotdraw8.draw.css.function.AbstractColorCssFunction<T>
org.jhotdraw8.draw.css.function.LadderCssFunction<T>
- Type Parameters:
T- the element type of the DOM
- All Implemented Interfaces:
CssFunction<T>
Processes the ladder() function.
ladder = "ladder(" , s* , color , "," , color-stop , { "," , color-stop } , ")" ;
color = (* a css color *);
color-stop = color , number-or-percentage ;
number-or-percentage = number | percentage ;
The ladder function interpolates between colors.
The effect is as if a gradient is created using the stops provided, and then
the brightness of the provided color is used to index a color value within
that gradient. At 0% brightness, the color at the 0.0 end of the gradient is
used; at 100% brightness, the color at the 1.0 end of the gradient is used;
and at 50% brightness, the color at 0.5, the midway point of the gradient,
is used. Note that no gradient is actually rendered. This is merely an
interpolation function that results in a single color.
References:
- JavaFX CSS Reference Guide.
- oracle.com
-
Field Summary
FieldsFields inherited from class org.jhotdraw8.draw.css.function.AbstractColorCssFunction
converter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionparsePercentageValue(@NonNull T element, @NonNull CssTokenizer tt, CssFunctionProcessor<T> functionProcessor) voidprocess(@NonNull T element, @NonNull CssTokenizer tt, @NonNull SelectorModel<T> model, @NonNull CssFunctionProcessor<T> functionProcessor, @NonNull Consumer<CssToken> out, Deque<CssFunction<T>> recursionStack) Methods inherited from class org.jhotdraw8.draw.css.function.AbstractColorCssFunction
parseColorValue, parseResolvedColorValueMethods inherited from class org.jhotdraw8.css.function.AbstractCssFunction
getName
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
LadderCssFunction
public LadderCssFunction() -
LadderCssFunction
-
-
Method Details
-
process
public void process(@NonNull T element, @NonNull CssTokenizer tt, @NonNull SelectorModel<T> model, @NonNull CssFunctionProcessor<T> functionProcessor, @NonNull Consumer<CssToken> out, Deque<CssFunction<T>> recursionStack) throws IOException, ParseException - Throws:
IOExceptionParseException
-
parsePercentageValue
protected @NonNull CssSize parsePercentageValue(@NonNull T element, @NonNull CssTokenizer tt, CssFunctionProcessor<T> functionProcessor) throws IOException, ParseException - Throws:
IOExceptionParseException
-
getHelpText
-