Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members

Color Class Reference

List of all members.

Detailed Description

Representation of a color.


Color operations are very sensitive to the current display settings. You should only construct colors while the display is properly setup, and is initialized with the palette that you wish to use.
Do not use color objects after you have changed display settings.

Definition at line 46 of file Color.h.

Public Member Functions

 Color (UInt8 r, UInt8 g, UInt8 b)
 Construct a color with the specified RGB values.

void init (UInt8 r, UInt8 g, UInt8 b)
 Set an existing color object to the color with the specified RGB values.

IndexedColorType getIndexedColor () const
 Get the index of the color in the display's current palette.

RGBColorType getRGBColor () const

Static Public Attributes

const Color BLACK
const Color WHITE


Constructor & Destructor Documentation

Color::Color UInt8    r,
UInt8    g,
UInt8    b
 

Construct a color with the specified RGB values.

Parameters:
r the red value from 0-255
g the green value from 0-255
b the blue value from 0-255


Member Function Documentation

void Color::init UInt8    r,
UInt8    g,
UInt8    b
 

Set an existing color object to the color with the specified RGB values.

Use this to reuse color objects, which might reduce memory fragmentation.

Parameters:
r the red value from 0-255
g the green value from 0-255
b the blue value from 0-255

IndexedColorType Color::getIndexedColor   const
 

Get the index of the color in the display's current palette.

RGBColorType Color::getRGBColor   const
 


Member Data Documentation

const Color Color::BLACK [static]
 

Definition at line 75 of file Color.h.

const Color Color::WHITE [static]
 

Definition at line 76 of file Color.h.


The documentation for this class was generated from the following file:
Razor! Engine Developer's Guide. Copyright © by Tilo Christ. All Rights Reserved. Last updated: 31 May 2003