KTech 1.1.0
C++ 2D terminal game engine library
Loading...
Searching...
No Matches
KTech::Cell Struct Reference

Terminal cell comprising RGB foreground (character) color, RGB background color, and an ASCII character. More...

#include <cell.hpp>

Public Member Functions

constexpr Cell (char character=' ', RGB foreground=RGBColors::black, RGB background=RGBColors::black)
 Construct a Cell.
 
constexpr auto operator== (const Cell &cell) const -> bool
 Compare 2 Cells.
 

Public Attributes

char c
 ASCII character.
 
RGB f
 Foreground (character) color.
 
RGB b
 Background color.
 

Detailed Description

Terminal cell comprising RGB foreground (character) color, RGB background color, and an ASCII character.

Constructor & Destructor Documentation

◆ Cell()

KTech::Cell::Cell ( char character = ' ',
RGB foreground = RGBColors::black,
RGB background = RGBColors::black )
inlineconstexpr

Construct a Cell.

Parameters
[in]characterASCII character.
[in]foregroundForeground (character) color.
[in]backgroundBackground color.

Member Function Documentation

◆ operator==()

auto KTech::Cell::operator== ( const Cell & cell) const -> bool
inlineconstexpr

Compare 2 Cells.

Parameters
[in]cellThe Cell to compare with this Cell.
Returns
true: the foreground colors, background colors, and characters are equal. false: they are unequal.

The documentation for this struct was generated from the following file: