File indexing completed on 2025-12-11 10:26:10
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023 #ifndef SPLASHSTATE_H
0024 #define SPLASHSTATE_H
0025
0026 #include "SplashTypes.h"
0027
0028 class SplashPattern;
0029 class SplashScreen;
0030 class SplashClip;
0031 class SplashBitmap;
0032
0033
0034
0035
0036
0037 #define splashLineCapButt 0
0038 #define splashLineCapRound 1
0039 #define splashLineCapProjecting 2
0040
0041
0042
0043
0044
0045 #define splashLineJoinMiter 0
0046 #define splashLineJoinRound 1
0047 #define splashLineJoinBevel 2
0048
0049
0050
0051
0052
0053 class SplashState
0054 {
0055 public:
0056
0057 SplashState(int width, int height, bool vectorAntialias, SplashScreenParams *screenParams);
0058 SplashState(int width, int height, bool vectorAntialias, SplashScreen *screenA);
0059
0060
0061 SplashState *copy() const { return new SplashState(this); }
0062
0063 ~SplashState();
0064
0065 SplashState(const SplashState &) = delete;
0066 SplashState &operator=(const SplashState &) = delete;
0067
0068
0069 void setStrokePattern(SplashPattern *strokePatternA);
0070
0071
0072 void setFillPattern(SplashPattern *fillPatternA);
0073
0074
0075 void setScreen(SplashScreen *screenA);
0076
0077
0078 void setLineDash(std::vector<SplashCoord> &&lineDashA, SplashCoord lineDashPhaseA);
0079
0080
0081 void setSoftMask(SplashBitmap *softMaskA);
0082
0083
0084 void setFillOverprint(bool fillOverprintA) { fillOverprint = fillOverprintA; }
0085 void setStrokeOverprint(bool strokeOverprintA) { strokeOverprint = strokeOverprintA; }
0086 void setOverprintMode(int overprintModeA) { overprintMode = overprintModeA; }
0087
0088
0089 void setTransfer(unsigned char *red, unsigned char *green, unsigned char *blue, unsigned char *gray);
0090
0091 private:
0092 explicit SplashState(const SplashState *state);
0093
0094 SplashCoord matrix[6];
0095 SplashPattern *strokePattern;
0096 SplashPattern *fillPattern;
0097 SplashScreen *screen;
0098 SplashBlendFunc blendFunc;
0099 SplashCoord strokeAlpha;
0100 SplashCoord fillAlpha;
0101 bool multiplyPatternAlpha;
0102 SplashCoord patternStrokeAlpha;
0103 SplashCoord patternFillAlpha;
0104 SplashCoord lineWidth;
0105 int lineCap;
0106 int lineJoin;
0107 SplashCoord miterLimit;
0108 SplashCoord flatness;
0109 std::vector<SplashCoord> lineDash;
0110 SplashCoord lineDashPhase;
0111 bool strokeAdjust;
0112 SplashClip *clip;
0113 SplashBitmap *softMask;
0114 bool deleteSoftMask;
0115 bool inNonIsolatedGroup;
0116 bool fillOverprint;
0117 bool strokeOverprint;
0118 int overprintMode;
0119 unsigned char rgbTransferR[256], rgbTransferG[256], rgbTransferB[256];
0120 unsigned char grayTransfer[256];
0121 unsigned char cmykTransferC[256], cmykTransferM[256], cmykTransferY[256], cmykTransferK[256];
0122 unsigned char deviceNTransfer[SPOT_NCOMPS + 4][256];
0123 unsigned int overprintMask;
0124 bool overprintAdditive;
0125
0126 SplashState *next;
0127
0128 friend class Splash;
0129 };
0130
0131 #endif