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. 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.

Definition at line 11 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.


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