It models the concept of color scheme.
More...
#include <ColorScheme.h>
|
|
Methods related to instantiation and destruction.
|
| ColorScheme (const std::string &name) |
| It initializes a new ColorScheme and adds it to the parent group of schemes. More...
|
|
| ~ColorScheme () |
| Destructor. More...
|
|
|
Methods used to get or set properties.
|
const std::string & | getName () const |
| It returns the color schema name. More...
|
|
void | setName (const std::string &name) |
| It sets the color schema name and adjust its entry in the scheme group if needed. More...
|
|
void | push_back (std::vector< RGBAColor > *colors) |
| It adds a new list of colors to the color scheme. More...
|
|
const std::vector< std::vector< RGBAColor > * > & | getColors () const |
| It returns all color lists. More...
|
|
std::vector< RGBAColor > * | getColors (size_t size) const |
| It returns a color list having the specified number of elements or NULL if none is found. More...
|
|
ColorSchemeGroup * | getParent () const |
| It returns the parent scheme group or NULL if it doesn't belong to a group. More...
|
|
It models the concept of color scheme.
It is used to construct color scheme catalogs, that helps the user to decide the right colors to use in a map. A color scheme has a name and a set of list colors. Each list can have a certain number of colors.
- See also
- ColorSchemeGroup, ColorSchemeCatalog, ColorSchemeCatalogManager
Definition at line 58 of file ColorScheme.h.
te::color::ColorScheme::ColorScheme |
( |
const std::string & |
name | ) |
|
It initializes a new ColorScheme and adds it to the parent group of schemes.
- Parameters
-
te::color::ColorScheme::~ColorScheme |
( |
| ) |
|
te::color::ColorScheme::ColorScheme |
( |
const ColorScheme & |
rhs | ) |
|
|
private |
Copy constructor not allowed.
- Parameters
-
rhs | The right-hand-side copy that would be used to copy from. |
const std::vector<std::vector<RGBAColor>* >& te::color::ColorScheme::getColors |
( |
| ) |
const |
It returns all color lists.
- Returns
- All color lists.
std::vector<RGBAColor>* te::color::ColorScheme::getColors |
( |
size_t |
size | ) |
const |
It returns a color list having the specified number of elements or NULL if none is found.
This method will look up a list of color in the scheme that has the choosen number of colors. If it can not find one, it will return NULL.
- Parameters
-
size | The number of elements needed for the color scheme. |
- Returns
- A color list having the specified number of elements or NULL if none is found.
- Note
- size must be a value greater than 0.
const std::string& te::color::ColorScheme::getName |
( |
| ) |
const |
It returns the color schema name.
- Returns
- The color schema name.
It returns the parent scheme group or NULL if it doesn't belong to a group.
- Returns
- The parent scheme group or NULL if it doesn't belong to a group.
Assignment operator not allowed.
- Parameters
-
rhs | The right-hand-side copy that would be used to copy from. |
- Returns
- A reference to this object.
void te::color::ColorScheme::push_back |
( |
std::vector< RGBAColor > * |
colors | ) |
|
It adds a new list of colors to the color scheme.
- Parameters
-
colors | The new list of colors to be added to the scheme. |
- Note
- The color scheme will take the ownership of the color list.
-
Don't inform a NULL pointer.
void te::color::ColorScheme::setName |
( |
const std::string & |
name | ) |
|
It sets the color schema name and adjust its entry in the scheme group if needed.
- Parameters
-
name | The new color schema name. |
It sets the parent color scheme group for this scheme.
- Parameters
-
parent | The parent color scheme group. |
- Note
- This method is intended to be used by a ColorSchemeGroup object.
std::vector<std::vector<RGBAColor>* > te::color::ColorScheme::m_colorSet |
|
private |
std::string te::color::ColorScheme::m_name |
|
private |
The documentation for this class was generated from the following file:
- /home/castejon/castejon_files/develop/terralib5/git_master/src/terralib/color/ColorScheme.h