Pen defines how a shape is stroked.
Slots
- capSource
-
const Int cap := capSquareDefines how two ends of unjoined segements are stroked. Valid values are capSquare, capButt, and capRound. Default is capSquare.
- capButtSource
-
static Int capButt := 1Constant for cap
- capRoundSource
-
static Int capRound := 2Constant for cap
- capSquareSource
-
static Int capSquare := 0Constant for cap
- dashSource
-
const Int[]? dashDash pattern as on/off again lengths. If null then shapes are stroked solid.
- defSource
-
static Pen def := makeDefault pen is width of 1 with capSquare and joinMiter.
- equalsSource
-
override Bool equals(Obj? obj)Overrides sys::Obj.equals
Equality is based on Pen's fields.
- fromStrSource
-
static Pen? fromStr(Str str, Bool checked := true)Parse a pen from string (see toStr). If invalid and checked is true then throw ParseErr otherwise return null.
- hashSource
-
override Int hash()Overrides sys::Obj.hash
Hash the fields.
- joinSource
-
const Int join := joinMiterDefines how two path segments are joined at the endpoints. Valid values are joinMiter, joinRound, and joinBevel. Default is joinMiter.
- joinBevelSource
-
static Int joinBevel := 1Constant for join
- joinMiterSource
-
static Int joinMiter := 0Constant for join
- joinRoundSource
-
static Int joinRound := 3Constant for join
- toStrSource
-
override Str toStr()Overrides sys::Obj.toStr
Return
"width cap join dash"such as"2 capButt joinBevel [1,1]". Omit cap, join, or dash if at defaults. - widthSource
-
const Int width := 1Width of the stroke, default is 1.