Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
OpenWalnut
OpenWalnut Core
Commits
b8b999a8
Commit
b8b999a8
authored
Nov 28, 2011
by
Sebastian Eichelbaum
Browse files
[ADD] - added much more default colors and an iteratable default palette.
parent
de09d48b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
46 additions
and
2 deletions
+46
-2
src/core/common/WColor.h
src/core/common/WColor.h
+46
-2
No files found.
src/core/common/WColor.h
View file @
b8b999a8
...
...
@@ -65,12 +65,56 @@ WColor OWCOMMON_EXPORT inverseColor( const WColor& other );
namespace
defaultColor
{
// \cond Suppress_Doxygen
static
const
WColor
GREEN
(
0.
0
,
1
.0
,
0.0
,
1.0
);
//!< Default for
green
static
const
WColor
DARKRED
(
0.
5
,
0
.0
,
0.0
,
1.0
);
//!< Default for
dark red
static
const
WColor
RED
(
1.0
,
0.0
,
0.0
,
1.0
);
//!< Default for red
static
const
WColor
LIGHTRED
(
1.0
,
0.5
,
0.5
,
1.0
);
//!< Default for lighter red
static
const
WColor
DARKGREEN
(
0.0
,
0.5
,
0.0
,
1.0
);
//!< Default for a dark green
static
const
WColor
GREEN
(
0.0
,
1.0
,
0.0
,
1.0
);
//!< Default for green
static
const
WColor
LIGHTGREEN
(
0.5
,
1.0
,
0.5
,
1.0
);
//!< Default for lighter green
static
const
WColor
DARKBLUE
(
0.0
,
0.0
,
0.5
,
1.0
);
//!< Default for blue
static
const
WColor
BLUE
(
0.0
,
0.0
,
1.0
,
1.0
);
//!< Default for blue
static
const
WColor
LIGHTBLUE
(
0.5
,
0.5
,
1.0
,
1.0
);
//!< Default for blue
static
const
WColor
DARKYELLOW
(
0.5
,
0.5
,
0.0
,
1.0
);
//!< Default for yellow
static
const
WColor
YELLOW
(
1.0
,
1.0
,
0.0
,
1.0
);
//!< Default for yellow
static
const
WColor
LIGHTYELLOW
(
1.0
,
1.0
,
0.5
,
1.0
);
//!< Default for yellow
static
const
WColor
ORANGE
(
1.0
,
0.5
,
0.0
,
1.0
);
//!< Default for orange
static
const
WColor
VIOLET
(
0.5
,
0.5
,
0.0
,
1.0
);
//!< Default for violet (darker pink)
static
const
WColor
PINK
(
1.0
,
1.0
,
0.0
,
1.0
);
//!< Default for pink
static
const
WColor
TEAL
(
0.0
,
0.5
,
0.5
,
1.0
);
//!< Default for darker cyan (teal)
static
const
WColor
CYAN
(
0.0
,
1.0
,
1.0
,
1.0
);
//!< Default for cyan
static
const
WColor
BLACK
(
0.0
,
0.0
,
0.0
,
1.0
);
//!< Default for black
static
const
WColor
WHITE
(
1.0
,
1.0
,
1.0
,
1.0
);
//!< Default for black
static
const
WColor
GRAY25
(
0.25
,
0.25
,
0.25
,
1.0
);
//!< Default for gray
static
const
WColor
GRAY50
(
0.5
,
0.5
,
0.5
,
1.0
);
//!< Default for gray
static
const
WColor
GRAY75
(
0.75
,
0.75
,
0.75
,
1.0
);
//!< Default for gray
static
const
WColor
WHITE
(
1.0
,
1.0
,
1.0
,
1.0
);
//!< Default for white
// \endcond
/**
* The size of the default palette
*/
static
const
size_t
DefaultPaletteSize
=
22
;
/**
* 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
};
}
#endif // WCOLOR_H
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment