Class LineStyle

java.lang.Object
uk.ac.starlink.ttools.plot2.layer.LineStyle
All Implemented Interfaces:
Style
Direct Known Subclasses:
AuxLineStyle, FunctionPlotter.FunctionStyle, Stats1Plotter.StatsStyle

public class LineStyle extends Object implements Style
Plotting style for continuous lines.
Since:
13 Jun 2013
Author:
Mark Taylor
  • Constructor Details

    • LineStyle

      public LineStyle(Color color, Stroke stroke, boolean antialias)
      Constructor.
      Parameters:
      color - line colour
      stroke - line stroke
      antialias - whether line is to be antialiased (only likely to make a difference on bitmapped paper)
  • Method Details

    • getColor

      public Color getColor()
      Returns the line colour.
      Returns:
      colour
    • getStroke

      public Stroke getStroke()
      Returns the object used to stroke the line.
      Returns:
      stroke
    • getAntialias

      public boolean getAntialias()
      Indicates whether the line will be antialiased in suitable (bitmapped) contexts.
      Returns:
      true for antialiasing
    • getLegendIcon

      public Icon getLegendIcon()
      Description copied from interface: Style
      Returns an icon suitable for displaying in a legend for this style.
      Specified by:
      getLegendIcon in interface Style
    • createLineTracer

      public LineTracer createLineTracer(Graphics g, Rectangle bounds, int nwork, boolean isPixel)
      Convenience method to return a line tracer that will use this style.
      Parameters:
      g - graphics context
      bounds - clip bounds
      nwork - workspace array size
      isPixel - if true graphics context is considered pixellised
      Returns:
      new line tracer
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object