Skip to content

Insets

Type

Insets is an immutable four-edge offset in UI points, created with Insets.new, Insets.all, or Insets.Zero. Insets supports +, -, and ==.

Example

-- Client script.
local margin = Insets.all(4) + Insets.new(4, 0, 4, 0)
print(margin.Left, margin.Top) -- prints 8  4

Left

Field
Left: number

Left is the left edge offset in points.

Top

Field
Top: number

Top is the top edge offset in points.

Field
Right: number

Right is the right edge offset in points.

Bottom

Field
Bottom: number

Bottom is the bottom edge offset in points.

__add

Function
__add(self, other: Insets) -> Insets

__add adds each edge of two Insets values component-wise.

__sub

Function
__sub(self, other: Insets) -> Insets

__sub subtracts each edge of other from this Insets value component-wise.