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

Like Cell, but with RGBA foreground and background colors, instead of RGB. More...

#include <cella.hpp>

Public Member Functions

constexpr CellA (char character=' ', RGBA foreground=RGBAColors::transparent, RGBA background=RGBAColors::transparent)
 Construct a CellA.
 
constexpr CellA (Cell cell, uint8_t foregroundAlpha, uint8_t backgroundAlpha)
 Construct a CellA from a Cell.
 
constexpr auto operator== (const CellA &cellA) const -> bool
 Compare 2 CellAs.
 

Public Attributes

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

Detailed Description

Like Cell, but with RGBA foreground and background colors, instead of RGB.

Constructor & Destructor Documentation

◆ CellA() [1/2]

KTech::CellA::CellA ( char character = ' ',
RGBA foreground = RGBAColors::transparent,
RGBA background = RGBAColors::transparent )
inlineconstexpr

Construct a CellA.

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

◆ CellA() [2/2]

KTech::CellA::CellA ( Cell cell,
uint8_t foregroundAlpha,
uint8_t backgroundAlpha )
inlineconstexpr

Construct a CellA from a Cell.

Parameters
[in]cellBase Cell.
[in]foregroundAlphaAlpha to add to the foreground (character) color.
[in]backgroundAlphaAlpha to add to the background color.

Member Function Documentation

◆ operator==()

auto KTech::CellA::operator== ( const CellA & cellA) const -> bool
inlineconstexpr

Compare 2 CellAs.

Parameters
[in]cellAThe CellA to compare with this CellA.
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: