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:

[legend]
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

## Constructor & Destructor Documentation

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

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

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.

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

## Member Function Documentation

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

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

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

| Compare two colors for equality. Returns: true if coordinates are identical in both colors.

## Member Data Documentation

Uint8 SDLmm::ColorRGB::b

Uint8 SDLmm::ColorRGB::g

Uint8 SDLmm::ColorRGB::r

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

- sdlmm_color.h

Documentation automatically generated by written by Dimitri van Heesch. | Project hosted at