home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Photo CD Demo 1
/
Demo.bin
/
graphtal
/
color.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-10-22
|
1KB
|
59 lines
/*
* Color.h - class definition for color handling.
*
* Copyright (C) 1992, Christoph Streit (streit@iam.unibe.ch)
* All rights reserved.
*
* This software may be freely copied, modified, and redistributed
* provided that this copyright notice is preserved on all copies.
*
* You may not distribute this software, in whole or in part, as part of
* any commercial product without the express consent of the authors.
*
* There is no warranty or other guarantee of fitness of this software
* for any purpose. It is provided solely "as is".
*
*/
#ifndef Color_H
# define Color_H
#include "rcString.h"
/*___________________________________________________________ Color
*
* Colordefinitions are stored in a color file with the following
* format:
*
* R G B colorName
* ...
*
* These color definitions are read once.
*/
class ColorTable;
class Color {
public:
static void setupColors();
Color();
Color(const rcString&);
const rcString& colorName() const { return name; }
float r() const { return red; }
float g() const { return green; }
float b() const { return blue; }
private:
rcString name;
float red, green, blue;
private:
static void readColors();
static ColorTable* colors;
static rcString ColorFile;
};
#endif // Color_H