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 TbuildPathElements(@NonNull T builder, @NonNull Iterable<javafx.scene.shape.PathElement> pathElements) pathElementsToDoubleSvgString(@NonNull Iterable<javafx.scene.shape.PathElement> elements) pathElementsToFloatSvgString(@NonNull Iterable<javafx.scene.shape.PathElement> elements) pathElementsToSvgString(@NonNull Iterable<javafx.scene.shape.PathElement> elements, NumberConverter nb) static voidreshapePathElements(String pathstr, @NonNull javafx.geometry.Bounds b, List<javafx.scene.shape.PathElement> elems) Fits the specified SVGPath into the given bounds.This parser preserves more of the semantics thanSvgPaths.buildSvgString(PathBuilder, String), becausePathBuilderdoes not understand relative path commands and horizontal and vertical lineto commands.transformPathElements(@NonNull List<javafx.scene.shape.PathElement> elements, javafx.scene.shape.FillRule fillRule, javafx.scene.transform.Transform fxT)
-
Method Details
-
pathElementsToDoubleSvgString
-
pathElementsToFloatSvgString
-
pathElementsToSvgString
public static @NonNull String pathElementsToSvgString(@NonNull Iterable<javafx.scene.shape.PathElement> elements, NumberConverter nb) -
svgStringToPathElements
public static @NonNull List<javafx.scene.shape.PathElement> svgStringToPathElements(@NonNull String str) throws ParseException This parser preserves more of the semantics thanSvgPaths.buildSvgString(PathBuilder, String), 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
-
buildPathElements
public static <T extends PathBuilder<?>> @NonNull T buildPathElements(@NonNull T builder, @NonNull Iterable<javafx.scene.shape.PathElement> pathElements) -
transformPathElements
-