yu.ac.bg.etf.javaqx.qswing.graphics
Class BasicStroke

java.lang.Object
  extended byyu.ac.bg.etf.javaqx.qswing.graphics.Stroke
      extended byyu.ac.bg.etf.javaqx.qswing.graphics.BasicStroke

public final class BasicStroke
extends Stroke

Basic Stroke.

NOTE: This class is not compatible with java.awt.BasicStroke class!

Dash phase is not supported. The odd elements maps opaque pen.

Version:
0.2.0
Author:
Slobodan Vrkacevic (slobodan.vrkacevic@gmail.com)

Field Summary
static int CAP_BUTT
          Flat line cap style.
static int CAP_ROUND
          Round line cap style.
static int CAP_SQUARE
          Square line cap style.
static int JOIN_BEVEL
          Bevel line join style.
static int JOIN_MITER
          Miter line join style.
static int JOIN_ROUND
          Round line join style.
 
Constructor Summary
BasicStroke()
          Constructs new BasicStroke stroke.
BasicStroke(float width)
          Constructs new BasicStroke stroke.
BasicStroke(float width, int cap, int join)
          Constructs new BasicStroke stroke.
BasicStroke(float width, int cap, int join, float miterLimit)
          Constructs new BasicStroke stroke.
BasicStroke(float width, int cap, int join, float miterLimit, float[] dash)
          Constructs new BasicStroke stroke.
BasicStroke(float width, int cap, int join, float miterLimit, float[] dash, float dashPhase)
          Constructs new BasicStroke stroke.
 
Method Summary
 boolean equals(java.lang.Object obj)
          
 float[] getDashArray()
          Returns the dash array.
 float getDashPhase()
          Returns the dash phase.
 int getEndCap()
          Returns the end cap style.
 int getLineJoin()
          Returns the line join style.
 float getLineWidth()
          Returns line width.
 float getMiterLimit()
          Returns the miter limit.
 int hashCode()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

JOIN_MITER

public static final int JOIN_MITER
Miter line join style.

See Also:
Constant Field Values

JOIN_ROUND

public static final int JOIN_ROUND
Round line join style.

See Also:
Constant Field Values

JOIN_BEVEL

public static final int JOIN_BEVEL
Bevel line join style.

See Also:
Constant Field Values

CAP_BUTT

public static final int CAP_BUTT
Flat line cap style.

See Also:
Constant Field Values

CAP_ROUND

public static final int CAP_ROUND
Round line cap style.

See Also:
Constant Field Values

CAP_SQUARE

public static final int CAP_SQUARE
Square line cap style.

See Also:
Constant Field Values
Constructor Detail

BasicStroke

public BasicStroke(float width,
                   int cap,
                   int join,
                   float miterLimit,
                   float[] dash,
                   float dashPhase)
Constructs new BasicStroke stroke.

Parameters:
width - the stroke width
cap - the line cap style
join - the line join style
miterLimit - the miter limit
dash - the dash array
dashPhase - the dash phase

BasicStroke

public BasicStroke(float width,
                   int cap,
                   int join,
                   float miterLimit,
                   float[] dash)
Constructs new BasicStroke stroke.

Parameters:
width - the stroke width
cap - the line cap style
join - the line join style
miterLimit - the miter limit
dash - the dash array

BasicStroke

public BasicStroke(float width,
                   int cap,
                   int join,
                   float miterLimit)
Constructs new BasicStroke stroke.

Parameters:
width - the stroke width
cap - the line cap style
join - the line join style
miterLimit - the miter limit

BasicStroke

public BasicStroke(float width,
                   int cap,
                   int join)
Constructs new BasicStroke stroke.

Parameters:
width - the stroke width
cap - the line cap style
join - the line join style

BasicStroke

public BasicStroke(float width)
Constructs new BasicStroke stroke.

Parameters:
width - the stroke width

BasicStroke

public BasicStroke()
Constructs new BasicStroke stroke.

Method Detail

getLineWidth

public float getLineWidth()
Returns line width.

Returns:
line width

getEndCap

public int getEndCap()
Returns the end cap style.

Returns:
the end cap style

getLineJoin

public int getLineJoin()
Returns the line join style.

Returns:
the line join style

getMiterLimit

public float getMiterLimit()
Returns the miter limit.

Returns:
the miter limit

getDashArray

public float[] getDashArray()
Returns the dash array.

Returns:
the dash array.

getDashPhase

public float getDashPhase()
Returns the dash phase.

Returns:
the dash phase

equals

public boolean equals(java.lang.Object obj)


hashCode

public int hashCode()



Copyright © 2007 ETF and contributors. All Rights Reserved.