Edging

Description

struct Tinman.Engine.GUI.Edging

Represents padding amounts for each edge of a rectangle.

Public / Constants

Default


public static readonly attribute Default → (Edging)

Default margin.

Zero


public static readonly attribute Zero → (Edging)

Edging with zero spacing at all four edges.

Public / Constructors

Edging

2 overloads


public constructor Edging1 → (1)

amount in : int32

[>=0]
Spacing at all edge, in pixels.

Creates a new instance of Edging.


public constructor Edging2 → (4)

top in : int32

[>=0]
Spacing at top edge, in pixels.

left in : int32

[>=0]
Spacing at left edge, in pixels.

bottom in : int32

[>=0]
Spacing at bottom edge, in pixels.

right in : int32

[>=0]
Spacing at right edge, in pixels.

Creates a new instance of Edging.

Public / Methods

Add

2 overloads


public method Add1 → (1)

other in : Edging

The other spacing values.

returns → Edging

The resulting spacing values.

Adds the given spacing values.


public method Add2 → (4)

top in : int32

Spacing delta at top edge, in pixels.

left in : int32

Spacing delta at left edge, in pixels.

bottom in : int32

Spacing delta at bottom edge, in pixels.

right in : int32

Spacing delta at right edge, in pixels.

returns → Edging

The resulting spacing values.

Modifies the spacing values.

Max

2 overloads


public method Max1 → (1)

other in : Edging

The other spacing values.

returns → Edging

The resulting spacing values.

Determines the maximum spacing values.


public method Max2 → (4)

top in : int32

[>=0]
Spacing value at top edge, in pixels.

left in : int32

[>=0]
Spacing value at left edge, in pixels.

bottom in : int32

[>=0]
Spacing value at bottom edge, in pixels.

right in : int32

[>=0]
Spacing value at right edge, in pixels.

returns → Edging

The resulting spacing values.

Determines the maximum spacing values.

Reduce


public method Reduce → (1)

anchor in : Anchor

The layout anchor.

returns → Edging

The reduced spacing.

Reduces spacing based on the given layout anchor.

Top spacing is reduced to 0 if vertical anchor is Anchor.Bottom.
Left spacing is reduced to 0 if horizontal anchor is Anchor.Right.
Bottom spacing is reduced to 0 if vertical anchor is Anchor.Top.
Right spacing is reduced to 0 if horizontal anchor is Anchor.Left.

Public / Attributes

Bottom


public readonly attribute Bottom → (int32)

Spacing at bottom edge, in pixels.

Height


public attribute Height → (get)

value : int32

[>=0]
The vertical edging.

Returns the vertical edging (i.e. top plus bottom).

Left


public readonly attribute Left → (int32)

Spacing at left edge, in pixels.

Right


public readonly attribute Right → (int32)

Spacing at right edge, in pixels.

Top


public readonly attribute Top → (int32)

Spacing at top edge, in pixels.

Width


public attribute Width → (get)

value : int32

[>=0]
The horizontal edging.

Returns the horizontal edging (i.e. left plus right).