-
Notifications
You must be signed in to change notification settings - Fork 364
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#493 Suppress warnings about SVG properties not being implemented.
- Loading branch information
Showing
2 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
48 changes: 48 additions & 0 deletions
48
openhtmltopdf-core/src/main/java/com/openhtmltopdf/css/constants/SVGProperty.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
package com.openhtmltopdf.css.constants; | ||
|
||
import java.util.Arrays; | ||
import java.util.Locale; | ||
import java.util.Set; | ||
import java.util.stream.Collectors; | ||
|
||
/** | ||
* This is a partial list of common SVG properties that are not present in | ||
* the HTML renderer of this project. This list is here so we can suppress | ||
* warnings for these properties. | ||
* | ||
* List from: | ||
* https://css-tricks.com/svg-properties-and-css/ | ||
*/ | ||
public enum SVGProperty { | ||
CLIP, | ||
CLIP_PATH, | ||
CLIP_RULE, | ||
MASK, | ||
FILTER, | ||
STOP_COLOR, | ||
STOP_OPACITY, | ||
FILL, | ||
FILL_RULE, | ||
FILL_OPACITY, | ||
MARKER, | ||
MARKER_START, | ||
MARKER_MID, | ||
MARKER_END, | ||
STROKE, | ||
STROKE_DASHARRAY, | ||
STROKE_DASHOFFSET, | ||
STROKE_LINECAP, | ||
STROKE_LINEJOIN, | ||
STROKE_MITERLIMIT, | ||
STROKE_OPACITY, | ||
STROKE_WIDTH; | ||
|
||
private static final Set<String> _set = | ||
Arrays.stream(values()) | ||
.map(v -> v.name().toLowerCase(Locale.US).replace('_', '-')) | ||
.collect(Collectors.toSet()); | ||
|
||
public static Set<String> properties() { | ||
return _set; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters