home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
oct93
/
graphics
/
graphtal.lha
/
Graphtal
/
Color.h
< prev
next >
Wrap
C/C++ Source or Header
|
1992-11-17
|
1KB
|
60 lines
/*
* Color.h - class definition for color handling.
*
* Copyright (C) 1992, Christoph Streit (streit@iam.unibe.ch)
* University of Berne, Switzerland
* 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 only 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