Skip to content
You are viewing documentation for v6.1.2. Switch to latest (main).

ftxui::Image ​

cpp
#include <ftxui/screen/image.hpp>

Derived classes: ftxui::Screen

A rectangular grid of Pixel.

Summary ​

SymbolDescription
stencil
Image
atAccess a character in a cell at a given position.
PixelAtAccess a cell (Pixel) at a given position.
dimx
dimy
ClearClear all the pixel from the screen.

Public Attributes ​

stencil ​

cpp
Box stencil;

Public Member Functions ​

Image ​

cpp
Image();

Image ​

cpp
Image(int dimx, int dimy);

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.

PixelAt ​

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

Access a cell (Pixel) at a given position.

Parameters:

  • x: The cell position along the x-axis.
  • y: The cell position along the y-axis.

PixelAt ​

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

Access a cell (Pixel) at a given position.

Parameters:

  • x: The cell position along the x-axis.
  • y: The cell position along the y-axis.

dimx ​

cpp
int dimx() const;

dimy ​

cpp
int dimy() const;

Clear ​

cpp
void Clear();

Clear all the pixel from the screen.