edu.rit.numeric.plot
Class Strokes

java.lang.Object
  extended by edu.rit.numeric.plot.Strokes

public class Strokes
extends Object

Class Strokes provides operations for creating several common patterns of drawing strokes.


Method Summary
static BasicStroke dashed(double theWidth)
          Returns a dashed stroke of the given width with square dashes.
static BasicStroke dashed(double theWidth, double d, double g)
          Returns a dashed stroke of the given width with square dashes.
static BasicStroke dotted(double theWidth)
          Returns a dotted stroke of the given width with square dots.
static BasicStroke roundDashed(double theWidth)
          Returns a dashed stroke of the given width with rounded dashes.
static BasicStroke roundDashed(double theWidth, double d, double g)
          Returns a dashed stroke of the given width with rounded dashes.
static BasicStroke roundDotted(double theWidth)
          Returns a dotted stroke of the given width with round dots.
static BasicStroke roundSolid(double theWidth)
          Returns a solid stroke of the given width with round corners and ends.
static BasicStroke solid(double theWidth)
          Returns a solid stroke of the given width with square corners and ends.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

solid

public static BasicStroke solid(double theWidth)
Returns a solid stroke of the given width with square corners and ends.

Parameters:
theWidth - Stroke width.

dotted

public static BasicStroke dotted(double theWidth)
Returns a dotted stroke of the given width with square dots.

Parameters:
theWidth - Stroke width.

dashed

public static BasicStroke dashed(double theWidth)
Returns a dashed stroke of the given width with square dashes. Each dash's length is three times the stroke width. The length of the gap between dashes equals the stroke width.

Parameters:
theWidth - Stroke width.

dashed

public static BasicStroke dashed(double theWidth,
                                 double d,
                                 double g)
Returns a dashed stroke of the given width with square dashes. Each dash's length is d times the stroke width. The length of the gap between dashes equals g times the stroke width.

Parameters:
theWidth - Stroke width.
d - Dash length in terms of stroke width.
g - Gap length in terms of stroke width.

roundSolid

public static BasicStroke roundSolid(double theWidth)
Returns a solid stroke of the given width with round corners and ends.

Parameters:
theWidth - Stroke width.

roundDotted

public static BasicStroke roundDotted(double theWidth)
Returns a dotted stroke of the given width with round dots.

Parameters:
theWidth - Stroke width.

roundDashed

public static BasicStroke roundDashed(double theWidth)
Returns a dashed stroke of the given width with rounded dashes. Each dash's length is three times the stroke width. The length of the gap between dashes equals the stroke width.

Parameters:
theWidth - Stroke width in points.

roundDashed

public static BasicStroke roundDashed(double theWidth,
                                      double d,
                                      double g)
Returns a dashed stroke of the given width with rounded dashes. Each dash's length is d times the stroke width. The length of the gap between dashes equals g times the stroke width.

Parameters:
theWidth - Stroke width in points.
d - Dash length in terms of stroke width.
g - Gap length in terms of stroke width.


Copyright © 2005 by Alan Kaminsky. All rights reserved. Send comments to ark­@­cs.rit.edu.