+
+
+Cached Multimedia - Examples
+----------------------------
+
+
+
+
+Layers - Summary
+----------------
+
+Layers introduce the concept of a layer "Z" coordinate to the existing
+rows ("Y") by columns ("X") grid. Put another way, the
+two-dimensional grid of columns-by-rows becomes a three-dimensional
+cube of columns-by-rows-by-layers. For this document, the column,
+row, and layer coordinates are referred to as X, Y, and Z. This
+cartesian coordinate system is right-handed, with the Z axis pointing
+"away" from the user "into" the screen.
+
+An application treats the Z coordinate exactly as it does X and Y
+(rows and columns) coordinates:
+
+ * If it attemps to set Z to a value less than 1, then Z is set to 1.
+
+ * If it attempts to set Z to a value greater than the number of
+ layers, then Z is set to the number of layers.
+
+New sequences are provided to set and query Z, Y, X, to set and query
+the screen cube size, and control visibility of Cells in-front-of
+other Cells.
+
+Operations that act on more than one Cell are defined such to act on
+all layers simultaneously by default.
+
+
+
+Layers - Number of Layers
+-------------------------
+
+A terminal is required to provide between 1 and a finite number of
+layers.
+
+The number of layers may be different between the primary and
+alternate screens.
+
+An application may request that the terminal allocate additional
+layers. The terminal is free to honor or ignore such requests as it
+sees fit.
+
+The scrollback buffer is permitted, and recommended, to contain only a
+"flattened" single layer.
+
+
+
+Layers - Terminal State
+-----------------------
+
+The terminal maintains a complex state at all times. This state
+includes variables such as cursor position, foreground/background
+color, attributes to apply to the next displayed character, and so on.
+The layers feature adds more variables to the state, and these
+variables are required to be stored with DECSC (ESC 7) and restored
+with DECRC (ESC 8). The new variables are listed below:
+
+| Mnemonic | Description | Default value |
+|----------|-----------------------------|---------------|
+| Z | Cursor position Z | 1 |
+| MAL | Manipulate all layers | on / enabled |
+| TFT | Text foreground transparent | false |
+| TBT | Text background transparent | false |
+
+
+
+Layers - Required Support For Existing Sequences
+------------------------------------------------
+
+A terminal with layers feature must support the standard VT100/VT102
+sequences defined in their respective manuals.
+
+
+
+Layers - New Sequences
+----------------------
+
+A terminal with layer feature must support the following new
+sequences:
+
+| Sequence | Command | Description |
+|-------------------|-------------|----------------------------------------|
+| CSI ? z ; y ; x H | CUPZ | Move cursor to (x, y, z) |
+| CSI ? z ; y ; x H | SLA | Set layer alpha |
+| CSI ? 3 0 0 1 h | DECSET 3001 | Disable Manipulate All Layers (MAL) |
+| CSI ? 3 0 0 1 l | DECRST 3001 | Enable Manipulate All Layers (MAL) |
+| CSI ? l ; h ; w t | RSZCUBE | Resize cube to (layers, height, width) |
+
+Default parameters and ranges are listed below:
+
+| Command | Position / Variable | Default Value | Minumum | Maximum |
+|---------|---------------------|---------------|---------|-----------|
+| CUPZ | 1 / z | 1 | 1 | # layers |
+| CUPZ | 2 / y | 1 | 1 | # rows |
+| CUPZ | 3 / x | 1 | 1 | # columns |
+| SLA | 1 / alpha | 255 | 0 | 255 |
+| RSZCUBE | 1 / l | 1 | 1 | varies |
+| RSZCUBE | 2 / h | 80 | 1 | varies |
+| RSZCUBE | 3 / w | 24 | 1 | varies |
+
+The terminal must also support the following new queries:
+
+| Query | Response | Description |
+|-----------------------------------------|------------------------------------|
+| CSI ? 1 0 0 n | CSI ? z ; y ; x n | Report cursor Z, Y, X position |
+| CSI ? 1 8 t | CSI ? 8 ; l ; h ; w t | Report the text area cube layers, height, width |
+
+
+The terminal must support the following new Set Graphics Rendition
+(SGR) character attributes commands:
+
+| SGR Parameter | Description |
+|---------------|---------------------------------------------|
+| 230 | Set text foreground color to transparent |
+| 239 | Set text foreground color to solid (opaque) |
+| 240 | Set text background color to transparent |
+| 249 | Set text background color to solid (opaque) |
+
+
+
+
+Layers - Error Handling
+-----------------------
+
+No additional error reporting is provided for layer feature.
+
+
+
+Layers - Rendering
+------------------
+
+A terminal with layer feature will display its Cells such that the
+screen will appear as if it was rendered in the manner of the
+pseudo-code below: