Commit 879410c3 authored by Mario Hlawitschka's avatar Mario Hlawitschka
Browse files

[CHANGE] moved list of colors to cpp file to avoid having them declared in...

[CHANGE] moved list of colors to cpp file to avoid having them declared in every object that includes WColor.h. We have to do some similar cleanups with other static variables as well.
parent bba12547
......@@ -32,6 +32,22 @@
#include "../common/WStringUtils.h"
#include "WColor.h"
// initialize static palette
namespace defaultColor
{
/** the default palette colors */
static const WColor defaultPalette[ 22 ]= {
// The standard colors
RED, GREEN, BLUE, YELLOW, ORANGE, PINK, CYAN,
// the slightly lighter standard colors
LIGHTRED, LIGHTGREEN, LIGHTBLUE, LIGHTYELLOW,
// the slighly darker standard colors
DARKRED, DARKGREEN, DARKBLUE, DARKYELLOW, VIOLET, TEAL,
// black-white
BLACK, GRAY25, GRAY50, GRAY75, WHITE
};
}
// This function is taken from VTK 5.4.2. Since its BSD licensed the license
// notice follows below. It is not taken from FAnToM since it seems more self
// documenting.
......
......@@ -25,8 +25,6 @@
#ifndef WCOLOR_H
#define WCOLOR_H
#include <iostream>
#include <osg/Vec4>
#include <osg/io_utils> // for the operator<< and operator>> for Vec4
......@@ -105,16 +103,7 @@ namespace defaultColor
* This array is a simple palette definition containing the above colors. This palette is probably not very usable for all your special
* needs. DO NOT add thousand other palettes here. Define them for yourself, in your module.
*/
static const WColor DefaultPalette[22] = {
// The standard colors
RED, GREEN, BLUE, YELLOW, ORANGE, PINK, CYAN,
// the slightly lighter standard colors
LIGHTRED, LIGHTGREEN, LIGHTBLUE, LIGHTYELLOW,
// the slighly darker standard colors
DARKRED, DARKGREEN, DARKBLUE, DARKYELLOW, VIOLET, TEAL,
// black-white
BLACK, GRAY25, GRAY50, GRAY75, WHITE
};
extern const WColor DefaultPalette[22];
}
#endif // WCOLOR_H
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment