OpenWalnut
1.4.0
|
Item used in the selection below also containing color info. More...
#include <WDataSetFibers.h>
Public Types | |
enum | ColorMode { GRAY = 1, RGB = 3, RGBA = 4 } |
different kinds of color arrays can be used in this class. More... | |
Public Member Functions | |
ColorScheme (std::string name, std::string description, const char **icon, ColorArray color, ColorMode mode=RGB) | |
Constructor. | |
ColorArray | getColor () const |
Get the color. | |
ColorMode | getMode () const |
Returns the mode of the color scheme. | |
Protected Member Functions | |
void | setColor (ColorArray color, ColorMode mode=RGB) |
Sets the color array for this item. | |
Private Attributes | |
ColorArray | m_color |
The color array associated with the item. | |
ColorMode | m_mode |
Coloring mode. | |
Friends | |
class | WDataSetFibers |
Item used in the selection below also containing color info.
Definition at line 109 of file WDataSetFibers.h.
different kinds of color arrays can be used in this class.
This enum defines their possible types.
Definition at line 116 of file WDataSetFibers.h.
WDataSetFibers::ColorScheme::ColorScheme | ( | std::string | name, |
std::string | description, | ||
const char ** | icon, | ||
ColorArray | color, | ||
ColorMode | mode = RGB |
||
) | [inline] |
Constructor.
Creates new item.
name | name, name of item. |
description | description of item. Can be empty. |
icon | icon, can be NULL |
color | the color array of this item. |
mode | the mode of the color array. This defines whether the colors are luminance, RGB or RGBA |
Definition at line 133 of file WDataSetFibers.h.
ColorArray WDataSetFibers::ColorScheme::getColor | ( | ) | const [inline] |
Get the color.
Definition at line 145 of file WDataSetFibers.h.
References m_color.
ColorMode WDataSetFibers::ColorScheme::getMode | ( | ) | const [inline] |
Returns the mode of the color scheme.
Definition at line 155 of file WDataSetFibers.h.
References m_mode.
void WDataSetFibers::ColorScheme::setColor | ( | ColorArray | color, |
ColorMode | mode = RGB |
||
) | [inline, protected] |
Sets the color array for this item.
color | the color to set. |
mode | the mode of the color array. This defines whether the colors are luminance, RGB or RGBA |
Definition at line 167 of file WDataSetFibers.h.
References m_color, and m_mode.
Referenced by WDataSetFibers::replaceColorScheme().
The color array associated with the item.
Definition at line 171 of file WDataSetFibers.h.
Referenced by getColor(), and setColor().
ColorMode WDataSetFibers::ColorScheme::m_mode [private] |
Coloring mode.
Definition at line 182 of file WDataSetFibers.h.
Referenced by getMode(), and setColor().