awsc.termui.alignment.CenterAnchor

class awsc.termui.alignment.CenterAnchor(xoffset, yoffset)

Anchor class which specifies a block is aligned with the center of the parent at a fixed offset.

Anchor point: center of the block.

Parent point: center of the block.

Attributes:
xoffsetint

The horizontal offset from the center.

yoffsetint

The vertical offset from the center

Methods

anchor(parent)

Returns the position of the anchor point of the block.

topleft(dim, parent)

Returns the position of the top left corner of the anchored block.

__init__(xoffset, yoffset)

Initializes a CenterAnchor object.

Parameters:
xoffsetint

The horizontal offset from the center.

yoffsetint

The vertical offset from the center

Methods

__init__(xoffset, yoffset)

Initializes a CenterAnchor object.

anchor(parent)

Returns the position of the anchor point of the block.

topleft(dim, parent)

Returns the position of the top left corner of the anchored block.