Class SvgShape


public class SvgShape
extends SvgGraphic
An SvgShape is a graphical svg element which can be directly applied to a given graphics context.
Shapes consist of:
  • circle
  • ellipse
  • line
  • polygon
  • polyline
  • rectangle
  • path

See also:

  • Field Details

    • pathData pathData
  • Constructor Details

  • Method Details

    • apply

      public void apply​( gc)
      Description copied from class: SvgGraphic
      Apply this svg graphic to the given graphics context.

      Note that to support the rather abstract structure of svg, each time this method is called all transformations and css properties to be calculated and applied. If this is a shape, it will be painted to the graphics context. Containers will recursively make this call on their children.

      Specified by:
      apply in class SvgGraphic
      gc - the gc to use in all graphics operations
    • contains

      public boolean contains​(float x, float y, gc, boolean outline)
      Returns whether or not the given point is contained by this shape.
      x -
      y -
      gc -
      outline -
      true if the given point is contained, false otherwise
      See Also:
      Path.contains(float, float, GC, boolean)
    • getBounds

      float[] getBounds()