Class OutlineFootprint

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

public class OutlineFootprint extends LineFootprint
An OutlineFootprint returns an outline shape for a Point array of length 2.
Author:
Douglas Brown
  • Constructor Details

    • OutlineFootprint

      public OutlineFootprint(String name)
      Constructs an OutlineFootprint.
      Parameters:
      name - the name of the footprint
  • Method Details

    • setSpread

      public void setSpread(int spread)
      Sets the spread. The width of the outline is (1 + 2*spread).
      Parameters:
      spread - the desired spread
    • getSpread

      public int getSpread()
      Gets the spread.
      Returns:
      the spread
    • getIcon

      public ResizableIcon getIcon(int w, int h)
      Gets the icon.
      Specified by:
      getIcon in interface Footprint
      Overrides:
      getIcon in class LineFootprint
      Parameters:
      w - width of the icon
      h - height of the icon
      Returns:
      the icon
    • setStroke

      public void setStroke(BasicStroke stroke)
      Overrides LineProfile setStroke method.
      Specified by:
      setStroke in interface Footprint
      Overrides:
      setStroke in class LineFootprint
      Parameters:
      stroke - the desired stroke
    • getShape

      public org.opensourcephysics.cabrillo.tracker.MultiShape getShape(Point[] points, int scale)
      Gets the draw 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 draw shape