const class webfwt::Shadow
sys::Obj webfwt::Shadow
@Js@Serializable { simple=true }
Models styled shadows.
- blur
-
const Int blur := 0Blur radius for shadow.
- color
-
const Color color := Color.blackColor of shadow
- defVal
-
const static Shadow defVal := Shadow.fromStr("#000 0 0")Default is no shadow.
- equals
-
virtual override Bool equals(Obj? obj)Equality is based on string format.
- fromStr
-
static new fromStr(Str str, Bool checked := true)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
Colorstring 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()Hash is based on string format.
- make
-
new make(|This| f)Construct with it-block
- offset
-
const Point offset := Point.<ctor>(0, 0)Offset for shadow.
- spread
-
const Int spread := 0Spread radius for shadow.
- toCss
-
Str toCss()Get CSS string for this Shadow.
- toStr
-
virtual const override Str toStrString format - see
fromStrfor format.