enable.layout.geometry module

class enable.layout.geometry.BaseBox(top=None, right=None, bottom=None, left=None)[source]

Bases: tuple

A tuple subclass representing a (top, right, bottom, left) box. Subclasses should override the __new__ method to enforce any typing.

property bottom

The ‘bottom’ component of the box.

static coerce_type(item)[source]
property left

The ‘left’ component of the box.

property right

The ‘right’ component of the box.

property top

The ‘top’ component of the box.

class enable.layout.geometry.BasePos(x, y)[source]

Bases: tuple

A tuple subclass representing a (x, y) positions. Subclasses should override the __new__ method to enforce any necessary typing.

property x

The ‘x’ component of the size.

property y

The ‘y’ component of the size.

class enable.layout.geometry.BaseRect(x, y, width, height)[source]

Bases: tuple

A tuple subclass representing an (x, y, width, height) bounding box. Subclasses should override the __new__ method to enforce any necessary typing.

property height

The ‘height’ size component of the rect.

property width

The ‘width’ size component of the rect.

property x

The ‘x’ position component of the rect.

property y

The ‘y’ position component of the rect.

class enable.layout.geometry.BaseSize(width=None, height=None)[source]

Bases: tuple

A tuple subclass representing a (width, height) size. Subclasses should override the __new__ method to enforce any necessary typing.

static coerce_type(item)[source]
property height

The ‘height’ component of the size.

property width

The ‘width’ component of the size.

class enable.layout.geometry.Box(top=None, right=None, bottom=None, left=None)[source]

Bases: enable.layout.geometry.BaseBox

A BaseBox implementation for integer values.

static coerce_type(item)[source]
property pos

The Pos of this box.

property rect

The equivalent Rect for this box.

property size

The Size of this box.

class enable.layout.geometry.BoxF(top=None, right=None, bottom=None, left=None)[source]

Bases: enable.layout.geometry.BaseBox

A BaseBox implementation for floating point values.

static coerce_type(item)[source]
property pos

The Pos of this box.

property rect

The equivalent Rect for this box.

property size

The Size of this box.

class enable.layout.geometry.Pos(x, y)[source]

Bases: enable.layout.geometry.BasePos

An implementation of BasePos for integer values.

class enable.layout.geometry.PosF(x, y)[source]

Bases: enable.layout.geometry.BasePos

An implementation of BasePos of floating point values.

class enable.layout.geometry.Rect(x, y, width, height)[source]

Bases: enable.layout.geometry.BaseRect

A BaseRect implementation for integer values.

property box

The equivalent Box for this rect.

property pos

The position of the rect as a Pos object.

property size

The size of the rect as a Size object.

class enable.layout.geometry.RectF(x, y, width, height)[source]

Bases: enable.layout.geometry.BaseRect

A BaseRect implementation for floating point values.

property box

The equivalent Box for this rect.

property pos

The position of the rect as a Pos object.

property size

The size of the rect as a Size object.

class enable.layout.geometry.Size(width=None, height=None)[source]

Bases: enable.layout.geometry.BaseSize

A BaseSize implementation for integer values.

static coerce_type(item)[source]
class enable.layout.geometry.SizeF(width=None, height=None)[source]

Bases: enable.layout.geometry.BaseSize

A BaseSize implementation for floating point values.

static coerce_type(item)[source]