ftxui::Surface
cpp
#include <ftxui/screen/surface.hpp>Derived classes: ftxui::Screen
A rectangular grid of Cell.
Note
This class was previously named Image.
Summary
| Symbol | Description |
|---|---|
stencil | |
Surface | |
~Surface | |
operator= | |
at | Access a character in a cell at a given position. |
CellAt | Access a cell (Cell) at a given position. |
PixelAt | |
dimx | |
dimy | |
Clear | Clear all the cells from the surface. |
Public Attributes
stencil
cpp
Box stencil;Public Member Functions
Surface
cpp
Surface();Surface
cpp
Surface(int dimx, int dimy);~Surface
cpp
virtual ~Surface();Surface
operator=
at
cpp
std::string & at(int x, int y);Access a character in a cell at a given position.
Parameters:
x: The cell position along the x-axis.y: The cell position along the y-axis.
at
cpp
const std::string & at(int x, int y) const;Access a character in a cell at a given position.
Parameters:
x: The cell position along the x-axis.y: The cell position along the y-axis.
CellAt
Access a cell (Cell) at a given position.
Parameters:
x: The cell position along the x-axis.y: The cell position along the y-axis.
CellAt
Access a cell (Cell) at a given position.
Parameters:
x: The cell position along the x-axis.y: The cell position along the y-axis.
PixelAt
PixelAt
dimx
cpp
int dimx() const;dimy
cpp
int dimy() const;Clear
cpp
void Clear();Clear all the cells from the surface.