JugiMap Framework
ColorsLibrary Class Reference

The ColorsLibrary defines storage for ColorRGBA objects. More...

#include <jmColor.h>

Public Member Functions

int Add (ColorRGBA _colorRGBA, const std::string &_name)
 Add the given color *_colorRGBA* with identification name *_name* to this library. The function returns the index of the added color in the library. More...
 
void Clear ()
 Clear all colors in this library. More...
 
ColorRGBA Find (const std::string &_name)
 Find and returns a color with the given *_name*. If the color is not found the function returns white color. More...
 
ColorRGBA At (int _index)
 Returns the color at the given index. If the index is out of storage bounds the white color is returned. More...
 
int GetSize ()
 Returns the number of stored colors. More...
 

Detailed Description

The ColorsLibrary defines storage for ColorRGBA objects.

Member Function Documentation

◆ Add()

int Add ( ColorRGBA  _colorRGBA,
const std::string &  _name 
)
inline

Add the given color *_colorRGBA* with identification name *_name* to this library. The function returns the index of the added color in the library.

◆ Clear()

void Clear ( )
inline

Clear all colors in this library.

◆ Find()

ColorRGBA Find ( const std::string &  _name)

Find and returns a color with the given *_name*. If the color is not found the function returns white color.

◆ At()

ColorRGBA At ( int  _index)

Returns the color at the given index. If the index is out of storage bounds the white color is returned.

◆ GetSize()

int GetSize ( )
inline

Returns the number of stored colors.


The documentation for this class was generated from the following files: