logo

const class

fwt::Pen

sys::Obj
  fwt::Pen

Pen defines how a shape is stroked.

Slots

cap

const Int cap := capSquare

Defines how two ends of unjoined segements are stroked. Valid values are capSquare, capButt, and capRound. Default is capSquare.

Source

capButt

static Int capButt := 1

Constant for cap

Source

capRound

static Int capRound := 2

Constant for cap

Source

capSquare

static Int capSquare := 0

Constant for cap

Source

dash

const Int[] dash

Dash pattern as on/off again lengths. If null then shapes are stroked solid.

Source

def

static Pen def := make

Default pen is width of 1 with capSquare and joinMiter.

Source

equals

override Bool equals(Obj obj)

Equality is based on Pen's fields.

Source

fromStr

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.

Source

hash

override Int hash()

Hash the fields.

Source

join

const Int join := joinMiter

Defines how two path segments are joined at the endpoints. Valid values are joinMiter, joinRound, and joinBevel. Default is joinMiter.

Source

joinBevel

static Int joinBevel := 1

Constant for join

Source

joinMiter

static Int joinMiter := 0

Constant for join

Source

joinRound

static Int joinRound := 3

Constant for join

Source

toStr

override Str toStr()

Return "width cap join dash" such as "2 capButt joinBevel [1,1]". Omit cap, join, or dash if at defaults.

Source

width

const Int width := 1

Width of the stroke, default is 1.

Source