Package com.iizix.prop
Class GStroke
java.lang.Object
com.iizix.prop.GStroke
- All Implemented Interfaces:
- Cloneable
A stroke defines stylistic properties that are used when drawing a path.
- Author:
- Christopher Mindus
- Nested Class SummaryNested ClassesModifier and TypeClassDescription- static enumSpecifies the shape to be used at the end of open subpaths when they are stroked.- static enumSpecifies the shape to be used at the corners of paths or basic shapes when they are stroked.- static enumLine style.
- Field SummaryFieldsModifier and TypeFieldDescription- final GStroke.CapThe cap.- final GColorThe color.- static final GStrokeThe default stroke: "butt" with "miter" join, black color, solid and width of 1, with a miter limit of 4.- final GStroke.JoinThe join.- final floatThe miter limit (1 or larger), only applies for "miter" joins.- final GStroke.StyleThe style.- final floatThe width.
- Constructor SummaryConstructorsConstructorDescription- GStroke- (GStroke.Cap cap, GStroke.Join join, float miterLimit, float width, GStroke.Style style, GColor color) Creates an new stroke.
- Method SummaryModifier and TypeMethodDescription- booleanChecks if two strokes objects are equal.- booleanChecks if two strokes objects are equal.Gets the stroke as a String in the form described below.Gets the AWT stroke of dash phase zero.- toString()Returns a string representation of this class instance and its values.
- Field Details- DEFAULTThe default stroke: "butt" with "miter" join, black color, solid and width of 1, with a miter limit of 4.
- capThe cap.
- joinThe join.
- miterLimitpublic final float miterLimitThe miter limit (1 or larger), only applies for "miter" joins.
- styleThe style.
- colorThe color.
- widthpublic final float widthThe width.
 
- Constructor Details- GStrokepublic GStroke- (GStroke.Cap cap, GStroke.Join join, float miterLimit, float width, GStroke.Style style, GColor color) Creates an new stroke.- Parameters:
- cap- The cap.
- join- The join.
- miterLimit- The miter limit, only used when join is "miter".
- width- The width.
- style- The style.
- color- The color.
- Throws:
- NullPointerException- If cap, join, style or color is null.
- IllegalArgumentException- If the width is zero or smaller.
 
 
- Method Details- getStrokeGets the AWT stroke of dash phase zero.- Returns:
- A new BasicStroke initialized from this GStroke.
 
- equalsChecks if two strokes objects are equal.
- equalsChecks if two strokes objects are equal.- Parameters:
- stroke- another strokes object. If null, the strokes are not equal.
- Returns:
- true if equal, false otherwise.
 
- getStringGets the stroke as a String in the form described below.- Returns:
- the String as described above.
 
- toStringReturns a string representation of this class instance and its values.