Class SVGPath

All Implemented Interfaces:
Styleable, EventTarget

public 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 property fillRule.
      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
    • getFillRule

      public final FillRule getFillRule()
      Gets the value of the property fillRule.
      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
    • 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
      See Also:
      getFillRule(), setFillRule(FillRule)
    • setContent

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

      public final String getContent()
      Gets the value of the property content.
      Property description:
      Defines the SVG Path encoded string as specified at: http://www.w3.org/TR/SVG/paths.html.
      Default value:
      empty string
    • 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
      See Also:
      getContent(), setContent(String)
    • 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.