Class SVGPath

All Implemented Interfaces:
LayoutMeasurable, LayoutMeasurableMixin, HasBlendModeProperty, HasClipProperty, HasEffectProperty, HasFillProperty, HasLayoutXProperty, HasLayoutYProperty, HasManagedProperty, HasMouseTransparentProperty, HasOnMouseClickedProperty, HasOpacityProperty, HasParentProperty, HasSmoothProperty, HasStrokeDashOffsetProperty, HasStrokeLineCapProperty, HasStrokeLineJoinProperty, HasStrokeMiterLimitProperty, HasStrokeProperty, HasStrokeTypeProperty, HasStrokeWidthProperty, HasVisibleProperty, Styleable, EventTarget, INode

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 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:
    • impl_computeGeomBounds

      public BaseBounds impl_computeGeomBounds(BaseBounds bounds, BaseTransform tx)
      Description copied from class: Node
      Computes the geometric bounds for this Node. This method is abstract and must be implemented by each Node subclass.
      Specified by:
      impl_computeGeomBounds in class Node
    • toString

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