GraphicsState.java
11.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
/*
* Decompiled with CFR 0_118.
*/
package com.adobe.internal.pdftoolkit.graphicsDOM;
import com.adobe.internal.pdftoolkit.graphicsDOM.ContentItem;
import com.adobe.internal.pdftoolkit.graphicsDOM.DocumentContext;
import com.adobe.internal.pdftoolkit.graphicsDOM.LineCap;
import com.adobe.internal.pdftoolkit.graphicsDOM.LineJoint;
import com.adobe.internal.pdftoolkit.graphicsDOM.ShadingPattern;
import com.adobe.internal.pdftoolkit.graphicsDOM.TextState;
import com.adobe.internal.pdftoolkit.graphicsDOM.TilingPattern;
import java.awt.geom.Area;
import java.util.Arrays;
import java.util.Map;
/*
* This class specifies class file version 49.0 but uses Java 6 signatures. Assumed Java 6.
*/
public abstract class GraphicsState {
private LineCap lineCap = LineCap.ROUND;
private LineJoint lineJoin;
private double lineWidth = 1.0;
private double[] fillColorValues;
private double[] strokeColorValues;
private Area clipPath = null;
private double miterLimit = 10.0;
private boolean strokeAdjustment = false;
private Map<String, TilingPattern<? extends GraphicsState, ? extends TextState, ? extends ContentItem<? extends GraphicsState>>> loadedTilingPatterns = null;
private String fillTilingPatternName = null;
private String strokeTilingPatternName = null;
private double strokeAlpha = 1.0;
private double nonStrokeAlpha = 1.0;
private double smoothness = 0.0;
private int dashPhase = 0;
private double[] dashArray = new double[0];
private int overPrintMode = 0;
private double flatnessTolerance = 0.0;
private double fillAlphaOpacity = 1.0;
private boolean alphaSourceFlag = false;
private boolean textKnockoutFlag = true;
private RenderingIntent renderingIntent;
private Map<String, ShadingPattern<? extends GraphicsState, ? extends TextState, ? extends ContentItem<? extends GraphicsState>>> loadedShadingPatterns = null;
private String fillShadingPatternName = null;
private String strokeShadingPatternName = null;
private BlendingMode blendingMode = BlendingMode.NORMAL;
private int backdropColor;
private ContentItem cachedSoftMask = null;
private boolean overPrint = false;
public boolean equals(Object obj) {
if (!(obj instanceof GraphicsState)) {
return false;
}
GraphicsState gState = (GraphicsState)obj;
return this.getLineCap() == gState.getLineCap() && this.getLineJoin() == gState.getLineJoin() && this.getLineWidth() == gState.getLineWidth() && Arrays.equals(this.getFillColorValues(), gState.getFillColorValues()) && Arrays.equals(this.getStrokeColorValues(), gState.getStrokeColorValues()) && this.clipPathEquals(gState) && this.getMiterLimit() == gState.getMiterLimit() && this.getStrokeAdjustment() == gState.getStrokeAdjustment() && this.stringEquals(this.getFillTilingPatternName(), gState.getFillTilingPatternName()) && this.stringEquals(this.getStrokeTilingPatternName(), gState.getStrokeTilingPatternName()) && this.getStrokeAlpha() == gState.getStrokeAlpha() && this.getNonStrokeAlpha() == gState.getNonStrokeAlpha() && this.getSmoothness() == gState.getSmoothness() && this.getDashPhase() == gState.getDashPhase() && Arrays.equals(this.getDashArray(), gState.getDashArray()) && this.getOverPrintMode() == gState.getOverPrintMode() && this.getFlatnessTolerance() == gState.getFlatnessTolerance() && this.getFillAlphaOpacity() == gState.getFillAlphaOpacity() && this.getalphaSourceFlag() == gState.getalphaSourceFlag() && this.getTextKnockoutFlag() == gState.getTextKnockoutFlag() && this.getRenderingIntent() == gState.getRenderingIntent() && this.getBlendingMode() == gState.getBlendingMode() && this.stringEquals(this.getFillShadingPatternName(), gState.getFillShadingPatternName()) && this.stringEquals(this.getStrokeShadingPatternName(), gState.getStrokeShadingPatternName());
}
private boolean clipPathEquals(GraphicsState gState) {
if (this.getClipPath() == null && gState.getClipPath() == null) {
return true;
}
if (this.getClipPath() == null || gState.getClipPath() == null) {
return false;
}
return this.getClipPath().equals(gState.getClipPath());
}
private boolean stringEquals(String str1, String str2) {
if (str1 == null && str2 == null) {
return true;
}
if (str1 == null || str2 == null) {
return false;
}
return str1.equals(str2);
}
public double getSmoothness() {
return this.smoothness;
}
public void setSmoothness(double smoothness) {
this.smoothness = smoothness;
}
public double getStrokeAlpha() {
return this.strokeAlpha;
}
public void setStrokeAlpha(double alpha) {
this.strokeAlpha = alpha;
}
public double getNonStrokeAlpha() {
return this.nonStrokeAlpha;
}
public void setNonStrokeAlpha(double alpha) {
this.nonStrokeAlpha = alpha;
}
public boolean getStrokeAdjustment() {
return this.strokeAdjustment;
}
public void setStrokeAdjustment(boolean strokeAdjustment) {
this.strokeAdjustment = strokeAdjustment;
}
public double getMiterLimit() {
return this.miterLimit;
}
public void setMiterLimit(double miterLimit) {
this.miterLimit = miterLimit;
}
public Area getClipPath() {
return this.clipPath;
}
public void setClipPath(Area clipPath) {
this.clipPath = clipPath;
}
public LineCap getLineCap() {
return this.lineCap;
}
public void setLineCap(LineCap lineCap) {
this.lineCap = lineCap;
}
public LineJoint getLineJoin() {
return this.lineJoin;
}
public void setLineJoin(LineJoint lineJoin) {
this.lineJoin = lineJoin;
}
public double getLineWidth() {
return this.lineWidth;
}
public void setLineWidth(double lineWidth) {
this.lineWidth = lineWidth;
}
public double[] getFillColorValues() {
return this.fillColorValues;
}
public void setFillColorValues(double[] fillColorValues) {
this.fillColorValues = fillColorValues;
}
public double[] getStrokeColorValues() {
return this.strokeColorValues;
}
public void setStrokeColorValues(double[] strokeColorValues) {
this.strokeColorValues = strokeColorValues;
}
public String getFillTilingPatternName() {
return this.fillTilingPatternName;
}
public void setFillTilingPatternName(String tilingPatternName) {
this.fillTilingPatternName = tilingPatternName;
}
public String getStrokeTilingPatternName() {
return this.strokeTilingPatternName;
}
public void setStrokeTilingPatternName(String tilingPatternName) {
this.strokeTilingPatternName = tilingPatternName;
}
public Map<String, TilingPattern<? extends GraphicsState, ? extends TextState, ? extends ContentItem<? extends GraphicsState>>> getLoadedTilingPatterns() {
return this.loadedTilingPatterns;
}
public void setLoadedTilingPatterns(Map<String, TilingPattern<? extends GraphicsState, ? extends TextState, ? extends ContentItem<? extends GraphicsState>>> loadedTilingPatterns) {
this.loadedTilingPatterns = loadedTilingPatterns;
}
public double[] getDashArray() {
return this.dashArray;
}
public void setDashArray(double[] dashArray) {
this.dashArray = dashArray;
}
public int getDashPhase() {
return this.dashPhase;
}
public void setDashPhase(int dashPhase) {
this.dashPhase = dashPhase;
}
public int getOverPrintMode() {
return this.overPrintMode;
}
public void setOverPrintMode(int overPrintMode) {
this.overPrintMode = overPrintMode;
}
public double getFlatnessTolerance() {
return this.flatnessTolerance;
}
public void setFlatnessTolerance(double flatnessTolerance) {
this.flatnessTolerance = flatnessTolerance;
}
public double getFillAlphaOpacity() {
return this.fillAlphaOpacity;
}
public void setFillAlphaOpacity(double fillAlphaOpacity) {
this.fillAlphaOpacity = fillAlphaOpacity;
}
public boolean getalphaSourceFlag() {
return this.alphaSourceFlag;
}
public void setAlphaSourceFlag(boolean alphaSourceFlag) {
this.alphaSourceFlag = alphaSourceFlag;
}
public boolean getTextKnockoutFlag() {
return this.textKnockoutFlag;
}
public void setTextKnockoutFlag(boolean textKnockoutFlag) {
this.textKnockoutFlag = textKnockoutFlag;
}
public RenderingIntent getRenderingIntent() {
return this.renderingIntent;
}
public void setRenderingIntent(RenderingIntent renderingIntent) {
this.renderingIntent = renderingIntent;
}
public abstract <W extends DocumentContext> void writeToDisplayArea(W var1);
public void setLoadedShadingPatterns(Map<String, ShadingPattern<? extends GraphicsState, ? extends TextState, ? extends ContentItem<? extends GraphicsState>>> loadedShadingPatterns) {
this.loadedShadingPatterns = loadedShadingPatterns;
}
public String getFillShadingPatternName() {
return this.fillShadingPatternName;
}
public void setFillShadingPatternName(String fillShadingPatternName) {
this.fillShadingPatternName = fillShadingPatternName;
}
public Map<String, ShadingPattern<? extends GraphicsState, ? extends TextState, ? extends ContentItem<? extends GraphicsState>>> getLoadedShadingPatterns() {
return this.loadedShadingPatterns;
}
public String getStrokeShadingPatternName() {
return this.strokeShadingPatternName;
}
public void setStrokeShadingPatternName(String strokeShadingPatternName) {
this.strokeShadingPatternName = strokeShadingPatternName;
}
public BlendingMode getBlendingMode() {
return this.blendingMode;
}
public void setBlendingMode(BlendingMode blendingMode) {
this.blendingMode = blendingMode;
}
public int getBackdropColor() {
return this.backdropColor;
}
public void setBackdropColor(int backdropColor) {
this.backdropColor = backdropColor;
}
public abstract void setGraphicsStateSoftMask(ContentItem var1);
public abstract ContentItem getGraphicsStateSoftMask();
public ContentItem getCachedSoftMask() {
return this.cachedSoftMask;
}
public void setCachedSoftMask(ContentItem cachedSoftMask) {
this.cachedSoftMask = cachedSoftMask;
}
public boolean getOverPrint() {
return this.overPrint;
}
public void setOverPrint(boolean overPrint) {
this.overPrint = overPrint;
}
/*
* This class specifies class file version 49.0 but uses Java 6 signatures. Assumed Java 6.
*/
public static enum RenderingIntent {
ABSOLUTE_COLORIMETRIC,
RELATIVE_COLORIMETRIC,
SATURATION,
PERCEPTUAL;
private RenderingIntent() {
}
}
/*
* This class specifies class file version 49.0 but uses Java 6 signatures. Assumed Java 6.
*/
public static enum BlendingMode {
NORMAL,
MULTIPLY,
SCREEN,
DARKEN,
LIGHTEN,
DIFFERENCE,
EXCLUSION,
COLORDODGE,
COLORBURN,
HARDLIGHT,
SOFTLIGHT,
OVERLAY,
LUMINOSITY,
COLOR,
SATURATION,
HUE,
OVERPRINTSrc,
OVERPRINTDst;
private BlendingMode() {
}
}
}