JNGL
Easy to use cross-platform 2D game library
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
Alpha Class Reference

Object representing only the Alpha Channel in an RGBA color, 0 meaning invisible, 1 fully visible. More...

#include <jngl/Alpha.hpp>

Public Member Functions

 Alpha (float alpha)
 
uint8_t u8 () const
 0...255
 
float getAlpha () const
 0.0f ... 1.0f
 
void setAlpha (float)
 0.0f ... 1.0f
 

Static Public Member Functions

static Alpha u8 (uint8_t alpha)
 

Detailed Description

Object representing only the Alpha Channel in an RGBA color, 0 meaning invisible, 1 fully visible.

Definition at line 12 of file Alpha.hpp.

Constructor & Destructor Documentation

◆ Alpha()

Alpha ( float alpha)
explicit
Parameters
alpha0.0f ... 1.0f

Values over 1.0f will result in 1.0f and negatives will result in 0.0f.

Member Function Documentation

◆ u8()

static Alpha u8 ( uint8_t alpha)
static
Parameters
alpha0...255

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