ADDITIVE, ANIMATE, ANIMATE_MOTION, ANIMATE_TRANSFORM, ATTRIBUTE_NAME, AZIMUTH, BASELINE_SHIFT, BASELINE_SUB, BASELINE_SUPER, BEGIN, BEVEL, BOLD, BOLDER, BUTT, CIRCLE, CLASS, CLIP_PATH, CLIP_PATH_SPEC, CLIP_PATH_UNITS, CLIP_RULE, CONTEXT_FILL, CONTEXT_STROKE, CX, CY, D, DEFS, DIFFUSE_CONSTANT, DILATE, DUR, DX, DY, ELEVATION, ELLIPSE, END, EVEN_ODD, FE_COMPOSITE, FE_DIFFUSE_LIGHTING, FE_DISTANT_LIGHT, FE_DROP_SHADOW, FE_FLOOD, FE_GAUSSIAN_BLUR, FE_IMAGE, FE_MERGE, FE_MERGE_NODE, FE_MORPHOLOGY, FE_OFFSET, FE_POINT_LIGHT, FE_SPECULAR_LIGHTING, FE_SPOT_LIGHT, FILL, FILL_OPACITY, FILL_RULE, FILTER, FLOOD_COLOR, FLOOD_OPACITY, FONT_FAMILY, FONT_SIZE, FONT_STYLE, FONT_WEIGHT, FROM, FX, FY, G, GRADIENT_TRANSFORM, GRADIENT_UNITS, HEIGHT, HIDDEN, HREF, ID, IMAGE, IN, IN2, INDEFINITE, ITALIC, LIGHTER, LIGHTING_COLOR, LINE, LINE_THROUGH, LINEAR_GRADIENT, MARKER, MARKER_END, MARKER_HEIGHT, MARKER_MID, MARKER_START, MARKER_WIDTH, MASK, MIDDLE, MITER, NON_ZERO, NONE, NORMAL, OBJECT_BOUNDINGBOX, OBLIQUE, OFFSET, OPACITY, OPERATOR, OPERATOR_ARITHMETIC, OPERATOR_ATOP, OPERATOR_IN, OPERATOR_OUT, OPERATOR_OVER, OPERATOR_XOR, ORIENT, ORIENT_AUTO, ORIENT_AUTO_REVERSE, PATH, POINT_AT_X, POINT_AT_Y, POINT_AT_Z, POINTS, POLYGON, POLYLINE, PRESERVE_ASPECT_RATIO, R, RADIAL_GRADIENT, RADIUS, RECT, REFX, REFY, REPEAT_COUNT, RESULT, ROTATE, ROUND, RX, RY, SCALE, SET, SKEW_X, SKEW_Y, SOURCE_ALPHA, SOURCE_GRAPHIC, SPECULAR_CONSTANT, SPECULAR_EXPONENT, SPREAD_METHOD, SPREAD_PAD, SPREAD_REFLECT, SPREAD_REPEAT, SQUARE, START, STD_DEVIATION, STOP, STOP_COLOR, STOP_OPACITY, STROKE, STROKE_DASHARRAY, STROKE_DASHOFFSET, STROKE_LINECAP, STROKE_LINEJOIN, STROKE_MITERLIMIT, STROKE_WIDTH, STYLE, SURFACE_SCALE, SVG, SYMBOL, TEXT, TEXT_ANCHOR, TEXT_DECORATION, TO, TRANSFORM, TRANSLATE, TSPAN, TYPE, UNDERLINE, USE, USERSPACE_ON_USE, VALUES, VIEWBOX, VISIBILITY, VISIBLE, WIDTH, X, X1, X2, XLINK_HREF, Y, Y1, Y2, Z| Modifier and Type | Method and Description |
|---|---|
static java.util.List<javafx.scene.Node> |
createNodeList(javafx.scene.Node node)
Wrap a node into a list when non-null.
|
static javafx.scene.effect.Effect |
expressFilter(java.util.Map<java.lang.String,FilterSpec> filterSpecs,
javafx.scene.Node node,
java.lang.String value)
Apply the appropriate filter on a node.
|
static javafx.scene.paint.Paint |
expressPaint(java.util.Map<java.lang.String,javafx.scene.paint.Paint> gradients,
java.lang.String value)
Resolve a paint value without a context node.
|
static javafx.scene.paint.Paint |
expressPaint(javafx.scene.Node contextNode,
java.util.Map<java.lang.String,javafx.scene.paint.Paint> gradients,
java.lang.String value)
Resolve a paint value, handling context and gradients.
|
static double |
getAngleDegrees(java.lang.String value)
Return an angle value in degrees.
|
static javafx.scene.shape.FillRule |
getClipRule(XMLNode node)
Return the clip rule defined on a node.
|
static javafx.scene.paint.Color |
getColor(java.lang.String value)
Return the color with a specified String value.
|
static javafx.scene.paint.Color |
getColor(java.lang.String value,
double opacity)
Return the color for a value with explicit opacity.
|
static javafx.scene.shape.FillRule |
getFillRule(XMLNode node)
Return the fill rule defined on a node.
|
static javafx.scene.image.Image |
getImage(java.net.URL url,
java.lang.String href,
double width,
double height)
Load an image from a URL or a data URI.
|
static boolean |
getPreserveAspectRatio(java.lang.String value)
Return true if the aspect ratio is preserved.
|
static java.util.Map<java.lang.String,java.lang.String> |
getStyles(XMLNode node)
Extract the style map from a style attribute.
|
static java.lang.String |
getURL(java.lang.String value)
Return the color with a specified String value.
|
static boolean |
hasXPosition(ElementNode node)
Return true if the node specifies an x position.
|
static boolean |
isPercent(XMLNode xmlNode,
java.lang.String attrname)
Return true if the attribute value is expressed as a percent.
|
static java.lang.String |
mergeStyles(java.util.Map<java.lang.String,java.lang.String> styles,
ElementNode node)
Merge a style map with styles from the node and return a style string.
|
static java.util.List<java.lang.Double> |
parseDashArray(java.lang.String value,
Viewport viewport)
Parse a stroke-dasharray attribute into a list of lengths.
|
static double |
parseDoubleProtected(java.lang.String valueS)
Parse a double value with error handling.
|
static java.lang.String |
parseFirstArgument(java.lang.String value)
Return the first token in a space-separated argument list.
|
static double |
parseFontSize(java.lang.String valueS)
Parse a font size value with optional unit conversion.
|
static int |
parseIntProtected(java.lang.String valueS)
Parse an integer value with error handling.
|
static void |
parseLengthValue(java.util.List<java.lang.Double> args,
java.lang.String value,
boolean isWidth,
javafx.geometry.Bounds bounds,
Viewport viewport)
Parse a length value and append it to the list.
|
static double |
parseLengthValue(java.lang.String valueS,
boolean isWidth,
javafx.geometry.Bounds bounds,
Viewport viewport)
Parse a length value.
|
static double |
parseLineWidth(java.lang.String value,
Viewport viewport)
Parse a line width value.
|
static Viewbox |
parseMarkerViewbox(XMLNode xmlNode,
Viewport viewport)
Parse a marker viewbox from marker attributes.
|
static double |
parseOpacity(java.lang.String value)
Parse an opacity value, supporting percent values.
|
static double |
parsePositionValue(java.lang.String valueS,
boolean isWidth,
javafx.geometry.Bounds bounds,
Viewport viewport)
Parse a position value.
|
static Viewbox |
parseViewbox(XMLNode xmlNode,
Viewport viewport)
Parse a viewbox from width/height and viewBox attributes.
|
static Viewport |
parseViewport(XMLNode xmlNode)
Parse the viewport from the root SVG node.
|
static boolean |
parseVisibility(java.lang.String value)
Parse a visibility value.
|
static void |
propagateStyleAttributes(XMLNode parentNode,
XMLNode childNode)
Propagate style attributes from a parent to a child node.
|
static void |
setBaselineShift(javafx.scene.Node node,
java.lang.String value)
Apply a baseline shift to a node or its text children.
|
static void |
setBaselineShift(javafx.scene.text.Text text,
java.lang.String value)
Apply a baseline shift to a text node.
|
static void |
setFillOpacity(javafx.scene.Node node,
double fillOpacity)
Apply a fill opacity override on a node.
|
static void |
setOpacity(javafx.scene.Node node,
ElementNode elementNode)
Apply opacity and fill opacity attributes to a node.
|
static boolean |
setVisibility(javafx.scene.Node node,
ElementNode elementNode)
Apply visibility from an element node to a JavaFX node.
|
public static javafx.scene.paint.Color getColor(java.lang.String value)
value - the color valuepublic static double getAngleDegrees(java.lang.String value)
value - the angle value as a sgringpublic static javafx.scene.image.Image getImage(java.net.URL url,
java.lang.String href,
double width,
double height)
url - the base URLhref - the href valuewidth - the target widthheight - the target heightpublic static java.lang.String getURL(java.lang.String value)
value - the color valuepublic static javafx.scene.paint.Paint expressPaint(javafx.scene.Node contextNode,
java.util.Map<java.lang.String,javafx.scene.paint.Paint> gradients,
java.lang.String value)
contextNode - the context node for context-* paintsgradients - the gradients mapvalue - the paint valuepublic static javafx.scene.paint.Paint expressPaint(java.util.Map<java.lang.String,javafx.scene.paint.Paint> gradients,
java.lang.String value)
gradients - the gradients mapvalue - the paint valuepublic static javafx.scene.shape.FillRule getClipRule(XMLNode node)
node - the XML nodepublic static javafx.scene.shape.FillRule getFillRule(XMLNode node)
node - the XML nodepublic static java.util.List<java.lang.Double> parseDashArray(java.lang.String value,
Viewport viewport)
value - the dash array stringviewport - the viewportpublic static javafx.scene.paint.Color getColor(java.lang.String value,
double opacity)
value - the color valueopacity - the opacitypublic static boolean parseVisibility(java.lang.String value)
value - the visibility valuepublic static double parseOpacity(java.lang.String value)
value - the opacity valuepublic static void setFillOpacity(javafx.scene.Node node,
double fillOpacity)
node - the node to updatefillOpacity - the fill opacitypublic static java.lang.String parseFirstArgument(java.lang.String value)
value - the argument stringpublic static int parseIntProtected(java.lang.String valueS)
valueS - the string valuepublic static double parseDoubleProtected(java.lang.String valueS)
valueS - the string valuepublic static double parseFontSize(java.lang.String valueS)
valueS - the font size stringpublic static double parsePositionValue(java.lang.String valueS,
boolean isWidth,
javafx.geometry.Bounds bounds,
Viewport viewport)
valueS - thre value as a stringisWidth - true if the position represents a widthbounds - the optional bounds of the figure for which it is relative toviewport - the viewportpublic static double parseLengthValue(java.lang.String valueS,
boolean isWidth,
javafx.geometry.Bounds bounds,
Viewport viewport)
valueS - thre value as a stringisWidth - true if the distance represents a widthbounds - the optional bounds of the figure for which it is relative toviewport - the viewportpublic static void parseLengthValue(java.util.List<java.lang.Double> args,
java.lang.String value,
boolean isWidth,
javafx.geometry.Bounds bounds,
Viewport viewport)
args - the list to append tovalue - the length stringisWidth - true if the value represents a widthbounds - the optional boundsviewport - the viewportpublic static double parseLineWidth(java.lang.String value,
Viewport viewport)
value - the line width stringviewport - the viewportpublic static javafx.scene.effect.Effect expressFilter(java.util.Map<java.lang.String,FilterSpec> filterSpecs, javafx.scene.Node node, java.lang.String value)
filterSpecs - the filters specificationsnode - the nodevalue - the filter valuepublic static void setBaselineShift(javafx.scene.Node node,
java.lang.String value)
node - the node to updatevalue - the baseline-shift valuepublic static void setBaselineShift(javafx.scene.text.Text text,
java.lang.String value)
text - the text nodevalue - the baseline-shift valuepublic static boolean hasXPosition(ElementNode node)
node - the element nodepublic static java.util.Map<java.lang.String,java.lang.String> getStyles(XMLNode node)
node - the XML nodepublic static java.lang.String mergeStyles(java.util.Map<java.lang.String,java.lang.String> styles,
ElementNode node)
styles - the base stylesnode - the element nodepublic static void propagateStyleAttributes(XMLNode parentNode, XMLNode childNode)
parentNode - the parent nodechildNode - the child nodepublic static boolean setVisibility(javafx.scene.Node node,
ElementNode elementNode)
node - the JavaFX nodeelementNode - the element nodepublic static void setOpacity(javafx.scene.Node node,
ElementNode elementNode)
node - the JavaFX nodeelementNode - the element nodepublic static Viewport parseViewport(XMLNode xmlNode)
xmlNode - the SVG root nodepublic static boolean getPreserveAspectRatio(java.lang.String value)
value - the attribute valuepublic static Viewbox parseViewbox(XMLNode xmlNode, Viewport viewport)
xmlNode - the XML nodeviewport - the viewportpublic static Viewbox parseMarkerViewbox(XMLNode xmlNode, Viewport viewport)
xmlNode - the XML nodeviewport - the viewportpublic static boolean isPercent(XMLNode xmlNode, java.lang.String attrname)
xmlNode - the XML nodeattrname - the attribute namepublic static java.util.List<javafx.scene.Node> createNodeList(javafx.scene.Node node)
node - the nodeCopyright © 2021, 2022, 2025 Herve Girod. All Rights Reserved. Documentation and source under the BSD 3-Clause licence