Java java.awt BasicStroke fields, constructors, methods, implement or subclass

Example usage for Java java.awt BasicStroke fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for java.awt BasicStroke.

The text is from its open source code.

Field

intJOIN_MITER
Joins path segments by extending their outside edges until they meet.
intJOIN_ROUND
Joins path segments by rounding off the corner at a radius of half the line width.
intJOIN_BEVEL
Joins path segments by connecting the outer corners of their wide outlines with a straight segment.
intCAP_BUTT
Ends unclosed subpaths and dash segments with no added decoration.
intCAP_ROUND
Ends unclosed subpaths and dash segments with a round decoration that has a radius equal to half of the width of the pen.
intCAP_SQUARE
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.

Constructor

BasicStroke(float width, int cap, int join, float miterlimit)
Constructs a solid BasicStroke with the specified attributes.
BasicStroke(float width, int cap, int join)
Constructs a solid BasicStroke with the specified attributes.
BasicStroke(float width)
Constructs a solid BasicStroke with the specified line width and with default values for the cap and join styles.
BasicStroke(float width, int cap, int join, float miterlimit, float[] dash, float dash_phase)
Constructs a new BasicStroke with the specified attributes.
BasicStroke()
Constructs a new BasicStroke with defaults for all attributes.

Method

ShapecreateStrokedShape(Shape s)
Returns a Shape whose interior defines the stroked outline of a specified Shape .
booleanequals(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 .
float[]getDashArray()
Returns the array representing the lengths of the dash segments.
floatgetDashPhase()
Returns the current dash phase.
intgetEndCap()
Returns the end cap style.
intgetLineJoin()
Returns the line join style.
floatgetLineWidth()
Returns the line width.
floatgetMiterLimit()
Returns the limit of miter joins.
inthashCode()
Returns the hashcode for this stroke.