Skip to content
You are viewing documentation for v7.0.1. Switch to latest (main).

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 ​

SymbolDescription
stencil
Surface
~Surface
operator=
atAccess a character in a cell at a given position.
CellAtAccess a cell (Cell) at a given position.
PixelAt
dimx
dimy
ClearClear 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 ​

cpp
Surface(const Surface &);

operator= ​

cpp
Surface & operator=(const Surface &);

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 ​

cpp
Cell & CellAt(int x, int y);

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 ​

cpp
const Cell & CellAt(int x, int y) const;

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 ​

cpp
Cell & PixelAt(int x, int y);

PixelAt ​

cpp
const Cell & PixelAt(int x, int y) const;

dimx ​

cpp
int dimx() const;

dimy ​

cpp
int dimy() const;

Clear ​

cpp
void Clear();

Clear all the cells from the surface.