FTXUI  5.0.0
C++ functional terminal UI.
Image Class Reference

A rectangular grid of Pixel. More...

+ Inheritance diagram for Image:

Public Member Functions

 Image ()=delete
 
 Image (int dimx, int dimy)
 
std::string & at (int x, int y)
 Access a character in a cell at a given position. More...
 
const std::string & at (int x, int y) const
 Access a character in a cell at a given position. More...
 
PixelPixelAt (int x, int y)
 Access a cell (Pixel) at a given position. More...
 
const PixelPixelAt (int x, int y) const
 Access a cell (Pixel) at a given position. More...
 
int dimx () const
 
int dimy () const
 
void Clear ()
 Clear all the pixel from the screen. More...
 

Data Fields

Box stencil
 

Protected Attributes

int dimx_
 
int dimy_
 
std::vector< std::vector< Pixel > > pixels_
 

Detailed Description

A rectangular grid of Pixel.

Definition at line 17 of file image.hpp.

Constructor & Destructor Documentation

◆ Image() [1/2]

Image ( )
delete

◆ Image() [2/2]

Image ( int  dimx,
int  dimy 
)

Definition at line 20 of file image.cpp.

Member Function Documentation

◆ at() [1/2]

std::string & at ( int  x,
int  y 
)

Access a character in a cell at a given position.

Parameters
xThe cell position along the x-axis.
yThe cell position along the y-axis.

Definition at line 29 of file image.cpp.

◆ at() [2/2]

const std::string & at ( int  x,
int  y 
) const

Access a character in a cell at a given position.

Parameters
xThe cell position along the x-axis.
yThe cell position along the y-axis.

Definition at line 36 of file image.cpp.

◆ PixelAt() [1/2]

Pixel & PixelAt ( int  x,
int  y 
)

Access a cell (Pixel) at a given position.

Parameters
xThe cell position along the x-axis.
yThe cell position along the y-axis.

Definition at line 43 of file image.cpp.

◆ PixelAt() [2/2]

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

Access a cell (Pixel) at a given position.

Parameters
xThe cell position along the x-axis.
yThe cell position along the y-axis.

Definition at line 50 of file image.cpp.

◆ dimx()

int dimx ( ) const
inline

Definition at line 32 of file image.hpp.

◆ dimy()

int dimy ( ) const
inline

Definition at line 33 of file image.hpp.

◆ Clear()

void Clear ( )

Clear all the pixel from the screen.

Definition at line 55 of file image.cpp.

Field Documentation

◆ stencil

Box stencil

Definition at line 38 of file image.hpp.

◆ dimx_

int dimx_
protected

Definition at line 41 of file image.hpp.

◆ dimy_

int dimy_
protected

Definition at line 42 of file image.hpp.

◆ pixels_

std::vector<std::vector<Pixel> > pixels_
protected

Definition at line 43 of file image.hpp.


The documentation for this class was generated from the following files: