Struct InsetsOf
Represents area around rectangle. Used for margin, border and padding
struct InsetsOf(T)
if (is(T == float) || is(T == int));
Constructors
Name | Description |
---|---|
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
Type | Name | Description |
---|---|---|
T |
top
|
Properties
Type | Name | Description |
---|---|---|
T |
height [get]
|
Get total vertical offset |
SizeOf!T |
size [get]
|
Get total offset |
T |
width [get]
|
Get total horizontal offset |
Methods
Name | Description |
---|---|
add
(ins)
|
Sum two areas |
from
(source)
|
Construct from offsets with another base type via casting |
opBinary
(ins)
|
|
opBinary
(ins)
|
|
opBinary
(factor)
|
|
toString
()
|