#include <colorpal.h>
Public Member Functions | |
| COLORPALETTE () | |
| COLORPALETTE (const COLORPALETTE &) | |
| ~COLORPALETTE () | |
| COLORPALETTE & | operator= (const COLORPALETTE &) |
| void | ComputeGridFromIndex (int index, int &x, int &y) const |
| int | ComputeIndexFromGrid (int x, int y) const |
| int | FindColor (const COLOR &color) const |
| int | GetGridHeight () const |
| int | GetGridWidth () const |
| const COLOREXT & | GetItem (int index) const |
| const MISTRING & | GetItemName (int index) const |
| const COLOR & | GetItemColor (int index, COLORMODEL model=COLORMODEL_COUNT) const |
| const SIMPLE_ARRAY< WPOINT2D > & | GetLayout () const |
| const MISTRING & | GetName () const |
| int | GetNumItems () const |
| ERRVALUE | Load (const FILEPATH &filepath) |
A color palette contains a set of items. Each item can have a name as well as a list of one or more representations of a particular color in various color models (COLORMODEL). Color palettes are stored externally in an XML file.
Definition at line 89 of file colorpal.h.
|
|
Default constructor.
|
|
|
Copy constructor.
|
|
|
Destructor.
|
|
||||||||||||||||
|
Compute grid x,y from palette index based on layout.
|
|
||||||||||||
|
Compute palette index from grid x,y based on layout.
|
|
|
Find matching color in palette.
|
|
|
Get layout grid height in rows.
Definition at line 124 of file colorpal.h. |
|
|
Get layout grid width in columns.
Definition at line 128 of file colorpal.h. |
|
|
Get palette item.
|
|
||||||||||||
|
Get color of specified item. If the color is not available in the specified model it will be returned in the first available model.
Definition at line 144 of file colorpal.h. |
|
|
Get name of specified item.
Definition at line 138 of file colorpal.h. |
|
|
Get palette layout for user interface.
Definition at line 150 of file colorpal.h. |
|
|
Get palette name.
|
|
|
Get number of palette items.
|
|
|
Load palette from (XML) file.
|
|
|
Assignment.
|
1.3.4-20031026