Module com.github.weisj.jsvg
Class DefaultPaintParser
java.lang.Object
com.github.weisj.jsvg.attributes.paint.DefaultPaintParser
- All Implemented Interfaces:
PaintParser
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from interface com.github.weisj.jsvg.attributes.paint.PaintParser
DEFAULT_COLOR
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate int
charToColorInt
(char c) @Nullable Color
parseColor
(@NotNull String value, @NotNull AttributeNode node) private int
parseColorComponent
(String value, boolean percentage, @NotNull AttributeParser parser) private int
parseHex
(char[] chars) @Nullable SVGPaint
parsePaint
(@Nullable String value, @NotNull AttributeNode node)
-
Field Details
-
LOGGER
-
-
Constructor Details
-
DefaultPaintParser
public DefaultPaintParser()
-
-
Method Details
-
parseColor
@Nullable public @Nullable Color parseColor(@NotNull @NotNull String value, @NotNull @NotNull AttributeNode node) - Specified by:
parseColor
in interfacePaintParser
-
parsePaint
@Nullable public @Nullable SVGPaint parsePaint(@Nullable @Nullable String value, @NotNull @NotNull AttributeNode node) - Specified by:
parsePaint
in interfacePaintParser
-
parseColorComponent
private int parseColorComponent(String value, boolean percentage, @NotNull @NotNull AttributeParser parser) -
parseHex
private int parseHex(char[] chars) -
charToColorInt
private int charToColorInt(char c)
-