Class StrokeKit

java.lang.Object
uk.ac.starlink.ttools.plot2.layer.StrokeKit

public class StrokeKit extends Object
Supplier for drawing strokes. A consistent set of strokes with different detail characteristics can be supplied.
Since:
30 Sep 2021
Author:
Mark Taylor
  • Field Details

    • DEFAULT

      public static final StrokeKit DEFAULT
      Single pixel thickness instance.
  • Constructor Details

    • StrokeKit

      public StrokeKit(float strokeSize)
      Constructs a standard StrokeKit for a given line thickness.
      Parameters:
      strokeSize - line thickness in pixels
    • StrokeKit

      public StrokeKit(Stroke round, Stroke butt)
      Constructs a StrokeKit given strokes.
      Parameters:
      round - stroke to use for rounded ends
      butt - stroke to use for square ends
  • Method Details

    • getRound

      public Stroke getRound()
      Returns a stroke with rounded ends.
      Returns:
      stroke
    • getButt

      public Stroke getButt()
      Returns a stroke with butted ends.
      Returns:
      stroke