Package com.iizix.prop
Class GStroke
- java.lang.Object
- com.iizix.prop.GStroke
 
- All Implemented Interfaces:
- java.lang.Cloneable
 - public class GStroke extends java.lang.Object implements java.lang.CloneableA stroke defines stylistic properties that are used when drawing a path.- Author:
- Christopher Mindus
 
- Nested Class Summary- Nested Classes - Modifier and Type - Class - Description - static class- GStroke.CapSpecifies the shape to be used at the end of open subpaths when they are stroked.- static class- GStroke.JoinSpecifies the shape to be used at the corners of paths or basic shapes when they are stroked.- static class- GStroke.StyleLine style.
 - Field Summary- Fields - Modifier and Type - Field - Description - GStroke.Cap- capThe cap.- GColor- colorThe color.- static GStroke- DEFAULTThe default stroke: "butt" with "miter" join, black color, solid and width of 1, with a miter limit of 4.- GStroke.Join- joinThe join.- float- miterLimitThe miter limit (1 or larger), only applies for "miter" joins.- GStroke.Style- styleThe style.- float- widthThe width.
 - Constructor Summary- Constructors - Constructor - Description - GStroke(GStroke.Cap cap, GStroke.Join join, float miterLimit, float width, GStroke.Style style, GColor color)Creates an new stroke.
 - Method Summary- All Methods Instance Methods Concrete Methods - Modifier and Type - Method - Description - boolean- equals(GStroke stroke)Checks if two strokes objects are equal.- boolean- equals(java.lang.Object o)Checks if two strokes objects are equal.- java.lang.String- getString()Gets the stroke as a String in the form described below.- java.awt.BasicStroke- getStroke()Gets the AWT stroke of dash phase zero.- java.lang.String- toString()Returns a string representation of this class instance and its values.
 
- Field Detail- DEFAULT- public static final GStroke DEFAULT The default stroke: "butt" with "miter" join, black color, solid and width of 1, with a miter limit of 4.
 - cap- public final GStroke.Cap cap The cap.
 - join- public final GStroke.Join join The join.
 - miterLimit- public final float miterLimit The miter limit (1 or larger), only applies for "miter" joins.
 - style- public final GStroke.Style style The style.
 - color- public final GColor color The color.
 - width- public final float width The width.
 
 - Constructor Detail- GStroke- public 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:
- java.lang.NullPointerException- If cap, join, style or color is null.
- java.lang.IllegalArgumentException- If the width is zero or smaller.
 
 
 - Method Detail- getStroke- public java.awt.BasicStroke getStroke() Gets the AWT stroke of dash phase zero.- Returns:
- A new BasicStroke initialized from this GStroke.
 
 - equals- public boolean equals(java.lang.Object o) Checks if two strokes objects are equal.- Overrides:
- equalsin class- java.lang.Object
 
 - equals- public boolean equals(GStroke stroke) Checks if two strokes objects are equal.- Parameters:
- stroke- another strokes object. If null, the strokes are not equal.
- Returns:
- true if equal, false otherwise.
 
 - getString- public java.lang.String getString() Gets the stroke as a String in the form described below.- Returns:
- the String as described above.
 
 - toString- public java.lang.String toString() Returns a string representation of this class instance and its values.- Overrides:
- toStringin class- java.lang.Object
- Returns:
- a string representation of this class instance.