PNTK
Public Member Functions | Static Public Member Functions | List of all members
pntk::gui_color Class Reference

#include <gui_color.h>

Public Member Functions

 gui_color ()
 
 gui_color (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255)
 
 gui_color (int color)
 
 gui_color (gui_system_colors color)
 
int get_value () const
 
int get_red () const
 
int get_green () const
 
int get_blue () const
 
int get_alpha () const
 
int get_BGR () const
 
gui_color op_lerp (const gui_color &color, float factor) const
 
bool operator== (const gui_color &rhs) const
 
bool operator!= (const gui_color &rhs) const
 

Static Public Member Functions

static bool fill_color_cache ()
 

Detailed Description

A portable color abstraction class.

Constructor & Destructor Documentation

◆ gui_color() [1/4]

pntk::gui_color::gui_color ( )

Creates an empty color.

◆ gui_color() [2/4]

pntk::gui_color::gui_color ( unsigned char  red,
unsigned char  green,
unsigned char  blue,
unsigned char  alpha = 255 
)

Creates a new color using the given red, green, blue, and (optional) alpha values.

◆ gui_color() [3/4]

pntk::gui_color::gui_color ( int  color)

Creates a new color using the given color.

◆ gui_color() [4/4]

pntk::gui_color::gui_color ( gui_system_colors  color)

Creates a new color using a system-defined color.

Member Function Documentation

◆ get_alpha()

int pntk::gui_color::get_alpha ( ) const

Returns only the alpha value of the color.

◆ get_BGR()

int pntk::gui_color::get_BGR ( ) const

Returns the color as BGR (no alpha).

◆ get_blue()

int pntk::gui_color::get_blue ( ) const

Returns only the blue value of the color.

◆ get_green()

int pntk::gui_color::get_green ( ) const

Returns only the green value of the color.

◆ get_red()

int pntk::gui_color::get_red ( ) const

Returns only the red value of the color.

◆ get_value()

int pntk::gui_color::get_value ( ) const

Returns the 32bit integer representation of the color.

◆ op_lerp()

gui_color pntk::gui_color::op_lerp ( const gui_color color,
float  factor 
) const

Returns linear interpolation between this color and color given a factor value between 0.0 and 1.0.

◆ operator!=()

bool pntk::gui_color::operator!= ( const gui_color rhs) const

Returns true if the compared gui_colors are not equal.

◆ operator==()

bool pntk::gui_color::operator== ( const gui_color rhs) const

Returns true if the compared gui_colors are equal.


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