Struct InsetsOf

Represents area around rectangle. Used for margin, border and padding

struct InsetsOf(T)
  
if (is(T == float) || is(T == int));

Constructors

NameDescription
this (all) Create equal offset on all sides
this (v, h) Create separate horizontal and vertical offsets
this (top, right, bottom, left) Create offsets one by one

Fields

TypeNameDescription
T
top

Properties

TypeNameDescription
T
height[get] Get total vertical offset
size[get] Get total offset
T
width[get] Get total horizontal offset

Methods

NameDescription
add (ins) Sum two areas
from (source) Construct from offsets with another base type via casting
opBinary (ins)
opBinary (ins)
opBinary (factor)
toString ()