Class SVGPath

All Implemented Interfaces:
Styleable, EventTarget

public non-sealed class SVGPath extends Shape
The SVGPath class represents a simple shape that is constructed by parsing SVG path data from a String.
import javafx.scene.shape.*;

SVGPath svg = new SVGPath();
svg.setContent("M40,60 C42,48 44,30 25,32");
Since:
JavaFX 2.0
  • Property Details

  • Constructor Details

    • SVGPath

      public SVGPath()
      Creates an empty instance of SVGPath.
  • Method Details

    • setFillRule

      public final void setFillRule(FillRule value)
      Sets the value of the fillRule property.
      Property description:
      Defines the filling rule constant for determining the interior of the path. The value must be one of the following constants: FillRile.EVEN_ODD or FillRule.NON_ZERO. The default value is FillRule.NON_ZERO.
      Default value:
      FillRule.NON_ZERO
      Parameters:
      value - the value for the fillRule property
      See Also:
    • getFillRule

      public final FillRule getFillRule()
      Gets the value of the fillRule property.
      Property description:
      Defines the filling rule constant for determining the interior of the path. The value must be one of the following constants: FillRile.EVEN_ODD or FillRule.NON_ZERO. The default value is FillRule.NON_ZERO.
      Default value:
      FillRule.NON_ZERO
      Returns:
      the value of the fillRule property
      See Also:
    • fillRuleProperty

      public final ObjectProperty<FillRule> fillRuleProperty()
      Defines the filling rule constant for determining the interior of the path. The value must be one of the following constants: FillRile.EVEN_ODD or FillRule.NON_ZERO. The default value is FillRule.NON_ZERO.
      Default value:
      FillRule.NON_ZERO
      Returns:
      the fillRule property
      See Also:
    • setContent

      public final void setContent(String value)
      Sets the value of the content property.
      Property description:
      Defines the SVG Path encoded string as specified at: http://www.w3.org/TR/SVG/paths.html.
      Default value:
      empty string
      Parameters:
      value - the value for the content property
      See Also:
    • getContent

      public final String getContent()
      Gets the value of the content property.
      Property description:
      Defines the SVG Path encoded string as specified at: http://www.w3.org/TR/SVG/paths.html.
      Default value:
      empty string
      Returns:
      the value of the content property
      See Also:
    • contentProperty

      public final StringProperty contentProperty()
      Defines the SVG Path encoded string as specified at: http://www.w3.org/TR/SVG/paths.html.
      Default value:
      empty string
      Returns:
      the content property
      See Also:
    • toString

      public String toString()
      Returns a string representation of this SVGPath object.
      Overrides:
      toString in class Node
      Returns:
      a string representation of this SVGPath object.