const class gfx::Insets

sys::Obj
  gfx::Insets

@Js
@Serializable { simple=true }

Source

Insets represent a number of pixels around the edge of a rectangle.

bottom

const Int bottom

Source

Bottom side spacing

defVal

const static Insets defVal := ...

Source

Default instance 0, 0, 0, 0.

equals

virtual override Bool equals(Obj? obj)

Source

Return if obj is same Insets value.

fromStr

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

Source

Parse from string (see toStr). If invalid and checked is true then throw ParseErr otherwise return null. Supported formats are:

  • "len"
  • "top,right,bottom,left"
hash

virtual override Int hash()

Source

Return hash of top, right, bottom, left.

left

const Int left

Source

Left side spacing

make

new make(Int top, Int? right := null, Int? bottom := null, Int? left := null)

Source

Construct with top, and optional right, bottom, left. If one side is not specified, it is reflected from the opposite side:

Insets(5)     => Insets(5,5,5,5)
Insets(5,6)   => Insets(5,6,5,6)
Insets(5,6,7) => Insets(5,6,7,6)

const Int right

Source

Right side spacing

toSize

Size toSize()

Source

Return right+left, top+bottom

toStr

virtual override Str toStr()

Source

If all four sides are equal return "len" otherwise return "top,right,bottom,left".

top

const Int top

Source

Top side spacing