Class StrokeKit


  • public class StrokeKit
    extends java.lang.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 Summary

      Fields 
      Modifier and Type Field Description
      static StrokeKit DEFAULT
      Single pixel thickness instance.
    • Constructor Summary

      Constructors 
      Constructor Description
      StrokeKit​(float strokeSize)
      Constructs a standard StrokeKit for a given line thickness.
      StrokeKit​(java.awt.Stroke round, java.awt.Stroke butt)
      Constructs a StrokeKit given strokes.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Stroke getButt()
      Returns a stroke with butted ends.
      java.awt.Stroke getRound()
      Returns a stroke with rounded ends.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • DEFAULT

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

      • StrokeKit

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

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

      • getRound

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

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