Package org.eclipse.swt.graphics
Class LineAttributes
java.lang.Object
org.eclipse.swt.graphics.LineAttributes
LineAttributes
defines a set of line attributes that
can be modified in a GC.
Application code does not need to explicitly release the
resources managed by each instance when those instances are no longer
required, and thus no dispose()
method is provided.
-
Field Summary
Modifier and TypeFieldDescriptionint
The line cap style.float[]
The line dash style for SWT.LINE_CUSTOM.float
The line dash style offset for SWT.LINE_CUSTOM.int
The line join style.float
The line miter limit.int
The line style.float
The line width. -
Constructor Summary
ConstructorDescriptionLineAttributes
(float width) Create a new line attributes with the specified line width.LineAttributes
(float width, int cap, int join) Create a new line attributes with the specified line cap, join and width.LineAttributes
(float width, int cap, int join, int style, float[] dash, float dashOffset, float miterLimit) Create a new line attributes with the specified arguments. -
Method Summary
-
Field Details
-
width
public float widthThe line width. -
cap
public int capThe line cap style.- See Also:
-
join
public int joinThe line join style.- See Also:
-
style
public int styleThe line style.- Since:
- 3.19
- See Also:
-
dash
public float[] dashThe line dash style for SWT.LINE_CUSTOM.- Since:
- 3.19
-
dashOffset
public float dashOffsetThe line dash style offset for SWT.LINE_CUSTOM.- Since:
- 3.19
-
miterLimit
public float miterLimitThe line miter limit.- Since:
- 3.19
-
-
Constructor Details
-
LineAttributes
public LineAttributes(float width) Create a new line attributes with the specified line width.- Parameters:
width
- the line width
-
LineAttributes
public LineAttributes(float width, int cap, int join) Create a new line attributes with the specified line cap, join and width.- Parameters:
width
- the line widthcap
- the line cap stylejoin
- the line join style
-
LineAttributes
public LineAttributes(float width, int cap, int join, int style, float[] dash, float dashOffset, float miterLimit) Create a new line attributes with the specified arguments.- Parameters:
width
- the line widthcap
- the line cap stylejoin
- the line join stylestyle
- the line styledash
- the line dash styledashOffset
- the line dash style offsetmiterLimit
- the line miter limit- Since:
- 3.19
-
-
Method Details
-
equals
Compares the argument to the receiver, and returns true if they represent the same object using a class specific comparison. -
hashCode
public int hashCode()Returns an integer hash code for the receiver. Any two objects that returntrue
when passed toequals
must return the same value for this method.
-