const class webfwt::Shadow

sys::Obj
  webfwt::Shadow

@Js
@Serializable { simple=true }

Source

Models styled shadows.

blur

const Int blur := 0

Source

Blur radius for shadow.

color

const Color color := Color.black

Source

Color of shadow

defVal

const static Shadow defVal := Shadow.fromStr("#000 0 0")

Source

Default is no shadow.

equals

virtual override Bool equals(Obj? obj)

Source

Equality is based on string format.

fromStr

static new fromStr(Str str, Bool checked := true)

Source

Parse a shadow from string (see toStr). If invalid and checked is true then throw ParseErr otherwise return null. The string is formated as:

shadow := color x y [blur [spread]]

Color must match Color string format. Position, blur, and spread must all be integers.

Examples:

Shadow("#000 1 1")      => #000 1 1 0 0
Shadow("#f00 1 1 2")    => #f00 1 1 2 0
Shadow("#fff 0 -1 1")   => #fff 0 -1 1 0
Shadow("#555 2 2 0 5")  => #555 2 2 0 5
hash

virtual override Int hash()

Source

Hash is based on string format.

make

new make(|This| f)

Source

Construct with it-block

offset

const Point offset := Point.<ctor>(0, 0)

Source

Offset for shadow.

spread

const Int spread := 0

Source

Spread radius for shadow.

toCss

Str toCss()

Source

Get CSS string for this Shadow.

toStr

virtual const override Str toStr

Source

String format - see fromStr for format.