Scribus
Open source desktop publishing at your fingertips
sccolorspacedata_gray.h
1 #ifndef SCCOLORSPACEDATA_GRAY_H
2 #define SCCOLORSPACEDATA_GRAY_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 public:
15 
16  virtual uint alphaIndex(void) const { return 0; }
17  virtual void flattenAlpha(void* dataIn, uint numElems) const {};
18 };
19 
20 template<typename T, eColorFormat COLORFORMAT>
22 {
23  m_colorFormat = COLORFORMAT;
24  m_profile = profile;
25  assert(m_colorFormat == Format_GRAY_8 || m_colorFormat == Format_GRAY_16);
26  if (m_profile)
27  {
28  assert(m_profile.colorSpace() == ColorSpace_Gray);
29  }
30 };
31 
34 
35 #endif
Definition: sccolorprofile.h:16
Definition: sccolorspacedata.h:17
Definition: sccolorspacedata_gray.h:11