ROLAND  0.70
Amstrad Emulator based on Caprice Source rewritten in C++.
Public Member Functions | Protected Attributes | List of all members
Color Class Reference

RGBA Color Type. More...

#include <color.h>

Public Member Functions

 Color ()
 
 Color (Uint8 r, Uint8 g, Uint8 b, Uint8 a=255)
 
 ~Color () ROLAND_DEFAULT Color(const Color &c)
 
bool operator== (const Color &color) const
 
bool operator!= (const Color &color) const
 
Color operator+ (const Color &color) const
 
Color operator- (const Color &color) const
 
Color operator* (float value) const
 
void set (Uint8 r, Uint8 g, Uint8 b, Uint8 a=255)
 
void setBlack ()
 
void setWhite ()
 
void setAlpha (Uint8 a)
 
void clearAlpha ()
 
bool hasAlpha ()
 
Uint8 r () const
 
Uint8 g () const
 
Uint8 b () const
 
Uint8 a () const
 
void setR (Uint8 r)
 
void setG (Uint8 g)
 
void setB (Uint8 b)
 
void setA (Uint8 a)
 

Protected Attributes

Uint8 mR
 
Uint8 mG
 
Uint8 mB
 
Uint8 mA
 

Detailed Description

RGBA Color Type.

Bug:
operators does not work correctly
Todo:
operators*/

Constructor & Destructor Documentation

Color ( )
Color ( Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a = 255 
)
inline
~Color ( ) const
inline

References Color::mA, Color::mB, Color::mG, and Color::mR.

Member Function Documentation

Uint8 a ( ) const
inline
Uint8 b ( ) const
inline
void clearAlpha ( )
inline

References Color::mA.

Uint8 g ( ) const
inline
bool hasAlpha ( )
inline
bool operator!= ( const Color color) const
inline
Color operator* ( float  value) const
Color operator+ ( const Color color) const
Color operator- ( const Color color) const
bool operator== ( const Color color) const
inline
Uint8 r ( ) const
inline
void set ( Uint8  r,
Uint8  g,
Uint8  b,
Uint8  a = 255 
)
void setA ( Uint8  a)
inline
void setAlpha ( Uint8  a)
inline

References Color::a(), and Color::mA.

void setB ( Uint8  b)
inline
void setBlack ( )
inline

References Color::mA, Color::mB, Color::mG, and Color::mR.

void setG ( Uint8  g)
inline
void setR ( Uint8  r)
inline
void setWhite ( )
inline

References Color::mA, Color::mB, Color::mG, and Color::mR.

Member Data Documentation

Uint8 mA
protected
Uint8 mB
protected
Uint8 mG
protected
Uint8 mR
protected

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