TextBufferBounds

A basic rectangle struct, used to specify the bounds of a TextBufferWriter.

Notes: This struct is not fully @nogc due to the use of std.format within assert messages.

Members

Functions

centerX
size_t centerX(size_t width)

Finds the relative center point on the X axis, optionally taking into account the width of another object (e.g. text).

centerY
size_t centerY(size_t height)

Finds the relative center point on the Y axis, optionally taking into account the height of another object (e.g. text).

Variables

height
size_t height;

height

left
size_t left;

x offset

top
size_t top;

y offset

width
size_t width;

width

Meta