API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.awt. BasicStroke View Source
Author(s)
Jim Graham
Since
Version
1.43, 03/09/06
Serial
Hierarchy
 Object
      BasicStroke
Implements
 Stroke
Subclasses
Description
public class BasicStroke
  The BasicStroke class defines a basic set of rendering attributes for the outlines of graphics primitives, which are rendered with a Graphics2D object that has its Stroke attribute set to this BasicStroke.
See also:    Graphics2D
Constructors
public BasicStroke ()
  Constructs a new BasicStroke with defaults for all attributes.
public BasicStroke (float width)
  Constructs a solid BasicStroke with the specified line width and with default values for the cap and join styles.
public BasicStroke (float width, int cap, int join)
  Constructs a solid BasicStroke with the specified attributes.
public BasicStroke (float width, int cap, int join, float miterlimit)
  Constructs a solid BasicStroke with the specified attributes.
public BasicStroke (float width, int cap, int join, float miterlimit, float[] dash, float dash_phase)
  Constructs a new BasicStroke with the specified attributes.
Methods
Hide/Show inherited methods
public Shape createStrokedShape (Shape s) [Specified in Stroke]
  Returns a Shape whose interior defines the stroked outline of a specified Shape.
public boolean equals (Object obj)
  Tests if a specified object is equal to this BasicStroke by first testing if it is a BasicStroke and then comparing its width, join, cap, miter limit, dash, and dash phase attributes with those of this BasicStroke.
public float getDashArray ()
  Returns the array representing the lengths of the dash segments.
public float getDashPhase ()
  Returns the current dash phase.
public int getEndCap ()
  Returns the end cap style.
public int getLineJoin ()
  Returns the line join style.
public float getLineWidth ()
  Returns the line width.
public float getMiterLimit ()
  Returns the limit of miter joins.
public int hashCode ()
  Returns the hashcode for this stroke.
Fields
Hide/Show inherited fields
pack-private int cap
publicfinalstatic int CAP_BUTT = "0"
Ends unclosed subpaths and dash segments with no added decoration.
publicfinalstatic int CAP_ROUND = "1"
Ends unclosed subpaths and dash segments with a round decoration that has a radius equal to half of the width of the pen.
publicfinalstatic int CAP_SQUARE = "2"
Ends unclosed subpaths and dash segments with a square projection that extends beyond the end of the segment to a distance equal to half of the line width.
pack-private float dash
pack-private float dash_phase
pack-private int join
publicfinalstatic int JOIN_BEVEL = "2"
Joins path segments by connecting the outer corners of their wide outlines with a straight segment.
publicfinalstatic int JOIN_MITER = "0"
Joins path segments by extending their outside edges until they meet.
publicfinalstatic int JOIN_ROUND = "1"
Joins path segments by rounding off the corner at a radius of half the line width.
pack-private float miterlimit
pack-private float width
Nested Classes
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar