Class FXSvgPaths

java.lang.Object
org.jhotdraw8.geom.FXSvgPaths

public class FXSvgPaths extends Object
Provides methods for parsing and generating SVG path strings from JavaFX paths.
  • Method Details

    • pathElementsToDoubleSvgString

      public static @NonNull String pathElementsToDoubleSvgString(@NonNull Iterable<javafx.scene.shape.PathElement> elements)
    • pathElementsToFloatSvgString

      public static @NonNull String pathElementsToFloatSvgString(@NonNull Iterable<javafx.scene.shape.PathElement> elements)
    • 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 than SvgPaths.buildSvgString(PathBuilder, String), because PathBuilder does 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 String
      b - the desired bounds
      elems - 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

      public static @NonNull List<javafx.scene.shape.PathElement> transformPathElements(@NonNull List<javafx.scene.shape.PathElement> elements, javafx.scene.shape.FillRule fillRule, javafx.scene.transform.Transform fxT)