edu.rit.numeric.plot
Class Strokes
- java.lang.Object
-
- edu.rit.numeric.plot.Strokes
-
public class Strokes extends java.lang.ObjectClass Strokes provides operations for creating several common patterns of drawing strokes.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static java.awt.BasicStrokedashed(double theWidth)Returns a dashed stroke of the given width with square dashes.static java.awt.BasicStrokedashed(double theWidth, double d, double g)Returns a dashed stroke of the given width with square dashes.static java.awt.BasicStrokedotted(double theWidth)Returns a dotted stroke of the given width with square dots.static java.awt.BasicStrokereadExternal(java.io.ObjectInput in)Read a BasicStroke object from the given object input stream.static java.awt.BasicStrokeroundDashed(double theWidth)Returns a dashed stroke of the given width with rounded dashes.static java.awt.BasicStrokeroundDashed(double theWidth, double d, double g)Returns a dashed stroke of the given width with rounded dashes.static java.awt.BasicStrokeroundDotted(double theWidth)Returns a dotted stroke of the given width with round dots.static java.awt.BasicStrokeroundSolid(double theWidth)Returns a solid stroke of the given width with round corners and ends.static java.awt.BasicStrokesolid(double theWidth)Returns a solid stroke of the given width with square corners and ends.static voidwriteExternal(java.awt.BasicStroke theStroke, java.io.ObjectOutput out)Write the given BasicStroke object to the given object output stream.
-
-
-
Method Detail
-
solid
public static java.awt.BasicStroke solid(double theWidth)
Returns a solid stroke of the given width with square corners and ends.- Parameters:
theWidth- Stroke width.
-
dotted
public static java.awt.BasicStroke dotted(double theWidth)
Returns a dotted stroke of the given width with square dots.- Parameters:
theWidth- Stroke width.
-
dashed
public static java.awt.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 java.awt.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 java.awt.BasicStroke roundSolid(double theWidth)
Returns a solid stroke of the given width with round corners and ends.- Parameters:
theWidth- Stroke width.
-
roundDotted
public static java.awt.BasicStroke roundDotted(double theWidth)
Returns a dotted stroke of the given width with round dots.- Parameters:
theWidth- Stroke width.
-
roundDashed
public static java.awt.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 java.awt.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.
-
writeExternal
public static void writeExternal(java.awt.BasicStroke theStroke, java.io.ObjectOutput out) throws java.io.IOExceptionWrite the given BasicStroke object to the given object output stream.- Parameters:
theStroke- Stroke.out- Object output stream.- Throws:
java.io.IOException- Thrown if an I/O error occurred.
-
readExternal
public static java.awt.BasicStroke readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundExceptionRead a BasicStroke object from the given object input stream.- Parameters:
in- Object input stream.- Returns:
- Stroke.
- Throws:
java.io.IOException- Thrown if an I/O error occurred.java.lang.ClassNotFoundException- Thrown if a class needed to deserialize the stroke object could not be found.
-
-
DMelt 3.0 © DataMelt by jWork.ORG