Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

SDLmm::ColorRGB Class Reference

A small usefull class representing an RGB color. More...

#include <sdlmm_color.h>

Inheritance diagram for SDLmm::ColorRGB::

SDLmm::ColorRGBA List of all members.

Public Methods

 ColorRGB ()
 Default constructor which creates an empty ColorRGB (rgb variables set to zero). More...

 ColorRGB (const ColorRGB &color)
 This is the copy constructor. Simply initializes the value of an ColorRGB to that of another ColorRGB. More...

 ColorRGB (Uint8 nr, Uint8 ng, Uint8 nb)
 Constructor which initializes the class from integer values. More...

ColorRGB& operator= (const ColorRGB &color)
 Set the value of an ColorRGB to that of an existing ColorRGB. More...

bool operator== (const ColorRGB &color) const
 Compare two colors for equality. More...


Public Attributes

Uint8 r
Uint8 g
Uint8 b

Detailed Description

A small usefull class representing an RGB color.

Author:
Adam Gates

Definition at line 32 of file sdlmm_color.h.


Constructor & Destructor Documentation

SDLmm::ColorRGB::ColorRGB ( ) [inline]
 

Default constructor which creates an empty ColorRGB (rgb variables set to zero).

Definition at line 36 of file sdlmm_color.h.

SDLmm::ColorRGB::ColorRGB ( const ColorRGB & color ) [inline]
 

This is the copy constructor. Simply initializes the value of an ColorRGB to that of another ColorRGB.

Parameters:
color   an existing ColorRGB object.

Definition at line 42 of file sdlmm_color.h.

SDLmm::ColorRGB::ColorRGB ( Uint8 nr,
Uint8 ng,
Uint8 nb ) [inline]
 

Constructor which initializes the class from integer values.

Parameters:
nr, red   component
ng, green   component
nb, blue   component

Definition at line 51 of file sdlmm_color.h.


Member Function Documentation

ColorRGB & SDLmm::ColorRGB::operator= ( const ColorRGB & color ) [inline]
 

Set the value of an ColorRGB to that of an existing ColorRGB.

Definition at line 55 of file sdlmm_color.h.

bool SDLmm::ColorRGB::operator== ( const ColorRGB & color ) const [inline]
 

Compare two colors for equality.

Returns:
true if coordinates are identical in both colors.

Definition at line 69 of file sdlmm_color.h.


Member Data Documentation

Uint8 SDLmm::ColorRGB::b
 

Definition at line 75 of file sdlmm_color.h.

Uint8 SDLmm::ColorRGB::g
 

Definition at line 74 of file sdlmm_color.h.

Uint8 SDLmm::ColorRGB::r
 

Definition at line 73 of file sdlmm_color.h.


The documentation for this class was generated from the following file:
Documentation automatically generated by doxygen written by Dimitri van Heesch. Project hosted at
Hosted by SourceForge