/src/xpdf-4.04/splash/Splash.h
Line | Count | Source (jump to first uncovered line) |
1 | | //======================================================================== |
2 | | // |
3 | | // Splash.h |
4 | | // |
5 | | // Copyright 2003-2013 Glyph & Cog, LLC |
6 | | // |
7 | | //======================================================================== |
8 | | |
9 | | #ifndef SPLASH_H |
10 | | #define SPLASH_H |
11 | | |
12 | | #include <aconf.h> |
13 | | |
14 | | #ifdef USE_GCC_PRAGMAS |
15 | | #pragma interface |
16 | | #endif |
17 | | |
18 | | #include "SplashTypes.h" |
19 | | #include "SplashClip.h" |
20 | | |
21 | | class GString; |
22 | | class Splash; |
23 | | class SplashBitmap; |
24 | | struct SplashGlyphBitmap; |
25 | | class SplashState; |
26 | | class SplashPattern; |
27 | | class SplashScreen; |
28 | | class SplashPath; |
29 | | class SplashXPath; |
30 | | class SplashFont; |
31 | | struct SplashPipe; |
32 | | struct SplashDrawImageMaskRowData; |
33 | | class ImageScaler; |
34 | | typedef void (Splash::*SplashDrawImageMaskRowFunc)( |
35 | | SplashDrawImageMaskRowData *data, |
36 | | Guchar *maskData, |
37 | | int x, int y, int width); |
38 | | struct SplashDrawImageRowData; |
39 | | typedef void (Splash::*SplashDrawImageRowFunc)(SplashDrawImageRowData *data, |
40 | | Guchar *colorData, |
41 | | Guchar *alphaData, |
42 | | int x, int y, int width); |
43 | | |
44 | | //------------------------------------------------------------------------ |
45 | | |
46 | | // Retrieves the next line of pixels in an image mask. Normally, |
47 | | // fills in *<line> and returns true. If the image stream is |
48 | | // exhausted, returns false. |
49 | | typedef GBool (*SplashImageMaskSource)(void *data, Guchar *pixel); |
50 | | |
51 | | // Retrieves the next line of pixels in an image. Normally, fills in |
52 | | // *<line> and returns true. If the image stream is exhausted, |
53 | | // returns false. |
54 | | typedef GBool (*SplashImageSource)(void *data, SplashColorPtr colorLine, |
55 | | Guchar *alphaLine); |
56 | | |
57 | | |
58 | | //------------------------------------------------------------------------ |
59 | | |
60 | | enum SplashPipeResultColorCtrl { |
61 | | splashPipeResultColorNoAlphaBlendMono, |
62 | | splashPipeResultColorNoAlphaBlendRGB, |
63 | | #if SPLASH_CMYK |
64 | | splashPipeResultColorNoAlphaBlendCMYK, |
65 | | #endif |
66 | | splashPipeResultColorAlphaNoBlendMono, |
67 | | splashPipeResultColorAlphaNoBlendRGB, |
68 | | #if SPLASH_CMYK |
69 | | splashPipeResultColorAlphaNoBlendCMYK, |
70 | | #endif |
71 | | splashPipeResultColorAlphaBlendMono, |
72 | | splashPipeResultColorAlphaBlendRGB |
73 | | #if SPLASH_CMYK |
74 | | , |
75 | | splashPipeResultColorAlphaBlendCMYK |
76 | | #endif |
77 | | }; |
78 | | |
79 | | //------------------------------------------------------------------------ |
80 | | |
81 | | // Transparency group destination bitmap initialization control. |
82 | | enum SplashGroupDestInitMode { |
83 | | splashGroupDestPreInit, // dest is already initialized |
84 | | splashGroupDestInitZero, // initialize to zero (isolated group) |
85 | | splashGroupDestInitCopy // copy backdrop (non-isolated group) |
86 | | }; |
87 | | |
88 | | //------------------------------------------------------------------------ |
89 | | // SplashImageCache |
90 | | //------------------------------------------------------------------------ |
91 | | |
92 | | // This holds a cached image, and is shared by multiple Splash objects |
93 | | // in the same thread. |
94 | | class SplashImageCache { |
95 | | public: |
96 | | |
97 | | SplashImageCache(); |
98 | | ~SplashImageCache(); |
99 | | GBool match(GString *aTag, int aWidth, int aHeight, |
100 | | SplashColorMode aMode, GBool aAlpha, |
101 | | GBool aInterpolate); |
102 | | void reset(GString *aTag, int aWidth, int aHeight, |
103 | | SplashColorMode aMode, GBool aAlpha, |
104 | | GBool aInterpolate); |
105 | | void incRefCount(); |
106 | | void decRefCount(); |
107 | | |
108 | | GString *tag; |
109 | | int width; |
110 | | int height; |
111 | | SplashColorMode mode; |
112 | | GBool alpha; |
113 | | GBool interpolate; |
114 | | Guchar *colorData; |
115 | | Guchar *alphaData; |
116 | | |
117 | | int refCount; |
118 | | }; |
119 | | |
120 | | //------------------------------------------------------------------------ |
121 | | // Splash |
122 | | //------------------------------------------------------------------------ |
123 | | |
124 | | class Splash { |
125 | | public: |
126 | | |
127 | | // Create a new rasterizer object. |
128 | | Splash(SplashBitmap *bitmapA, GBool vectorAntialiasA, |
129 | | SplashImageCache *imageCacheA, |
130 | | SplashScreenParams *screenParams = NULL); |
131 | | Splash(SplashBitmap *bitmapA, GBool vectorAntialiasA, |
132 | | SplashImageCache *imageCacheA, SplashScreen *screenA); |
133 | | |
134 | | ~Splash(); |
135 | | |
136 | | //----- state read |
137 | | |
138 | | SplashCoord *getMatrix(); |
139 | | SplashPattern *getStrokePattern(); |
140 | | SplashPattern *getFillPattern(); |
141 | | SplashScreen *getScreen(); |
142 | | SplashBlendFunc getBlendFunc(); |
143 | | SplashCoord getStrokeAlpha(); |
144 | | SplashCoord getFillAlpha(); |
145 | | SplashCoord getLineWidth(); |
146 | | int getLineCap(); |
147 | | int getLineJoin(); |
148 | | SplashCoord getMiterLimit(); |
149 | | SplashCoord getFlatness(); |
150 | | SplashCoord *getLineDash(); |
151 | | int getLineDashLength(); |
152 | | SplashCoord getLineDashPhase(); |
153 | | SplashStrokeAdjustMode getStrokeAdjust(); |
154 | | SplashClip *getClip(); |
155 | | SplashBitmap *getSoftMask(); |
156 | | GBool getInNonIsolatedGroup(); |
157 | | GBool getInKnockoutGroup(); |
158 | | |
159 | | //----- state write |
160 | | |
161 | | void setMatrix(SplashCoord *matrix); |
162 | | void setStrokePattern(SplashPattern *strokeColor); |
163 | | void setFillPattern(SplashPattern *fillColor); |
164 | | void setScreen(SplashScreen *screen); |
165 | | void setBlendFunc(SplashBlendFunc func); |
166 | | void setStrokeAlpha(SplashCoord alpha); |
167 | | void setFillAlpha(SplashCoord alpha); |
168 | | void setLineWidth(SplashCoord lineWidth); |
169 | | void setLineCap(int lineCap); |
170 | | void setLineJoin(int lineJoin); |
171 | | void setMiterLimit(SplashCoord miterLimit); |
172 | | void setFlatness(SplashCoord flatness); |
173 | | // the <lineDash> array will be copied |
174 | | void setLineDash(SplashCoord *lineDash, int lineDashLength, |
175 | | SplashCoord lineDashPhase); |
176 | | void setStrokeAdjust(SplashStrokeAdjustMode strokeAdjust); |
177 | | // NB: uses transformed coordinates. |
178 | | void clipResetToRect(SplashCoord x0, SplashCoord y0, |
179 | | SplashCoord x1, SplashCoord y1); |
180 | | // NB: uses transformed coordinates. |
181 | | SplashError clipToRect(SplashCoord x0, SplashCoord y0, |
182 | | SplashCoord x1, SplashCoord y1); |
183 | | // NB: uses untransformed coordinates. |
184 | | SplashError clipToPath(SplashPath *path, GBool eo); |
185 | | void setSoftMask(SplashBitmap *softMask, GBool deleteBitmap = gTrue); |
186 | | void setInTransparencyGroup(SplashBitmap *groupBackBitmapA, |
187 | | int groupBackXA, int groupBackYA, |
188 | | SplashGroupDestInitMode groupDestInitModeA, |
189 | | GBool nonIsolated, GBool knockout); |
190 | | void forceDeferredInit(int y, int h); |
191 | | GBool checkTransparentRect(int x, int y, int w, int h); |
192 | | void setTransfer(Guchar *red, Guchar *green, Guchar *blue, Guchar *gray); |
193 | | void setOverprintMask(Guint overprintMask); |
194 | | void setEnablePathSimplification(GBool en); |
195 | | |
196 | | //----- state save/restore |
197 | | |
198 | | void saveState(); |
199 | | SplashError restoreState(); |
200 | | |
201 | | //----- drawing operations |
202 | | |
203 | | // Fill the bitmap with <color>. This is not subject to clipping. |
204 | | void clear(SplashColorPtr color, Guchar alpha = 0x00); |
205 | | |
206 | | // Stroke a path using the current stroke pattern. |
207 | | SplashError stroke(SplashPath *path); |
208 | | |
209 | | // Fill a path using the current fill pattern. |
210 | | SplashError fill(SplashPath *path, GBool eo); |
211 | | |
212 | | // Draw a character, using the current fill pattern. |
213 | | SplashError fillChar(SplashCoord x, SplashCoord y, int c, SplashFont *font); |
214 | | |
215 | | // Draw a glyph, using the current fill pattern. This function does |
216 | | // not free any data, i.e., it ignores glyph->freeData. |
217 | | SplashError fillGlyph(SplashCoord x, SplashCoord y, |
218 | | SplashGlyphBitmap *glyph); |
219 | | |
220 | | // Draws an image mask using the fill color. This will read <h> |
221 | | // lines of <w> pixels from <src>, starting with the top line. "1" |
222 | | // pixels will be drawn with the current fill color; "0" pixels are |
223 | | // transparent. The matrix: |
224 | | // [ mat[0] mat[1] 0 ] |
225 | | // [ mat[2] mat[3] 0 ] |
226 | | // [ mat[4] mat[5] 1 ] |
227 | | // maps a unit square to the desired destination for the image, in |
228 | | // PostScript style: |
229 | | // [x' y' 1] = [x y 1] * mat |
230 | | // Note that the Splash y axis points downward, and the image source |
231 | | // is assumed to produce pixels in raster order, starting from the |
232 | | // top line. If [interpolate] is false, no filtering is done when |
233 | | // upsampling. If [antialias] is false, no filtering is done when |
234 | | // upsampling (overriding the [interpolate] flag), and threshold |
235 | | // filtering is done when downsampling. |
236 | | SplashError fillImageMask(GString *imageTag, |
237 | | SplashImageMaskSource src, void *srcData, |
238 | | int w, int h, SplashCoord *mat, |
239 | | GBool glyphMode, GBool interpolate, |
240 | | GBool antialias); |
241 | | |
242 | | // Draw an image. This will read <h> lines of <w> pixels from |
243 | | // <src>, starting with the top line. These pixels are assumed to |
244 | | // be in the source mode, <srcMode>. If <srcAlpha> is true, the |
245 | | // alpha values returned by <src> are used; otherwise they are |
246 | | // ignored. The following combinations of source and target modes |
247 | | // are supported: |
248 | | // source target |
249 | | // ------ ------ |
250 | | // Mono8 Mono1 -- with dithering |
251 | | // Mono8 Mono8 |
252 | | // RGB8 RGB8 |
253 | | // BGR8 RGB8 |
254 | | // CMYK8 CMYK8 |
255 | | // The matrix behaves as for fillImageMask. |
256 | | SplashError drawImage(GString *imageTag, |
257 | | SplashImageSource src, void *srcData, |
258 | | SplashColorMode srcMode, GBool srcAlpha, |
259 | | int w, int h, SplashCoord *mat, |
260 | | GBool interpolate); |
261 | | |
262 | | // Composite a rectangular region from <src> onto this Splash |
263 | | // object. |
264 | | SplashError composite(SplashBitmap *src, int xSrc, int ySrc, |
265 | | int xDest, int yDest, int w, int h, |
266 | | GBool noClip, GBool nonIsolated); |
267 | | |
268 | | // Composite a rectangular region from <src> onto this Splash |
269 | | // object, using <srcOverprintMaskBitmap> as the overprint mask per |
270 | | // pixel. This is only supported for CMYK and DeviceN bitmaps. |
271 | | SplashError compositeWithOverprint(SplashBitmap *src, |
272 | | Guint *srcOverprintMaskBitmap, |
273 | | int xSrc, int ySrc, |
274 | | int xDest, int yDest, int w, int h, |
275 | | GBool noClip, GBool nonIsolated); |
276 | | |
277 | | // Composite this Splash object onto a background color. The |
278 | | // background alpha is assumed to be 1. |
279 | | void compositeBackground(SplashColorPtr color); |
280 | | |
281 | | // Copy a rectangular region from <src> onto the bitmap belonging to |
282 | | // this Splash object. The destination alpha values are all set to |
283 | | // zero. |
284 | | SplashError blitTransparent(SplashBitmap *src, int xSrc, int ySrc, |
285 | | int xDest, int yDest, int w, int h); |
286 | | |
287 | | // Copy a rectangular region from the bitmap belonging to this |
288 | | // Splash object to <dest>. The alpha values are corrected for a |
289 | | // non-isolated group. |
290 | | SplashError blitCorrectedAlpha(SplashBitmap *dest, int xSrc, int ySrc, |
291 | | int xDest, int yDest, int w, int h); |
292 | | |
293 | | //----- misc |
294 | | |
295 | | // Construct a path for a stroke, given the path to be stroked and |
296 | | // the line width <w>. All other stroke parameters are taken from |
297 | | // the current state. If <flatten> is true, this function will |
298 | | // first flatten the path and handle the linedash. |
299 | | SplashPath *makeStrokePath(SplashPath *path, SplashCoord w, |
300 | | int lineCap, int lineJoin, |
301 | | GBool flatten = gTrue); |
302 | | |
303 | | // Reduce the size of a rectangle as much as possible by moving any |
304 | | // edges that are completely outside the clip region. Returns the |
305 | | // clipping status of the resulting rectangle. |
306 | | SplashClipResult limitRectToClipRect(int *xMin, int *yMin, |
307 | | int *xMax, int *yMax); |
308 | | |
309 | | // Return the associated bitmap. |
310 | 0 | SplashBitmap *getBitmap() { return bitmap; } |
311 | | |
312 | | // Enable writing the per-pixel overprint mask to a separate bitmap. |
313 | | void setOverprintMaskBitmap(Guint *overprintMaskBitmapA) |
314 | 0 | { overprintMaskBitmap = overprintMaskBitmapA; } |
315 | | |
316 | | // Set the minimum line width. |
317 | 0 | void setMinLineWidth(SplashCoord w) { minLineWidth = w; } |
318 | | |
319 | | // Get a bounding box which includes all modifications since the |
320 | | // last call to clearModRegion. |
321 | | void getModRegion(int *xMin, int *yMin, int *xMax, int *yMax) |
322 | 0 | { *xMin = modXMin; *yMin = modYMin; *xMax = modXMax; *yMax = modYMax; } |
323 | | |
324 | | // Clear the modified region bounding box. |
325 | | void clearModRegion(); |
326 | | |
327 | | // Get clipping status for the last drawing operation subject to |
328 | | // clipping. |
329 | 0 | SplashClipResult getClipRes() { return opClipRes; } |
330 | | |
331 | | // Toggle debug mode on or off. |
332 | 0 | void setDebugMode(GBool debugModeA) { debugMode = debugModeA; } |
333 | | |
334 | 0 | SplashImageCache *getImageCache() { return imageCache; } |
335 | | |
336 | | #if 1 //~tmp: turn off anti-aliasing temporarily |
337 | 0 | void setInShading(GBool sh) { inShading = sh; } |
338 | | #endif |
339 | | |
340 | | |
341 | | private: |
342 | | |
343 | | void pipeInit(SplashPipe *pipe, SplashPattern *pattern, |
344 | | Guchar aInput, GBool usesShape, |
345 | | GBool nonIsolatedGroup, GBool usesSrcOverprint = gFalse); |
346 | | void pipeRun(SplashPipe *pipe, int x0, int x1, int y, |
347 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
348 | | void pipeRunSimpleMono1(SplashPipe *pipe, int x0, int x1, int y, |
349 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
350 | | void pipeRunSimpleMono8(SplashPipe *pipe, int x0, int x1, int y, |
351 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
352 | | void pipeRunSimpleRGB8(SplashPipe *pipe, int x0, int x1, int y, |
353 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
354 | | void pipeRunSimpleBGR8(SplashPipe *pipe, int x0, int x1, int y, |
355 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
356 | | #if SPLASH_CMYK |
357 | | void pipeRunSimpleCMYK8(SplashPipe *pipe, int x0, int x1, int y, |
358 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
359 | | #endif |
360 | | void pipeRunShapeMono1(SplashPipe *pipe, int x0, int x1, int y, |
361 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
362 | | void pipeRunShapeMono8(SplashPipe *pipe, int x0, int x1, int y, |
363 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
364 | | void pipeRunShapeRGB8(SplashPipe *pipe, int x0, int x1, int y, |
365 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
366 | | void pipeRunShapeBGR8(SplashPipe *pipe, int x0, int x1, int y, |
367 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
368 | | #if SPLASH_CMYK |
369 | | void pipeRunShapeCMYK8(SplashPipe *pipe, int x0, int x1, int y, |
370 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
371 | | #endif |
372 | | void pipeRunShapeNoAlphaMono8(SplashPipe *pipe, int x0, int x1, int y, |
373 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
374 | | void pipeRunAAMono1(SplashPipe *pipe, int x0, int x1, int y, |
375 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
376 | | void pipeRunAAMono8(SplashPipe *pipe, int x0, int x1, int y, |
377 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
378 | | void pipeRunAARGB8(SplashPipe *pipe, int x0, int x1, int y, |
379 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
380 | | void pipeRunAABGR8(SplashPipe *pipe, int x0, int x1, int y, |
381 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
382 | | #if SPLASH_CMYK |
383 | | void pipeRunAACMYK8(SplashPipe *pipe, int x0, int x1, int y, |
384 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
385 | | #endif |
386 | | void pipeRunSoftMaskMono8(SplashPipe *pipe, int x0, int x1, int y, |
387 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
388 | | void pipeRunSoftMaskRGB8(SplashPipe *pipe, int x0, int x1, int y, |
389 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
390 | | void pipeRunSoftMaskBGR8(SplashPipe *pipe, int x0, int x1, int y, |
391 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
392 | | #if SPLASH_CMYK |
393 | | void pipeRunSoftMaskCMYK8(SplashPipe *pipe, int x0, int x1, int y, |
394 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
395 | | #endif |
396 | | void pipeRunNonIsoMono8(SplashPipe *pipe, int x0, int x1, int y, |
397 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
398 | | void pipeRunNonIsoRGB8(SplashPipe *pipe, int x0, int x1, int y, |
399 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
400 | | void pipeRunNonIsoBGR8(SplashPipe *pipe, int x0, int x1, int y, |
401 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
402 | | #if SPLASH_CMYK |
403 | | void pipeRunNonIsoCMYK8(SplashPipe *pipe, int x0, int x1, int y, |
404 | | Guchar *shapePtr, SplashColorPtr cSrcPtr); |
405 | | #endif |
406 | | void useDestRow(int y); |
407 | | void copyGroupBackdropRow(int y); |
408 | | void transform(SplashCoord *matrix, SplashCoord xi, SplashCoord yi, |
409 | | SplashCoord *xo, SplashCoord *yo); |
410 | | void updateModX(int x); |
411 | | void updateModY(int y); |
412 | | void strokeNarrow(SplashPath *path); |
413 | | void drawStrokeSpan(SplashPipe *pipe, int x0, int x1, int y, GBool noClip); |
414 | | void strokeWide(SplashPath *path, SplashCoord w, |
415 | | int lineCap, int lineJoin); |
416 | | SplashPath *flattenPath(SplashPath *path, SplashCoord *matrix, |
417 | | SplashCoord flatness); |
418 | | void flattenCurve(SplashCoord x0, SplashCoord y0, |
419 | | SplashCoord x1, SplashCoord y1, |
420 | | SplashCoord x2, SplashCoord y2, |
421 | | SplashCoord x3, SplashCoord y3, |
422 | | SplashCoord *matrix, SplashCoord flatness2, |
423 | | SplashPath *fPath); |
424 | | SplashPath *makeDashedPath(SplashPath *xPath); |
425 | | SplashError fillWithPattern(SplashPath *path, GBool eo, |
426 | | SplashPattern *pattern, SplashCoord alpha); |
427 | | SplashPath *tweakFillPath(SplashPath *path); |
428 | | GBool pathAllOutside(SplashPath *path); |
429 | | SplashError fillGlyph2(int x0, int y0, SplashGlyphBitmap *glyph); |
430 | | void getImageBounds(SplashCoord xyMin, SplashCoord xyMax, |
431 | | int *xyMinI, int *xyMaxI); |
432 | | void drawImageMaskArbitraryNoInterp(Guchar *scaledMask, |
433 | | SplashDrawImageMaskRowData *dd, |
434 | | SplashDrawImageMaskRowFunc drawRowFunc, |
435 | | SplashCoord *invMat, |
436 | | int scaledWidth, int scaledHeight, |
437 | | int xMin, int yMin, int xMax, int yMax); |
438 | | void drawImageMaskArbitraryInterp(Guchar *scaledMask, |
439 | | SplashDrawImageMaskRowData *dd, |
440 | | SplashDrawImageMaskRowFunc drawRowFunc, |
441 | | SplashCoord *invMat, |
442 | | int scaledWidth, int scaledHeight, |
443 | | int xMin, int yMin, int xMax, int yMax); |
444 | | void mirrorImageMaskRow(Guchar *maskIn, Guchar *maskOut, int width); |
445 | | void drawImageMaskRowNoClip(SplashDrawImageMaskRowData *data, |
446 | | Guchar *maskData, |
447 | | int x, int y, int width); |
448 | | void drawImageMaskRowClipNoAA(SplashDrawImageMaskRowData *data, |
449 | | Guchar *maskData, |
450 | | int x, int y, int width); |
451 | | void drawImageMaskRowClipAA(SplashDrawImageMaskRowData *data, |
452 | | Guchar *maskData, |
453 | | int x, int y, int width); |
454 | | ImageScaler *getImageScaler(GString *imageTag, |
455 | | SplashImageSource src, void *srcData, |
456 | | int w, int h, int nComps, |
457 | | int scaledWidth, int scaledHeight, |
458 | | SplashColorMode srcMode, |
459 | | GBool srcAlpha, GBool interpolate); |
460 | | void getScaledImage(GString *imageTag, |
461 | | SplashImageSource src, void *srcData, |
462 | | int w, int h, int nComps, |
463 | | int scaledWidth, int scaledHeight, |
464 | | SplashColorMode srcMode, |
465 | | GBool srcAlpha, GBool interpolate, |
466 | | Guchar **scaledColor, Guchar **scaledAlpha, |
467 | | GBool *freeScaledImage); |
468 | | void drawImageArbitraryNoInterp(Guchar *scaledColor, Guchar *scaledAlpha, |
469 | | SplashDrawImageRowData *dd, |
470 | | SplashDrawImageRowFunc drawRowFunc, |
471 | | SplashCoord *invMat, |
472 | | int scaledWidth, int scaledHeight, |
473 | | int xMin, int yMin, int xMax, int yMax, |
474 | | int nComps, GBool srcAlpha); |
475 | | void drawImageArbitraryInterp(Guchar *scaledColor, Guchar *scaledAlpha, |
476 | | SplashDrawImageRowData *dd, |
477 | | SplashDrawImageRowFunc drawRowFunc, |
478 | | SplashCoord *invMat, |
479 | | int scaledWidth, int scaledHeight, |
480 | | int xMin, int yMin, int xMax, int yMax, |
481 | | int nComps, GBool srcAlpha); |
482 | | void mirrorImageRow(Guchar *colorIn, Guchar *alphaIn, |
483 | | Guchar *colorOut, Guchar *alphaOut, |
484 | | int width, int nComps, GBool srcAlpha); |
485 | | void drawImageRowNoClipNoAlpha(SplashDrawImageRowData *data, |
486 | | Guchar *colorData, Guchar *alphaData, |
487 | | int x, int y, int width); |
488 | | void drawImageRowNoClipAlpha(SplashDrawImageRowData *data, |
489 | | Guchar *colorData, Guchar *alphaData, |
490 | | int x, int y, int width); |
491 | | void drawImageRowClipNoAlphaNoAA(SplashDrawImageRowData *data, |
492 | | Guchar *colorData, |
493 | | Guchar *alphaData, |
494 | | int x, int y, int width); |
495 | | void drawImageRowClipNoAlphaAA(SplashDrawImageRowData *data, |
496 | | Guchar *colorData, |
497 | | Guchar *alphaData, |
498 | | int x, int y, int width); |
499 | | void drawImageRowClipAlphaNoAA(SplashDrawImageRowData *data, |
500 | | Guchar *colorData, |
501 | | Guchar *alphaData, |
502 | | int x, int y, int width); |
503 | | void drawImageRowClipAlphaAA(SplashDrawImageRowData *data, |
504 | | Guchar *colorData, |
505 | | Guchar *alphaData, |
506 | | int x, int y, int width); |
507 | | void dumpPath(SplashPath *path); |
508 | | void dumpXPath(SplashXPath *path); |
509 | | |
510 | | |
511 | | static SplashPipeResultColorCtrl pipeResultColorNoAlphaBlend[]; |
512 | | static SplashPipeResultColorCtrl pipeResultColorAlphaNoBlend[]; |
513 | | static SplashPipeResultColorCtrl pipeResultColorAlphaBlend[]; |
514 | | static int pipeNonIsoGroupCorrection[]; |
515 | | |
516 | | SplashBitmap *bitmap; |
517 | | int bitmapComps; |
518 | | SplashState *state; |
519 | | Guchar *scanBuf; |
520 | | Guchar *scanBuf2; |
521 | | SplashBitmap // for transparency groups, this is the bitmap |
522 | | *groupBackBitmap; // containing the alpha0/color0 values |
523 | | int groupBackX, groupBackY; // offset within groupBackBitmap |
524 | | SplashGroupDestInitMode groupDestInitMode; |
525 | | int groupDestInitYMin, groupDestInitYMax; |
526 | | Guint *overprintMaskBitmap; |
527 | | SplashCoord minLineWidth; |
528 | | int modXMin, modYMin, modXMax, modYMax; |
529 | | SplashClipResult opClipRes; |
530 | | GBool vectorAntialias; |
531 | | GBool inShading; |
532 | | GBool debugMode; |
533 | | |
534 | | SplashImageCache *imageCache; |
535 | | }; |
536 | | |
537 | | #endif |