stmm-games-doc  0.32.0
Public Types | Public Member Functions | Static Public Member Functions | List of all members
stmg::TileAlpha Class Reference
Inheritance diagram for stmg::TileAlpha:
Inheritance graph
[legend]

Public Types

enum  { ALPHA_MIN = 0, ALPHA_MAX = 255 }
 

Public Member Functions

 TileAlpha () noexcept
 
bool isEmpty () const noexcept
 Whether the alpha value is empty (not set). More...
 
void clear () noexcept
 Sets alpha to empty. More...
 
bool isOpaque () const noexcept
 Whether alpha is ALPHA_MAX. More...
 
bool operator== (const TileAlpha &oTileAlpha) const noexcept
 
uint8_t getAlpha () const noexcept
 The current alpha or ALPHA_MAX if empty. More...
 
void setAlpha (uint8_t nA) noexcept
 
double getAlpha1 () const noexcept
 
double setAlpha1 (double fA01) noexcept
 
void dump () const noexcept
 

Static Public Member Functions

static double alphaUint8ToDouble1 (uint8_t nAlpha) noexcept
 

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
ALPHA_MIN 

Value 0 corresponds to complete transparency.

ALPHA_MAX 

Value 255 corresponds to opaque.

Constructor & Destructor Documentation

◆ TileAlpha()

stmg::TileAlpha::TileAlpha ( )
inlinenoexcept

Member Function Documentation

◆ alphaUint8ToDouble1()

static double stmg::TileAlpha::alphaUint8ToDouble1 ( uint8_t  nAlpha)
inlinestaticnoexcept

◆ clear()

void stmg::TileAlpha::clear ( )
inlinenoexcept

Sets alpha to empty.

◆ dump()

void stmg::TileAlpha::dump ( ) const
inlinenoexcept

◆ getAlpha()

uint8_t stmg::TileAlpha::getAlpha ( ) const
inlinenoexcept

The current alpha or ALPHA_MAX if empty.

Returns
The alpha value.

◆ getAlpha1()

double stmg::TileAlpha::getAlpha1 ( ) const
inlinenoexcept

◆ isEmpty()

bool stmg::TileAlpha::isEmpty ( ) const
inlinenoexcept

Whether the alpha value is empty (not set).

◆ isOpaque()

bool stmg::TileAlpha::isOpaque ( ) const
inlinenoexcept

Whether alpha is ALPHA_MAX.

Returns
Whether alpha is not empty and opaque.

◆ operator==()

bool stmg::TileAlpha::operator== ( const TileAlpha oTileAlpha) const
inlinenoexcept

◆ setAlpha()

void stmg::TileAlpha::setAlpha ( uint8_t  nA)
inlinenoexcept

◆ setAlpha1()

double stmg::TileAlpha::setAlpha1 ( double  fA01)
inlinenoexcept