struct

TermBuf::Placement

Inherits Struct < Value < Object

Stability: stable — changes only in a major release.

An image on screen: which image, and the cells it covers.

Constructors

new(image : UInt32, id : UInt32, bounds : Rect, z : Int32 = 0)
Source

Instance methods

bounds

The cells it covers.

Source
id

Which placement of that image, since one image may be on screen more than once.

Source
image

Which image, by the id the protocol refers to it with.

Source
under_text?

Whether this sits beneath the text rather than over it.

Source
x

Column of the left edge.

Source
y

Row of the top edge.

Source
z

Where this sits in the stack against the text and the other placements.

Zero is over the text, which is the default and what an image drawn to be looked at wants. Negative is under it, so the cells keep their glyphs and the picture shows through wherever they are blank — a chart behind a table, a watermark. Higher covers lower among placements, so a cascade is a rising z and nothing else.

The protocol's own rule for the boundary: text is drawn between -1 and 0, so -1 is the topmost layer still beneath it.

Source