java.lang.Object
org.jhotdraw8.geom.FXSvgPaths
Provides methods for parsing and generating SVG path strings from JavaFX paths.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T extends PathBuilder<?>>
@NonNull TbuildFromPathElements(@NonNull T builder, @NonNull Iterable<javafx.scene.shape.PathElement> pathElements) doubleSvgStringFromPathElements(@NonNull List<javafx.scene.shape.PathElement> elements) floatSvgStringFromPathElements(@NonNull List<javafx.scene.shape.PathElement> elements) This parser preserves more of the semantics thanSvgPaths.svgStringToBuilder(String, PathBuilder), becausePathBuilderdoes not understand relative path commands and horizontal and vertical lineto commands.static voidreshapePathElements(String pathstr, @NonNull javafx.geometry.Bounds b, List<javafx.scene.shape.PathElement> elems) Fits the specified SVGPath into the given bounds.svgStringFromPathElements(@NonNull List<javafx.scene.shape.PathElement> elements, NumberConverter nb) transformPathElements(@NonNull List<javafx.scene.shape.PathElement> elements, javafx.scene.shape.FillRule fillRule, javafx.scene.transform.Transform fxT)
-
Method Details
-
doubleSvgStringFromPathElements
-
floatSvgStringFromPathElements
-
svgStringFromPathElements
public static @NonNull String svgStringFromPathElements(@NonNull List<javafx.scene.shape.PathElement> elements, NumberConverter nb) -
pathElementsFromSvgString
public static @NonNull List<javafx.scene.shape.PathElement> pathElementsFromSvgString(@NonNull String str) throws ParseException This parser preserves more of the semantics thanSvgPaths.svgStringToBuilder(String, PathBuilder), becausePathBuilderdoes not understand relative path commands and horizontal and vertical lineto commands.- Throws:
ParseException
-
reshapePathElements
public static void reshapePathElements(String pathstr, @NonNull javafx.geometry.Bounds b, List<javafx.scene.shape.PathElement> elems) Fits the specified SVGPath into the given bounds.- Parameters:
pathstr- an SVGPath Stringb- the desired boundselems- on output contains the reshaped path elements
-
buildFromPathElements
public static <T extends PathBuilder<?>> @NonNull T buildFromPathElements(@NonNull T builder, @NonNull Iterable<javafx.scene.shape.PathElement> pathElements) -
transformPathElements
-