HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_ColorTable.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: (UT_ColorTable.h, C++)
7  *
8  * COMMENTS:
9  */
10 
11 #ifndef _UT_ColorTable_
12 #define _UT_ColorTable_
13 
14 #include "UT_API.h"
15 #include "UT_StringMap.h"
16 #include "UT_Color.h"
17 #include <iosfwd>
18 
19 class UT_IStream;
20 
22 {
23 public:
24 
25  bool empty() const;
26  bool getColor(const UT_StringRef &colorname, UT_Color &clr) const;
27  const UT_StringMap<UT_Color> &getTable() const;
28 
29  void clear();
30  void clearColor(const UT_StringRef &colorname);
31  void setColor(const UT_StringRef &colorname, const UT_Color &clr);
32  void setTable(const UT_StringMap<UT_Color> &color_map);
33 
34  bool save(std::ostream &os, int binary) const;
35  bool load(UT_IStream &is);
36 
37 private:
38  UT_StringMap<UT_Color> myColorMap;
39 };
40 
41 #endif
const GLuint GLenum const void * binary
Definition: glcorearb.h:1924
#define UT_API
Definition: UT_API.h:14
ImageBuf OIIO_API color_map(const ImageBuf &src, int srcchannel, int nknots, int channels, cspan< float > knots, ROI roi={}, int nthreads=0)