Class MultiLineFootprint

java.lang.Object
org.opensourcephysics.cabrillo.tracker.LineFootprint
org.opensourcephysics.cabrillo.tracker.MultiLineFootprint
All Implemented Interfaces:
Cloneable, Footprint

public class MultiLineFootprint extends LineFootprint
A MultiLineFootprint returns a set of line segments for a Point array of any length > 1.
Author:
Douglas Brown
  • Field Details

    • closed

      protected boolean closed
  • Constructor Details

    • MultiLineFootprint

      public MultiLineFootprint(String name)
      Constructs a MultiLineFootprint.
      Parameters:
      name - the name
  • Method Details

    • getFootprint

      public static MultiLineFootprint getFootprint(String name)
      Gets a predefined MultiLineFootprint.
      Parameters:
      name - the name of the footprint
      Returns:
      the footprint
    • getLength

      public int getLength()
      Gets the minimum point array length required by this footprint.
      Specified by:
      getLength in interface Footprint
      Overrides:
      getLength in class LineFootprint
      Returns:
      the length
    • isClosed

      public boolean isClosed()
      Determine if this draws closed paths.
      Returns:
      true if closed
    • setClosed

      public void setClosed(boolean closed)
      Sets the closed property.
      Parameters:
      true - to draw closed paths
    • getShape

      public org.opensourcephysics.cabrillo.tracker.MultiShape getShape(Point[] points, int scale)
      Gets the shape of this footprint.
      Specified by:
      getShape in interface Footprint
      Overrides:
      getShape in class LineFootprint
      Parameters:
      points - an array of Points
      scale - an integer magnification
      Returns:
      the shape