Scribus
Open source desktop publishing at your fingertips
sccolorspacedata_labdbl.h
1 #ifndef SCCOLORSPACEDATA_LABD_H
2 #define SCCOLORSPACEDATA_LABD_H
3 
4 #include <cassert>
5 #include <climits>
6 #include <limits>
7 #include "sccolorprofile.h"
8 #include "sccolorspacedata.h"
9 
10 template<typename T, eColorFormat COLORFORMAT>
12 {
13 protected:
14  int m_LIndex;
15  int m_aIndex;
16  int m_bIndex;
17 
18 public:
20 
21  virtual uint alphaIndex(void) const { return 0; }
22  virtual void flattenAlpha(void* dataIn, uint numElems) const {};
23 };
24 
25 template<typename T, eColorFormat COLORFORMAT>
27 {
28  m_colorFormat = COLORFORMAT;
29  m_profile = profile;
30  if (m_colorFormat == Format_Lab_Dbl)
31  {
32  m_LIndex = 0;
33  m_aIndex = 1;
34  m_bIndex = 2;
35  }
36  else
37  {
38  assert(false);
39  }
40  if (m_profile)
41  {
42  assert(m_profile.colorSpace() == ColorSpace_Lab);
43  }
44 };
45 
47 
48 #endif
Definition: sccolorspacedata_labdbl.h:11
Definition: sccolorprofile.h:16
Definition: sccolorspacedata.h:17