|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef SPLASHSTATE_H |
|
#define SPLASHSTATE_H |
|
|
|
#include "SplashTypes.h" |
|
|
|
class SplashPattern; |
|
class SplashScreen; |
|
class SplashClip; |
|
class SplashBitmap; |
|
|
|
|
|
|
|
|
|
|
|
#define splashLineCapButt 0 |
|
#define splashLineCapRound 1 |
|
#define splashLineCapProjecting 2 |
|
|
|
|
|
|
|
|
|
|
|
#define splashLineJoinMiter 0 |
|
#define splashLineJoinRound 1 |
|
#define splashLineJoinBevel 2 |
|
|
|
|
|
|
|
|
|
|
|
class SplashState |
|
{ |
|
public: |
|
|
|
SplashState(int width, int height, bool vectorAntialias, SplashScreenParams *screenParams); |
|
SplashState(int width, int height, bool vectorAntialias, SplashScreen *screenA); |
|
|
|
|
|
SplashState *copy() const { return new SplashState(this); } |
|
|
|
~SplashState(); |
|
|
|
SplashState(const SplashState &) = delete; |
|
SplashState &operator=(const SplashState &) = delete; |
|
|
|
|
|
void setStrokePattern(SplashPattern *strokePatternA); |
|
|
|
|
|
void setFillPattern(SplashPattern *fillPatternA); |
|
|
|
|
|
void setScreen(SplashScreen *screenA); |
|
|
|
|
|
void setLineDash(std::vector<SplashCoord> &&lineDashA, SplashCoord lineDashPhaseA); |
|
|
|
|
|
void setSoftMask(SplashBitmap *softMaskA); |
|
|
|
|
|
void setFillOverprint(bool fillOverprintA) { fillOverprint = fillOverprintA; } |
|
void setStrokeOverprint(bool strokeOverprintA) { strokeOverprint = strokeOverprintA; } |
|
void setOverprintMode(int overprintModeA) { overprintMode = overprintModeA; } |
|
|
|
|
|
void setTransfer(unsigned char *red, unsigned char *green, unsigned char *blue, unsigned char *gray); |
|
|
|
private: |
|
explicit SplashState(const SplashState *state); |
|
|
|
SplashCoord matrix[6]; |
|
SplashPattern *strokePattern; |
|
SplashPattern *fillPattern; |
|
SplashScreen *screen; |
|
SplashBlendFunc blendFunc; |
|
SplashCoord strokeAlpha; |
|
SplashCoord fillAlpha; |
|
bool multiplyPatternAlpha; |
|
SplashCoord patternStrokeAlpha; |
|
SplashCoord patternFillAlpha; |
|
SplashCoord lineWidth; |
|
int lineCap; |
|
int lineJoin; |
|
SplashCoord miterLimit; |
|
SplashCoord flatness; |
|
std::vector<SplashCoord> lineDash; |
|
SplashCoord lineDashPhase; |
|
bool strokeAdjust; |
|
SplashClip *clip; |
|
SplashBitmap *softMask; |
|
bool deleteSoftMask; |
|
bool inNonIsolatedGroup; |
|
bool fillOverprint; |
|
bool strokeOverprint; |
|
int overprintMode; |
|
unsigned char rgbTransferR[256], rgbTransferG[256], rgbTransferB[256]; |
|
unsigned char grayTransfer[256]; |
|
unsigned char cmykTransferC[256], cmykTransferM[256], cmykTransferY[256], cmykTransferK[256]; |
|
unsigned char deviceNTransfer[SPOT_NCOMPS + 4][256]; |
|
unsigned int overprintMask; |
|
bool overprintAdditive; |
|
|
|
SplashState *next; |
|
|
|
friend class Splash; |
|
}; |
|
|
|
#endif |
|
|