1 //========================================================================
5 //========================================================================
13 //------------------------------------------------------------------------
15 //------------------------------------------------------------------------
18 #include "FixedPoint.h"
19 typedef FixedPoint SplashCoord
;
21 typedef double SplashCoord
;
24 //------------------------------------------------------------------------
26 //------------------------------------------------------------------------
28 #define splashAASize 4
30 //------------------------------------------------------------------------
32 //------------------------------------------------------------------------
34 enum SplashColorMode
{
35 splashModeMono1
, // 1 bit per component, 8 pixels per byte,
36 // MSbit is on the left
37 splashModeMono8
, // 1 byte per component, 1 byte per pixel
38 splashModeRGB8
, // 1 byte per component, 3 bytes per pixel:
40 splashModeBGR8
// 1 byte per component, 3 bytes per pixel:
45 splashModeCMYK8
// 1 byte per component, 4 bytes per pixel:
50 // number of components in each color mode
51 // (defined in SplashState.cc)
52 extern int splashColorModeNComps
[];
54 // max number of components in any SplashColor
56 # define splashMaxColorComps 4
58 # define splashMaxColorComps 3
61 typedef Guchar SplashColor
[splashMaxColorComps
];
62 typedef Guchar
*SplashColorPtr
;
65 static inline Guchar
splashRGB8R(SplashColorPtr rgb8
) { return rgb8
[0]; }
66 static inline Guchar
splashRGB8G(SplashColorPtr rgb8
) { return rgb8
[1]; }
67 static inline Guchar
splashRGB8B(SplashColorPtr rgb8
) { return rgb8
[2]; }
70 static inline Guchar
splashBGR8R(SplashColorPtr bgr8
) { return bgr8
[2]; }
71 static inline Guchar
splashBGR8G(SplashColorPtr bgr8
) { return bgr8
[1]; }
72 static inline Guchar
splashBGR8B(SplashColorPtr bgr8
) { return bgr8
[0]; }
76 static inline Guchar
splashCMYK8C(SplashColorPtr cmyk8
) { return cmyk8
[0]; }
77 static inline Guchar
splashCMYK8M(SplashColorPtr cmyk8
) { return cmyk8
[1]; }
78 static inline Guchar
splashCMYK8Y(SplashColorPtr cmyk8
) { return cmyk8
[2]; }
79 static inline Guchar
splashCMYK8K(SplashColorPtr cmyk8
) { return cmyk8
[3]; }
82 static inline void splashColorCopy(SplashColorPtr dest
, SplashColorPtr src
) {
91 static inline void splashColorXor(SplashColorPtr dest
, SplashColorPtr src
) {
100 //------------------------------------------------------------------------
102 //------------------------------------------------------------------------
104 typedef void (*SplashBlendFunc
)(SplashColorPtr src
, SplashColorPtr dest
,
105 SplashColorPtr blend
, SplashColorMode cm
);
107 //------------------------------------------------------------------------
109 //------------------------------------------------------------------------
111 enum SplashScreenType
{
112 splashScreenDispersed
,
113 splashScreenClustered
,
114 splashScreenStochasticClustered
117 struct SplashScreenParams
{
118 SplashScreenType type
;
122 SplashCoord blackThreshold
;
123 SplashCoord whiteThreshold
;
126 //------------------------------------------------------------------------
128 //------------------------------------------------------------------------
130 typedef int SplashError
;