Merge lp:~matttbe/ubuntu/quantal/poppler/lp1072129 into lp:ubuntu/quantal-proposed/poppler

Proposed by Matthieu Baerts
Status: Merged
Merge reported by: Sebastien Bacher
Merged at revision: not available
Proposed branch: lp:~matttbe/ubuntu/quantal/poppler/lp1072129
Merge into: lp:ubuntu/quantal-proposed/poppler
Diff against target: 14815 lines (+8447/-1082)
116 files modified
.pc/.quilt_patches (+1/-0)
.pc/.quilt_series (+1/-0)
.pc/applied-patches (+2/-0)
.pc/git_gouraud_shading_support.patch/poppler/CairoOutputDev.cc (+3121/-0)
.pc/ltmain-as-needed.diff/ltmain.sh (+19/-13)
.pc/qt4-visibility.diff/qt4/src/Makefile.am (+74/-0)
.pc/qt4-visibility.diff/qt4/src/Makefile.in (+948/-0)
.pc/qt4-visibility.diff/qt4/src/poppler-export.h (+17/-0)
CMakeLists.txt (+2/-2)
ChangeLog (+684/-0)
Makefile.am (+1/-0)
Makefile.in (+33/-10)
NEWS (+65/-0)
aclocal.m4 (+5/-5)
cmake/modules/FindLCMS2.cmake (+73/-0)
config.h.in (+5/-0)
config.sub (+10/-1)
configure (+346/-265)
configure.ac (+2/-2)
cpp/Makefile.in (+33/-10)
cpp/poppler-version.h (+2/-2)
cpp/tests/Makefile.in (+23/-1)
debian/changelog (+186/-10)
debian/control (+11/-11)
debian/copyright (+21/-9)
debian/libpoppler-dev.install (+0/-11)
debian/libpoppler-glib8.symbols.in (+270/-0)
debian/libpoppler-private-dev.install (+4/-0)
debian/libpoppler-private-dev.lintian-overrides (+0/-3)
debian/libpoppler-qt4-4.symbols.in (+754/-0)
debian/libpoppler25.install (+0/-1)
debian/libpoppler28.install (+1/-0)
debian/patches/git_gouraud_shading_support.patch (+38/-0)
debian/patches/ltmain-as-needed.diff (+1/-1)
debian/patches/qt4-visibility.diff (+42/-0)
debian/patches/series (+2/-0)
debian/rules (+17/-6)
depcomp (+126/-27)
fofi/FoFiType1C.cc (+17/-8)
fofi/FoFiType1C.h (+2/-0)
fofi/Makefile.in (+27/-2)
glib/Makefile.in (+45/-13)
glib/Poppler-0.18.gir (+171/-218)
glib/demo/Makefile.in (+27/-2)
glib/poppler-document.cc (+22/-23)
glib/reference/Makefile.in (+23/-1)
glib/reference/html/PopplerDocument.html (+2/-2)
glib/reference/html/ch01.html (+1/-1)
glib/reference/html/index.html (+1/-1)
glib/reference/html/poppler-Version-and-Features-Information.html (+1/-1)
glib/reference/version.xml (+1/-1)
goo/FixedPoint.h (+1/-1)
goo/GooTimer.h (+1/-1)
goo/JpegWriter.h (+1/-1)
goo/Makefile.in (+27/-2)
goo/PNGWriter.h (+1/-1)
goo/TiffWriter.h (+1/-1)
goo/gfile.h (+1/-1)
goo/gmem.h (+1/-1)
goo/gstrtod.cc (+5/-5)
ltmain.sh (+19/-13)
m4/libtool.m4 (+231/-61)
m4/ltoptions.m4 (+17/-2)
missing (+29/-65)
poppler/Annot.cc (+10/-1)
poppler/CairoOutputDev.cc (+15/-4)
poppler/Catalog.cc (+3/-1)
poppler/DCTStream.cc (+5/-1)
poppler/FileSpec.cc (+4/-0)
poppler/FontInfo.cc (+1/-0)
poppler/Form.cc (+1/-1)
poppler/Function.cc (+5/-0)
poppler/Gfx.cc (+71/-3)
poppler/Gfx.h (+3/-1)
poppler/GfxState.cc (+3/-1)
poppler/GlobalParams.cc (+32/-26)
poppler/GlobalParamsWin.cc (+6/-1)
poppler/JBIG2Stream.cc (+53/-15)
poppler/JPXStream.cc (+12/-2)
poppler/Linearization.cc (+2/-2)
poppler/Makefile.am (+1/-1)
poppler/Makefile.in (+34/-5)
poppler/OutputDev.h (+1/-0)
poppler/PDFDoc.cc (+14/-2)
poppler/PSOutputDev.cc (+76/-31)
poppler/PSOutputDev.h (+1/-1)
poppler/SecurityHandler.cc (+6/-1)
poppler/SplashOutputDev.cc (+66/-23)
poppler/SplashOutputDev.h (+1/-0)
poppler/XRef.cc (+18/-2)
poppler/XRef.h (+2/-3)
qt4/Makefile.in (+27/-8)
qt4/demos/Makefile.in (+23/-1)
qt4/src/Makefile.am (+1/-0)
qt4/src/Makefile.in (+30/-3)
qt4/src/poppler-annotation.cc (+20/-3)
qt4/src/poppler-annotation.h (+1/-1)
qt4/src/poppler-embeddedfile-private.h (+3/-1)
qt4/src/poppler-embeddedfile.cc (+12/-7)
qt4/src/poppler-export.h (+3/-0)
qt4/tests/Makefile.in (+23/-1)
splash/Makefile.in (+27/-2)
splash/Splash.cc (+82/-77)
splash/Splash.h (+2/-2)
splash/SplashBitmap.cc (+13/-8)
splash/SplashClip.cc (+23/-0)
splash/SplashFTFont.h (+1/-1)
splash/SplashMath.h (+1/-1)
splash/SplashXPathScanner.cc (+3/-0)
test/Makefile.in (+23/-1)
utils/HtmlFonts.cc (+18/-6)
utils/HtmlFonts.h (+2/-1)
utils/HtmlOutputDev.cc (+1/-3)
utils/Makefile.in (+39/-5)
utils/pdfseparate.1 (+3/-3)
utils/pdfseparate.cc (+5/-1)
To merge this branch: bzr merge lp:~matttbe/ubuntu/quantal/poppler/lp1072129
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Review via email: mp+134708@code.launchpad.net

Description of the change

Hello,

Due to a bug in poppler, Evince crash when loading some PDF files (LP: #1072129).
This new version simply adds the upstream patch in order to fix this bug.

For more details about this new version, please have a look at this bug #1072129.

Thank you for your help! :)

PS: You can easily test the new version by using these packages:
  - Ubuntu Raring 13.04: https://launchpad.net/~matttbe/+archive/ppa/+sourcepub/2781218/+listing-archive-extra
  - Ubuntu Quantal 12.10: https://launchpad.net/~matttbe/+archive/ppa/+sourcepub/2781220/+listing-archive-extra
PS²: [2012-11-16] ACK still not received by the Ubuntu-SRU team for this new version but I guess this package can already been uploaded to the Quantal queue ;)

To post a comment you must log in.
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks for your work Matthieu, I've sponsored that, it's in the queue waiting for review (that can take some weeks before somebody look at it seeing the current backlog from the SRU team there)

review: Approve
Revision history for this message
Matthieu Baerts (matttbe) wrote :

Thank you for your help ;)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== added file '.pc/.quilt_patches'
--- .pc/.quilt_patches 1970-01-01 00:00:00 +0000
+++ .pc/.quilt_patches 2012-11-16 16:39:27 +0000
@@ -0,0 +1,1 @@
1debian/patches
02
=== added file '.pc/.quilt_series'
--- .pc/.quilt_series 1970-01-01 00:00:00 +0000
+++ .pc/.quilt_series 2012-11-16 16:39:27 +0000
@@ -0,0 +1,1 @@
1series
02
=== modified file '.pc/applied-patches'
--- .pc/applied-patches 2012-06-07 17:13:58 +0000
+++ .pc/applied-patches 2012-11-16 16:39:27 +0000
@@ -1,1 +1,3 @@
1ltmain-as-needed.diff1ltmain-as-needed.diff
2qt4-visibility.diff
3git_gouraud_shading_support.patch
24
=== added directory '.pc/git_gouraud_shading_support.patch'
=== added directory '.pc/git_gouraud_shading_support.patch/poppler'
=== added file '.pc/git_gouraud_shading_support.patch/poppler/CairoOutputDev.cc'
--- .pc/git_gouraud_shading_support.patch/poppler/CairoOutputDev.cc 1970-01-01 00:00:00 +0000
+++ .pc/git_gouraud_shading_support.patch/poppler/CairoOutputDev.cc 2012-11-16 16:39:27 +0000
@@ -0,0 +1,3121 @@
1//========================================================================
2//
3// CairoOutputDev.cc
4//
5// Copyright 2003 Glyph & Cog, LLC
6// Copyright 2004 Red Hat, Inc
7//
8//========================================================================
9
10//========================================================================
11//
12// Modified under the Poppler project - http://poppler.freedesktop.org
13//
14// All changes made under the Poppler project to this file are licensed
15// under GPL version 2 or later
16//
17// Copyright (C) 2005-2008 Jeff Muizelaar <jeff@infidigm.net>
18// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com>
19// Copyright (C) 2005, 2009, 2012 Albert Astals Cid <aacid@kde.org>
20// Copyright (C) 2005 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
21// Copyright (C) 2006-2011 Carlos Garcia Campos <carlosgc@gnome.org>
22// Copyright (C) 2008 Carl Worth <cworth@cworth.org>
23// Copyright (C) 2008-2012 Adrian Johnson <ajohnson@redneon.com>
24// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu>
25// Copyright (C) 2008, 2009 Chris Wilson <chris@chris-wilson.co.uk>
26// Copyright (C) 2008 Hib Eris <hib@hiberis.nl>
27// Copyright (C) 2009, 2010 David Benjamin <davidben@mit.edu>
28// Copyright (C) 2011, 2012 Thomas Freitag <Thomas.Freitag@alfa.de>
29// Copyright (C) 2012 Patrick Pfeifer <p2000@mailinator.com>
30//
31// To see a description of the changes please see the Changelog file that
32// came with your tarball or type make ChangeLog if you are building from git
33//
34//========================================================================
35
36#include <config.h>
37
38#ifdef USE_GCC_PRAGMAS
39#pragma implementation
40#endif
41
42#include <string.h>
43#include <math.h>
44#include <assert.h>
45#include <cairo.h>
46
47#include "goo/gfile.h"
48#include "goo/gtypes_p.h"
49#include "GlobalParams.h"
50#include "Error.h"
51#include "Object.h"
52#include "Gfx.h"
53#include "GfxState.h"
54#include "GfxFont.h"
55#include "Page.h"
56#include "Link.h"
57#include "FontEncodingTables.h"
58#include "PDFDocEncoding.h"
59#include <fofi/FoFiTrueType.h>
60#include <splash/SplashBitmap.h>
61#include "CairoOutputDev.h"
62#include "CairoFontEngine.h"
63#include "CairoRescaleBox.h"
64#include "UTF8.h"
65//------------------------------------------------------------------------
66
67// #define LOG_CAIRO
68
69#ifdef LOG_CAIRO
70#define LOG(x) (x)
71#else
72#define LOG(x)
73#endif
74
75static inline void printMatrix(cairo_matrix_t *matrix){
76 printf("%f %f, %f %f (%f %f)\n", matrix->xx, matrix->yx,
77 matrix->xy, matrix->yy,
78 matrix->x0, matrix->y0);
79}
80
81
82#define MIN(a,b) (((a) < (b)) ? (a) : (b))
83#define MAX(a,b) (((a) > (b)) ? (a) : (b))
84
85
86//------------------------------------------------------------------------
87// CairoImage
88//------------------------------------------------------------------------
89
90CairoImage::CairoImage (double x1, double y1, double x2, double y2) {
91 this->image = NULL;
92 this->x1 = x1;
93 this->y1 = y1;
94 this->x2 = x2;
95 this->y2 = y2;
96}
97
98CairoImage::~CairoImage () {
99 if (image)
100 cairo_surface_destroy (image);
101}
102
103void CairoImage::setImage (cairo_surface_t *image) {
104 if (this->image)
105 cairo_surface_destroy (this->image);
106 this->image = cairo_surface_reference (image);
107}
108
109//------------------------------------------------------------------------
110// CairoOutputDev
111//------------------------------------------------------------------------
112
113// We cannot tie the lifetime of an FT_Library object to that of
114// CairoOutputDev, since any FT_Faces created with it may end up with a
115// reference by Cairo which can be held long after the CairoOutputDev is
116// deleted. The simplest way to avoid problems is to never tear down the
117// FT_Library instance; to avoid leaks, just use a single global instance
118// initialized the first time it is needed.
119FT_Library CairoOutputDev::ft_lib;
120GBool CairoOutputDev::ft_lib_initialized = gFalse;
121
122CairoOutputDev::CairoOutputDev() {
123 doc = NULL;
124
125 if (!ft_lib_initialized) {
126 FT_Init_FreeType(&ft_lib);
127 ft_lib_initialized = gTrue;
128 }
129
130 fontEngine = NULL;
131 fontEngine_owner = gFalse;
132 glyphs = NULL;
133 fill_pattern = NULL;
134 fill_color.r = fill_color.g = fill_color.b = 0;
135 stroke_pattern = NULL;
136 stroke_color.r = stroke_color.g = stroke_color.b = 0;
137 stroke_opacity = 1.0;
138 fill_opacity = 1.0;
139 textClipPath = NULL;
140 strokePathClip = NULL;
141 cairo = NULL;
142 currentFont = NULL;
143 prescaleImages = gTrue;
144 printing = gTrue;
145 use_show_text_glyphs = gFalse;
146 inType3Char = gFalse;
147 t3_glyph_has_bbox = gFalse;
148
149 groupColorSpaceStack = NULL;
150 maskStack = NULL;
151 group = NULL;
152 mask = NULL;
153 shape = NULL;
154 cairo_shape = NULL;
155 knockoutCount = 0;
156
157 text = NULL;
158 actualText = NULL;
159
160 // the SA parameter supposedly defaults to false, but Acrobat
161 // apparently hardwires it to true
162 stroke_adjust = globalParams->getStrokeAdjust();
163 align_stroke_coords = gFalse;
164 adjusted_stroke_width = gFalse;
165}
166
167CairoOutputDev::~CairoOutputDev() {
168 if (fontEngine_owner && fontEngine) {
169 delete fontEngine;
170 }
171
172 if (cairo)
173 cairo_destroy (cairo);
174 cairo_pattern_destroy (stroke_pattern);
175 cairo_pattern_destroy (fill_pattern);
176 if (group)
177 cairo_pattern_destroy (group);
178 if (mask)
179 cairo_pattern_destroy (mask);
180 if (shape)
181 cairo_pattern_destroy (shape);
182 if (text)
183 text->decRefCnt();
184 if (actualText)
185 delete actualText;
186}
187
188void CairoOutputDev::setCairo(cairo_t *cairo)
189{
190 if (this->cairo != NULL) {
191 cairo_status_t status = cairo_status (this->cairo);
192 if (status) {
193 error(errInternal, -1, "cairo context error: {0:s}\n", cairo_status_to_string(status));
194 }
195 cairo_destroy (this->cairo);
196 assert(!cairo_shape);
197 }
198 if (cairo != NULL) {
199 this->cairo = cairo_reference (cairo);
200 /* save the initial matrix so that we can use it for type3 fonts. */
201 //XXX: is this sufficient? could we miss changes to the matrix somehow?
202 cairo_get_matrix(cairo, &orig_matrix);
203 } else {
204 this->cairo = NULL;
205 this->cairo_shape = NULL;
206 }
207}
208
209void CairoOutputDev::setTextPage(TextPage *text)
210{
211 if (this->text)
212 this->text->decRefCnt();
213 if (actualText)
214 delete actualText;
215 if (text) {
216 this->text = text;
217 this->text->incRefCnt();
218 actualText = new ActualText(text);
219 } else {
220 this->text = NULL;
221 actualText = NULL;
222 }
223}
224
225void CairoOutputDev::startDoc(PDFDoc *docA,
226 CairoFontEngine *parentFontEngine) {
227 doc = docA;
228 if (parentFontEngine) {
229 fontEngine = parentFontEngine;
230 } else {
231 if (fontEngine) {
232 delete fontEngine;
233 }
234 fontEngine = new CairoFontEngine(ft_lib);
235 fontEngine_owner = gTrue;
236 }
237}
238
239void CairoOutputDev::startPage(int pageNum, GfxState *state) {
240 /* set up some per page defaults */
241 cairo_pattern_destroy(fill_pattern);
242 cairo_pattern_destroy(stroke_pattern);
243
244 fill_pattern = cairo_pattern_create_rgb(0., 0., 0.);
245 stroke_pattern = cairo_pattern_reference(fill_pattern);
246
247 if (text)
248 text->startPage(state);
249}
250
251void CairoOutputDev::endPage() {
252 if (text) {
253 text->endPage();
254 text->coalesce(gTrue, 0, gFalse);
255 }
256}
257
258void CairoOutputDev::saveState(GfxState *state) {
259 LOG(printf ("save\n"));
260 cairo_save (cairo);
261 if (cairo_shape)
262 cairo_save (cairo_shape);
263
264 MaskStack *ms = new MaskStack;
265 ms->mask = cairo_pattern_reference(mask);
266 ms->mask_matrix = mask_matrix;
267 ms->next = maskStack;
268 maskStack = ms;
269}
270
271void CairoOutputDev::restoreState(GfxState *state) {
272 LOG(printf ("restore\n"));
273 cairo_restore (cairo);
274 if (cairo_shape)
275 cairo_restore (cairo_shape);
276
277 /* These aren't restored by cairo_restore() since we keep them in
278 * the output device. */
279 updateFillColor(state);
280 updateStrokeColor(state);
281 updateFillOpacity(state);
282 updateStrokeOpacity(state);
283 updateBlendMode(state);
284
285 MaskStack* ms = maskStack;
286 if (ms) {
287 if (mask)
288 cairo_pattern_destroy(mask);
289 mask = ms->mask;
290 mask_matrix = ms->mask_matrix;
291 maskStack = ms->next;
292 delete ms;
293 }
294}
295
296void CairoOutputDev::updateAll(GfxState *state) {
297 updateLineDash(state);
298 updateLineJoin(state);
299 updateLineCap(state);
300 updateLineWidth(state);
301 updateFlatness(state);
302 updateMiterLimit(state);
303 updateFillColor(state);
304 updateStrokeColor(state);
305 updateFillOpacity(state);
306 updateStrokeOpacity(state);
307 updateBlendMode(state);
308 needFontUpdate = gTrue;
309 if (text)
310 text->updateFont(state);
311}
312
313void CairoOutputDev::setDefaultCTM(double *ctm) {
314 cairo_matrix_t matrix;
315 matrix.xx = ctm[0];
316 matrix.yx = ctm[1];
317 matrix.xy = ctm[2];
318 matrix.yy = ctm[3];
319 matrix.x0 = ctm[4];
320 matrix.y0 = ctm[5];
321
322 cairo_transform (cairo, &matrix);
323 if (cairo_shape)
324 cairo_transform (cairo_shape, &matrix);
325
326 OutputDev::setDefaultCTM(ctm);
327}
328
329void CairoOutputDev::updateCTM(GfxState *state, double m11, double m12,
330 double m21, double m22,
331 double m31, double m32) {
332 cairo_matrix_t matrix, invert_matrix;
333 matrix.xx = m11;
334 matrix.yx = m12;
335 matrix.xy = m21;
336 matrix.yy = m22;
337 matrix.x0 = m31;
338 matrix.y0 = m32;
339
340 /* Make sure the matrix is invertible before setting it.
341 * cairo will blow up if we give it a matrix that's not
342 * invertible, so we need to check before passing it
343 * to cairo_transform. Ignoring it is likely to give better
344 * results than not rendering anything at all. See #14398
345 *
346 * Ideally, we could do the cairo_transform
347 * and then check if anything went wrong and fix it then
348 * instead of having to invert the matrix. */
349 invert_matrix = matrix;
350 if (cairo_matrix_invert(&invert_matrix)) {
351 error(errSyntaxWarning, -1, "matrix not invertible\n");
352 return;
353 }
354
355 cairo_transform (cairo, &matrix);
356 if (cairo_shape)
357 cairo_transform (cairo_shape, &matrix);
358 updateLineDash(state);
359 updateLineJoin(state);
360 updateLineCap(state);
361 updateLineWidth(state);
362}
363
364void CairoOutputDev::updateLineDash(GfxState *state) {
365 double *dashPattern;
366 int dashLength;
367 double dashStart;
368
369 state->getLineDash(&dashPattern, &dashLength, &dashStart);
370 cairo_set_dash (cairo, dashPattern, dashLength, dashStart);
371 if (cairo_shape)
372 cairo_set_dash (cairo_shape, dashPattern, dashLength, dashStart);
373}
374
375void CairoOutputDev::updateFlatness(GfxState *state) {
376 // cairo_set_tolerance (cairo, state->getFlatness());
377}
378
379void CairoOutputDev::updateLineJoin(GfxState *state) {
380 switch (state->getLineJoin()) {
381 case 0:
382 cairo_set_line_join (cairo, CAIRO_LINE_JOIN_MITER);
383 break;
384 case 1:
385 cairo_set_line_join (cairo, CAIRO_LINE_JOIN_ROUND);
386 break;
387 case 2:
388 cairo_set_line_join (cairo, CAIRO_LINE_JOIN_BEVEL);
389 break;
390 }
391 if (cairo_shape)
392 cairo_set_line_join (cairo_shape, cairo_get_line_join(cairo));
393}
394
395void CairoOutputDev::updateLineCap(GfxState *state) {
396 switch (state->getLineCap()) {
397 case 0:
398 cairo_set_line_cap (cairo, CAIRO_LINE_CAP_BUTT);
399 break;
400 case 1:
401 cairo_set_line_cap (cairo, CAIRO_LINE_CAP_ROUND);
402 break;
403 case 2:
404 cairo_set_line_cap (cairo, CAIRO_LINE_CAP_SQUARE);
405 break;
406 }
407 if (cairo_shape)
408 cairo_set_line_cap (cairo_shape, cairo_get_line_cap(cairo));
409}
410
411void CairoOutputDev::updateMiterLimit(GfxState *state) {
412 cairo_set_miter_limit (cairo, state->getMiterLimit());
413 if (cairo_shape)
414 cairo_set_miter_limit (cairo_shape, state->getMiterLimit());
415}
416
417void CairoOutputDev::updateLineWidth(GfxState *state) {
418 LOG(printf ("line width: %f\n", state->getLineWidth()));
419 adjusted_stroke_width = gFalse;
420 double width = state->getLineWidth();
421 if (stroke_adjust && !printing) {
422 double x, y;
423 x = y = width;
424
425 /* find out line width in device units */
426 cairo_user_to_device_distance(cairo, &x, &y);
427 if (fabs(x) <= 1.0 && fabs(y) <= 1.0) {
428 /* adjust width to at least one device pixel */
429 x = y = 1.0;
430 cairo_device_to_user_distance(cairo, &x, &y);
431 width = MIN(fabs(x),fabs(y));
432 adjusted_stroke_width = gTrue;
433 }
434 } else if (width == 0.0) {
435 /* Cairo does not support 0 line width == 1 device pixel. Find out
436 * how big pixels (device unit) are in the x and y
437 * directions. Choose the smaller of the two as our line width.
438 */
439 double x = 1.0, y = 1.0;
440 if (printing) {
441 // assume printer pixel size is 1/600 inch
442 x = 72.0/600;
443 y = 72.0/600;
444 }
445 cairo_device_to_user_distance(cairo, &x, &y);
446 width = MIN(fabs(x),fabs(y));
447 }
448 cairo_set_line_width (cairo, width);
449 if (cairo_shape)
450 cairo_set_line_width (cairo_shape, cairo_get_line_width (cairo));
451}
452
453void CairoOutputDev::updateFillColor(GfxState *state) {
454 GfxRGB color = fill_color;
455
456 state->getFillRGB(&fill_color);
457 if (cairo_pattern_get_type (fill_pattern) != CAIRO_PATTERN_TYPE_SOLID ||
458 color.r != fill_color.r ||
459 color.g != fill_color.g ||
460 color.b != fill_color.b)
461 {
462 cairo_pattern_destroy(fill_pattern);
463 fill_pattern = cairo_pattern_create_rgba(colToDbl(fill_color.r),
464 colToDbl(fill_color.g),
465 colToDbl(fill_color.b),
466 fill_opacity);
467
468 LOG(printf ("fill color: %d %d %d\n",
469 fill_color.r, fill_color.g, fill_color.b));
470 }
471}
472
473void CairoOutputDev::updateStrokeColor(GfxState *state) {
474 GfxRGB color = stroke_color;
475
476 state->getStrokeRGB(&stroke_color);
477 if (cairo_pattern_get_type (fill_pattern) != CAIRO_PATTERN_TYPE_SOLID ||
478 color.r != stroke_color.r ||
479 color.g != stroke_color.g ||
480 color.b != stroke_color.b)
481 {
482 cairo_pattern_destroy(stroke_pattern);
483 stroke_pattern = cairo_pattern_create_rgba(colToDbl(stroke_color.r),
484 colToDbl(stroke_color.g),
485 colToDbl(stroke_color.b),
486 stroke_opacity);
487
488 LOG(printf ("stroke color: %d %d %d\n",
489 stroke_color.r, stroke_color.g, stroke_color.b));
490 }
491}
492
493void CairoOutputDev::updateFillOpacity(GfxState *state) {
494 double opacity = fill_opacity;
495
496 fill_opacity = state->getFillOpacity();
497 if (opacity != fill_opacity) {
498 cairo_pattern_destroy(fill_pattern);
499 fill_pattern = cairo_pattern_create_rgba(colToDbl(fill_color.r),
500 colToDbl(fill_color.g),
501 colToDbl(fill_color.b),
502 fill_opacity);
503
504 LOG(printf ("fill opacity: %f\n", fill_opacity));
505 }
506}
507
508void CairoOutputDev::updateStrokeOpacity(GfxState *state) {
509 double opacity = stroke_opacity;
510
511 stroke_opacity = state->getStrokeOpacity();
512 if (opacity != stroke_opacity) {
513 cairo_pattern_destroy(stroke_pattern);
514 stroke_pattern = cairo_pattern_create_rgba(colToDbl(stroke_color.r),
515 colToDbl(stroke_color.g),
516 colToDbl(stroke_color.b),
517 stroke_opacity);
518
519 LOG(printf ("stroke opacity: %f\n", stroke_opacity));
520 }
521}
522
523void CairoOutputDev::updateFillColorStop(GfxState *state, double offset) {
524 state->getFillRGB(&fill_color);
525
526 cairo_pattern_add_color_stop_rgba(fill_pattern, offset,
527 colToDbl(fill_color.r),
528 colToDbl(fill_color.g),
529 colToDbl(fill_color.b),
530 fill_opacity);
531 LOG(printf ("fill color stop: %f (%d, %d, %d)\n",
532 offset, fill_color.r, fill_color.g, fill_color.b));
533}
534
535void CairoOutputDev::updateBlendMode(GfxState *state) {
536 switch (state->getBlendMode()) {
537 default:
538 case gfxBlendNormal:
539 cairo_set_operator (cairo, CAIRO_OPERATOR_OVER);
540 break;
541 case gfxBlendMultiply:
542 cairo_set_operator (cairo, CAIRO_OPERATOR_MULTIPLY);
543 break;
544 case gfxBlendScreen:
545 cairo_set_operator (cairo, CAIRO_OPERATOR_SCREEN);
546 break;
547 case gfxBlendOverlay:
548 cairo_set_operator (cairo, CAIRO_OPERATOR_OVERLAY);
549 break;
550 case gfxBlendDarken:
551 cairo_set_operator (cairo, CAIRO_OPERATOR_DARKEN);
552 break;
553 case gfxBlendLighten:
554 cairo_set_operator (cairo, CAIRO_OPERATOR_LIGHTEN);
555 break;
556 case gfxBlendColorDodge:
557 cairo_set_operator (cairo, CAIRO_OPERATOR_COLOR_DODGE);
558 break;
559 case gfxBlendColorBurn:
560 cairo_set_operator (cairo, CAIRO_OPERATOR_COLOR_BURN);
561 break;
562 case gfxBlendHardLight:
563 cairo_set_operator (cairo, CAIRO_OPERATOR_HARD_LIGHT);
564 break;
565 case gfxBlendSoftLight:
566 cairo_set_operator (cairo, CAIRO_OPERATOR_SOFT_LIGHT);
567 break;
568 case gfxBlendDifference:
569 cairo_set_operator (cairo, CAIRO_OPERATOR_DIFFERENCE);
570 break;
571 case gfxBlendExclusion:
572 cairo_set_operator (cairo, CAIRO_OPERATOR_EXCLUSION);
573 break;
574 case gfxBlendHue:
575 cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_HUE);
576 break;
577 case gfxBlendSaturation:
578 cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_SATURATION);
579 break;
580 case gfxBlendColor:
581 cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_COLOR);
582 break;
583 case gfxBlendLuminosity:
584 cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_LUMINOSITY);
585 break;
586 }
587 LOG(printf ("blend mode: %d\n", (int)state->getBlendMode()));
588}
589
590void CairoOutputDev::updateFont(GfxState *state) {
591 cairo_font_face_t *font_face;
592 cairo_matrix_t matrix, invert_matrix;
593
594 LOG(printf ("updateFont() font=%s\n", state->getFont()->getName()->getCString()));
595
596 needFontUpdate = gFalse;
597
598 //FIXME: use cairo font engine?
599 if (text)
600 text->updateFont(state);
601
602 currentFont = fontEngine->getFont (state->getFont(), doc, printing);
603
604 if (!currentFont)
605 return;
606
607 font_face = currentFont->getFontFace();
608 cairo_set_font_face (cairo, font_face);
609
610 use_show_text_glyphs = state->getFont()->hasToUnicodeCMap() &&
611 cairo_surface_has_show_text_glyphs (cairo_get_target (cairo));
612
613 double fontSize = state->getFontSize();
614 double *m = state->getTextMat();
615 /* NOTE: adjusting by a constant is hack. The correct solution
616 * is probably to use user-fonts and compute the scale on a per
617 * glyph basis instead of for the entire font */
618 double w = currentFont->getSubstitutionCorrection(state->getFont());
619 matrix.xx = m[0] * fontSize * state->getHorizScaling() * w;
620 matrix.yx = m[1] * fontSize * state->getHorizScaling() * w;
621 matrix.xy = -m[2] * fontSize;
622 matrix.yy = -m[3] * fontSize;
623 matrix.x0 = 0;
624 matrix.y0 = 0;
625
626 LOG(printf ("font matrix: %f %f %f %f\n", matrix.xx, matrix.yx, matrix.xy, matrix.yy));
627
628 /* Make sure the font matrix is invertible before setting it. cairo
629 * will blow up if we give it a matrix that's not invertible, so we
630 * need to check before passing it to cairo_set_font_matrix. Ignoring it
631 * is likely to give better results than not rendering anything at
632 * all. See #18254.
633 */
634 invert_matrix = matrix;
635 if (cairo_matrix_invert(&invert_matrix)) {
636 error(errSyntaxWarning, -1, "font matrix not invertible\n");
637 return;
638 }
639
640 cairo_set_font_matrix (cairo, &matrix);
641}
642
643/* Tolerance in pixels for checking if strokes are horizontal or vertical
644 * lines in device space */
645#define STROKE_COORD_TOLERANCE 0.5
646
647/* Align stroke coordinate i if the point is the start or end of a
648 * horizontal or vertical line */
649void CairoOutputDev::alignStrokeCoords(GfxSubpath *subpath, int i, double *x, double *y)
650{
651 double x1, y1, x2, y2;
652 GBool align = gFalse;
653
654 x1 = subpath->getX(i);
655 y1 = subpath->getY(i);
656 cairo_user_to_device (cairo, &x1, &y1);
657
658 // Does the current coord and prev coord form a horiz or vert line?
659 if (i > 0 && !subpath->getCurve(i - 1)) {
660 x2 = subpath->getX(i - 1);
661 y2 = subpath->getY(i - 1);
662 cairo_user_to_device (cairo, &x2, &y2);
663 if (fabs(x2 - x1) < STROKE_COORD_TOLERANCE || fabs(y2 - y1) < STROKE_COORD_TOLERANCE)
664 align = gTrue;
665 }
666
667 // Does the current coord and next coord form a horiz or vert line?
668 if (i < subpath->getNumPoints() - 1 && !subpath->getCurve(i + 1)) {
669 x2 = subpath->getX(i + 1);
670 y2 = subpath->getY(i + 1);
671 cairo_user_to_device (cairo, &x2, &y2);
672 if (fabs(x2 - x1) < STROKE_COORD_TOLERANCE || fabs(y2 - y1) < STROKE_COORD_TOLERANCE)
673 align = gTrue;
674 }
675
676 *x = subpath->getX(i);
677 *y = subpath->getY(i);
678 if (align) {
679 /* see http://www.cairographics.org/FAQ/#sharp_lines */
680 cairo_user_to_device (cairo, x, y);
681 *x = floor(*x) + 0.5;
682 *y = floor(*y) + 0.5;
683 cairo_device_to_user (cairo, x, y);
684 }
685}
686
687#undef STROKE_COORD_TOLERANCE
688
689void CairoOutputDev::doPath(cairo_t *cairo, GfxState *state, GfxPath *path) {
690 GfxSubpath *subpath;
691 int i, j;
692 double x, y;
693 cairo_new_path (cairo);
694 for (i = 0; i < path->getNumSubpaths(); ++i) {
695 subpath = path->getSubpath(i);
696 if (subpath->getNumPoints() > 0) {
697 if (align_stroke_coords) {
698 alignStrokeCoords(subpath, 0, &x, &y);
699 } else {
700 x = subpath->getX(0);
701 y = subpath->getY(0);
702 }
703 cairo_move_to (cairo, x, y);
704 j = 1;
705 while (j < subpath->getNumPoints()) {
706 if (subpath->getCurve(j)) {
707 if (align_stroke_coords) {
708 alignStrokeCoords(subpath, j + 2, &x, &y);
709 } else {
710 x = subpath->getX(j+2);
711 y = subpath->getY(j+2);
712 }
713 cairo_curve_to( cairo,
714 subpath->getX(j), subpath->getY(j),
715 subpath->getX(j+1), subpath->getY(j+1),
716 x, y);
717
718 j += 3;
719 } else {
720 if (align_stroke_coords) {
721 alignStrokeCoords(subpath, j, &x, &y);
722 } else {
723 x = subpath->getX(j);
724 y = subpath->getY(j);
725 }
726 cairo_line_to (cairo, x, y);
727 ++j;
728 }
729 }
730 if (subpath->isClosed()) {
731 LOG (printf ("close\n"));
732 cairo_close_path (cairo);
733 }
734 }
735 }
736}
737
738void CairoOutputDev::stroke(GfxState *state) {
739 if (inType3Char) {
740 GfxGray gray;
741 state->getFillGray(&gray);
742 if (colToDbl(gray) > 0.5)
743 return;
744 }
745
746 if (adjusted_stroke_width)
747 align_stroke_coords = gTrue;
748 doPath (cairo, state, state->getPath());
749 align_stroke_coords = gFalse;
750 cairo_set_source (cairo, stroke_pattern);
751 LOG(printf ("stroke\n"));
752 cairo_stroke (cairo);
753 if (cairo_shape) {
754 doPath (cairo_shape, state, state->getPath());
755 cairo_stroke (cairo_shape);
756 }
757}
758
759void CairoOutputDev::fill(GfxState *state) {
760 if (inType3Char) {
761 GfxGray gray;
762 state->getFillGray(&gray);
763 if (colToDbl(gray) > 0.5)
764 return;
765 }
766
767 doPath (cairo, state, state->getPath());
768 cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_WINDING);
769 cairo_set_source (cairo, fill_pattern);
770 LOG(printf ("fill\n"));
771 //XXX: how do we get the path
772 if (mask) {
773 cairo_save (cairo);
774 cairo_clip (cairo);
775 cairo_set_matrix (cairo, &mask_matrix);
776 cairo_mask (cairo, mask);
777 cairo_restore (cairo);
778 } else if (strokePathClip) {
779 fillToStrokePathClip(state);
780 } else {
781 cairo_fill (cairo);
782 }
783 if (cairo_shape) {
784 cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_WINDING);
785 doPath (cairo_shape, state, state->getPath());
786 cairo_fill (cairo_shape);
787 }
788}
789
790void CairoOutputDev::eoFill(GfxState *state) {
791 doPath (cairo, state, state->getPath());
792 cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_EVEN_ODD);
793 cairo_set_source (cairo, fill_pattern);
794 LOG(printf ("fill-eo\n"));
795 cairo_fill (cairo);
796
797 if (cairo_shape) {
798 cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_EVEN_ODD);
799 doPath (cairo_shape, state, state->getPath());
800 cairo_fill (cairo_shape);
801 }
802
803}
804
805GBool CairoOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx1, Catalog *cat, Object *str,
806 double *pmat, int paintType, int /*tilingType*/, Dict *resDict,
807 double *mat, double *bbox,
808 int x0, int y0, int x1, int y1,
809 double xStep, double yStep)
810{
811 PDFRectangle box;
812 Gfx *gfx;
813 cairo_pattern_t *pattern;
814 cairo_surface_t *surface;
815 cairo_matrix_t matrix;
816 cairo_t *old_cairo;
817 double xMin, yMin, xMax, yMax;
818 double width, height;
819 int surface_width, surface_height;
820 StrokePathClip *strokePathTmp;
821
822 width = bbox[2] - bbox[0];
823 height = bbox[3] - bbox[1];
824
825 if (xStep != width || yStep != height)
826 return gFalse;
827 /* TODO: implement the other cases here too */
828
829 surface_width = (int) ceil (width);
830 surface_height = (int) ceil (height);
831
832 surface = cairo_surface_create_similar (cairo_get_target (cairo),
833 CAIRO_CONTENT_COLOR_ALPHA,
834 surface_width, surface_height);
835 if (cairo_surface_status (surface))
836 return gFalse;
837
838 old_cairo = cairo;
839 cairo = cairo_create (surface);
840 cairo_surface_destroy (surface);
841
842 box.x1 = bbox[0]; box.y1 = bbox[1];
843 box.x2 = bbox[2]; box.y2 = bbox[3];
844 strokePathTmp = strokePathClip;
845 strokePathClip = NULL;
846 gfx = new Gfx(doc, this, resDict, &box, NULL);
847 gfx->display(str);
848 delete gfx;
849 strokePathClip = strokePathTmp;
850
851 pattern = cairo_pattern_create_for_surface (cairo_get_target (cairo));
852 cairo_destroy (cairo);
853 cairo = old_cairo;
854 if (cairo_pattern_status (pattern))
855 return gFalse;
856
857 state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax);
858 cairo_rectangle (cairo, xMin, yMin, xMax - xMin, yMax - yMin);
859
860 cairo_matrix_init_scale (&matrix, surface_width / width, surface_height / height);
861 cairo_pattern_set_matrix (pattern, &matrix);
862
863 cairo_matrix_init (&matrix, mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]);
864 cairo_transform (cairo, &matrix);
865 cairo_set_source (cairo, pattern);
866 cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT);
867 if (strokePathClip) {
868 fillToStrokePathClip(state);
869 } else {
870 cairo_fill (cairo);
871 }
872
873 cairo_pattern_destroy (pattern);
874
875 return gTrue;
876}
877
878GBool CairoOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) {
879 double x0, y0, x1, y1;
880 double dx, dy;
881
882 shading->getCoords(&x0, &y0, &x1, &y1);
883 dx = x1 - x0;
884 dy = y1 - y0;
885
886 cairo_pattern_destroy(fill_pattern);
887 fill_pattern = cairo_pattern_create_linear (x0 + tMin * dx, y0 + tMin * dy,
888 x0 + tMax * dx, y0 + tMax * dy);
889 if (!shading->getExtend0() && !shading->getExtend1())
890 cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_NONE);
891 else
892 cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_PAD);
893
894 LOG (printf ("axial-sh\n"));
895
896 // TODO: use the actual stops in the shading in the case
897 // of linear interpolation (Type 2 Exponential functions with N=1)
898 return gFalse;
899}
900
901GBool CairoOutputDev::axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading)
902{
903 return (shading->getExtend0() == shading->getExtend1());
904}
905
906GBool CairoOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax) {
907 double x0, y0, r0, x1, y1, r1;
908 double dx, dy, dr;
909
910 shading->getCoords(&x0, &y0, &r0, &x1, &y1, &r1);
911 dx = x1 - x0;
912 dy = y1 - y0;
913 dr = r1 - r0;
914 cairo_pattern_destroy(fill_pattern);
915 fill_pattern = cairo_pattern_create_radial (x0 + sMin * dx,
916 y0 + sMin * dy,
917 r0 + sMin * dr,
918 x0 + sMax * dx,
919 y0 + sMax * dy,
920 r0 + sMax * dr);
921 if (shading->getExtend0() && shading->getExtend1())
922 cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_PAD);
923 else
924 cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_NONE);
925
926 LOG (printf ("radial-sh\n"));
927
928 return gFalse;
929}
930
931GBool CairoOutputDev::radialShadedSupportExtend(GfxState *state, GfxRadialShading *shading)
932{
933 return (shading->getExtend0() == shading->getExtend1());
934}
935
936#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0)
937GBool CairoOutputDev::gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading)
938{
939 double x0, y0, x1, y1, x2, y2;
940 GfxColor color[3];
941 int i, j;
942 GfxRGB rgb;
943
944 cairo_pattern_destroy(fill_pattern);
945 fill_pattern = cairo_pattern_create_mesh ();
946
947 for (i = 0; i < shading->getNTriangles(); i++) {
948 shading->getTriangle(i,
949 &x0, &y0, &color[0],
950 &x1, &y1, &color[1],
951 &x2, &y2, &color[2]);
952
953 cairo_mesh_pattern_begin_patch (fill_pattern);
954
955 cairo_mesh_pattern_move_to (fill_pattern, x0, y0);
956 cairo_mesh_pattern_line_to (fill_pattern, x1, y1);
957 cairo_mesh_pattern_line_to (fill_pattern, x2, y2);
958
959 for (j = 0; j < 3; j++) {
960 shading->getColorSpace()->getRGB(&color[j], &rgb);
961 cairo_mesh_pattern_set_corner_color_rgb (fill_pattern, j,
962 colToDbl(rgb.r),
963 colToDbl(rgb.g),
964 colToDbl(rgb.b));
965 }
966
967 cairo_mesh_pattern_end_patch (fill_pattern);
968 }
969
970 double xMin, yMin, xMax, yMax;
971 // get the clip region bbox
972 state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax);
973 state->moveTo(xMin, yMin);
974 state->lineTo(xMin, yMax);
975 state->lineTo(xMax, yMax);
976 state->lineTo(xMax, yMin);
977 state->closePath();
978 fill(state);
979 state->clearPath();
980
981 return gTrue;
982}
983
984GBool CairoOutputDev::patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading)
985{
986 int i, j, k;
987
988 cairo_pattern_destroy(fill_pattern);
989 fill_pattern = cairo_pattern_create_mesh ();
990
991 for (i = 0; i < shading->getNPatches(); i++) {
992 GfxPatch *patch = shading->getPatch(i);
993 GfxColor color;
994 GfxRGB rgb;
995
996 cairo_mesh_pattern_begin_patch (fill_pattern);
997
998 cairo_mesh_pattern_move_to (fill_pattern, patch->x[0][0], patch->y[0][0]);
999 cairo_mesh_pattern_curve_to (fill_pattern,
1000 patch->x[0][1], patch->y[0][1],
1001 patch->x[0][2], patch->y[0][2],
1002 patch->x[0][3], patch->y[0][3]);
1003
1004 cairo_mesh_pattern_curve_to (fill_pattern,
1005 patch->x[1][3], patch->y[1][3],
1006 patch->x[2][3], patch->y[2][3],
1007 patch->x[3][3], patch->y[3][3]);
1008
1009 cairo_mesh_pattern_curve_to (fill_pattern,
1010 patch->x[3][2], patch->y[3][2],
1011 patch->x[3][1], patch->y[3][1],
1012 patch->x[3][0], patch->y[3][0]);
1013
1014 cairo_mesh_pattern_curve_to (fill_pattern,
1015 patch->x[2][0], patch->y[2][0],
1016 patch->x[1][0], patch->y[1][0],
1017 patch->x[0][0], patch->y[0][0]);
1018
1019 cairo_mesh_pattern_set_control_point (fill_pattern, 0, patch->x[1][1], patch->y[1][1]);
1020 cairo_mesh_pattern_set_control_point (fill_pattern, 1, patch->x[1][2], patch->y[1][2]);
1021 cairo_mesh_pattern_set_control_point (fill_pattern, 2, patch->x[2][2], patch->y[2][2]);
1022 cairo_mesh_pattern_set_control_point (fill_pattern, 3, patch->x[2][1], patch->y[2][1]);
1023
1024 for (j = 0; j < 4; j++) {
1025 int u, v;
1026
1027 switch (j) {
1028 case 0:
1029 u = 0; v = 0;
1030 break;
1031 case 1:
1032 u = 0; v = 1;
1033 break;
1034 case 2:
1035 u = 1; v = 1;
1036 break;
1037 case 3:
1038 u = 1; v = 0;
1039 break;
1040 }
1041
1042 if (shading->isParameterized()) {
1043 shading->getParameterizedColor (patch->color[u][v].c[0], &color);
1044 } else {
1045 for (k = 0; k < shading->getColorSpace()->getNComps(); k++) {
1046 // simply cast to the desired type; that's all what is needed.
1047 color.c[k] = GfxColorComp (patch->color[u][v].c[k]);
1048 }
1049 }
1050
1051 shading->getColorSpace()->getRGB(&color, &rgb);
1052 cairo_mesh_pattern_set_corner_color_rgb (fill_pattern, j,
1053 colToDbl(rgb.r),
1054 colToDbl(rgb.g),
1055 colToDbl(rgb.b));
1056 }
1057 cairo_mesh_pattern_end_patch (fill_pattern);
1058 }
1059
1060 double xMin, yMin, xMax, yMax;
1061 // get the clip region bbox
1062 state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax);
1063 state->moveTo(xMin, yMin);
1064 state->lineTo(xMin, yMax);
1065 state->lineTo(xMax, yMax);
1066 state->lineTo(xMax, yMin);
1067 state->closePath();
1068 fill(state);
1069 state->clearPath();
1070
1071 return gTrue;
1072}
1073#endif /* CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0) */
1074
1075void CairoOutputDev::clip(GfxState *state) {
1076 doPath (cairo, state, state->getPath());
1077 cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_WINDING);
1078 cairo_clip (cairo);
1079 LOG (printf ("clip\n"));
1080 if (cairo_shape) {
1081 doPath (cairo_shape, state, state->getPath());
1082 cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_WINDING);
1083 cairo_clip (cairo_shape);
1084 }
1085}
1086
1087void CairoOutputDev::eoClip(GfxState *state) {
1088 doPath (cairo, state, state->getPath());
1089 cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_EVEN_ODD);
1090 cairo_clip (cairo);
1091 LOG (printf ("clip-eo\n"));
1092 if (cairo_shape) {
1093 doPath (cairo_shape, state, state->getPath());
1094 cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_EVEN_ODD);
1095 cairo_clip (cairo_shape);
1096 }
1097
1098}
1099
1100void CairoOutputDev::clipToStrokePath(GfxState *state) {
1101 LOG(printf("clip-to-stroke-path\n"));
1102 strokePathClip = (StrokePathClip*)gmalloc (sizeof(*strokePathClip));
1103 strokePathClip->path = state->getPath()->copy();
1104 cairo_get_matrix (cairo, &strokePathClip->ctm);
1105 strokePathClip->line_width = cairo_get_line_width (cairo);
1106 strokePathClip->dash_count = cairo_get_dash_count (cairo);
1107 if (strokePathClip->dash_count) {
1108 strokePathClip->dashes = (double*) gmallocn (sizeof(double), strokePathClip->dash_count);
1109 cairo_get_dash (cairo, strokePathClip->dashes, &strokePathClip->dash_offset);
1110 } else {
1111 strokePathClip->dashes = NULL;
1112 }
1113 strokePathClip->cap = cairo_get_line_cap (cairo);
1114 strokePathClip->join = cairo_get_line_join (cairo);
1115 strokePathClip->miter = cairo_get_miter_limit (cairo);
1116}
1117
1118void CairoOutputDev::fillToStrokePathClip(GfxState *state) {
1119 cairo_save (cairo);
1120
1121 cairo_set_matrix (cairo, &strokePathClip->ctm);
1122 cairo_set_line_width (cairo, strokePathClip->line_width);
1123 strokePathClip->dash_count = cairo_get_dash_count (cairo);
1124 cairo_set_dash (cairo, strokePathClip->dashes, strokePathClip->dash_count, strokePathClip->dash_offset);
1125 cairo_set_line_cap (cairo, strokePathClip->cap);
1126 cairo_set_line_join (cairo, strokePathClip->join);
1127 cairo_set_miter_limit (cairo, strokePathClip->miter);
1128 doPath (cairo, state, strokePathClip->path);
1129 cairo_stroke (cairo);
1130
1131 cairo_restore (cairo);
1132
1133 delete strokePathClip->path;
1134 if (strokePathClip->dashes)
1135 gfree (strokePathClip->dashes);
1136 gfree (strokePathClip);
1137 strokePathClip = NULL;
1138}
1139
1140void CairoOutputDev::beginString(GfxState *state, GooString *s)
1141{
1142 int len = s->getLength();
1143
1144 if (needFontUpdate)
1145 updateFont(state);
1146
1147 if (!currentFont)
1148 return;
1149
1150 glyphs = (cairo_glyph_t *) gmallocn (len, sizeof (cairo_glyph_t));
1151 glyphCount = 0;
1152 if (use_show_text_glyphs) {
1153 clusters = (cairo_text_cluster_t *) gmallocn (len, sizeof (cairo_text_cluster_t));
1154 clusterCount = 0;
1155 utf8Max = len*2; // start with twice the number of glyphs. we will realloc if we need more.
1156 utf8 = (char *) gmalloc (utf8Max);
1157 utf8Count = 0;
1158 }
1159}
1160
1161void CairoOutputDev::drawChar(GfxState *state, double x, double y,
1162 double dx, double dy,
1163 double originX, double originY,
1164 CharCode code, int nBytes, Unicode *u, int uLen)
1165{
1166 if (currentFont) {
1167 glyphs[glyphCount].index = currentFont->getGlyph (code, u, uLen);
1168 glyphs[glyphCount].x = x - originX;
1169 glyphs[glyphCount].y = y - originY;
1170 glyphCount++;
1171 if (use_show_text_glyphs) {
1172 if (utf8Max - utf8Count < uLen*6) {
1173 // utf8 encoded characters can be up to 6 bytes
1174 if (utf8Max > uLen*6)
1175 utf8Max *= 2;
1176 else
1177 utf8Max += 2*uLen*6;
1178 utf8 = (char *) grealloc (utf8, utf8Max);
1179 }
1180 clusters[clusterCount].num_bytes = 0;
1181 for (int i = 0; i < uLen; i++) {
1182 int size = mapUTF8 (u[i], utf8 + utf8Count, utf8Max - utf8Count);
1183 utf8Count += size;
1184 clusters[clusterCount].num_bytes += size;
1185 }
1186 clusters[clusterCount].num_glyphs = 1;
1187 clusterCount++;
1188 }
1189 }
1190
1191 if (!text)
1192 return;
1193 actualText->addChar (state, x, y, dx, dy, code, nBytes, u, uLen);
1194}
1195
1196void CairoOutputDev::endString(GfxState *state)
1197{
1198 int render;
1199
1200 if (!currentFont)
1201 return;
1202
1203 // endString can be called without a corresponding beginString. If this
1204 // happens glyphs will be null so don't draw anything, just return.
1205 // XXX: OutputDevs should probably not have to deal with this...
1206 if (!glyphs)
1207 return;
1208
1209 // ignore empty strings and invisible text -- this is used by
1210 // Acrobat Capture
1211 render = state->getRender();
1212 if (render == 3 || glyphCount == 0) {
1213 gfree(glyphs);
1214 glyphs = NULL;
1215 return;
1216 }
1217
1218 if (!(render & 1)) {
1219 LOG (printf ("fill string\n"));
1220 cairo_set_source (cairo, fill_pattern);
1221 if (use_show_text_glyphs)
1222 cairo_show_text_glyphs (cairo, utf8, utf8Count, glyphs, glyphCount, clusters, clusterCount, (cairo_text_cluster_flags_t)0);
1223 else
1224 cairo_show_glyphs (cairo, glyphs, glyphCount);
1225 if (cairo_shape)
1226 cairo_show_glyphs (cairo_shape, glyphs, glyphCount);
1227 }
1228
1229 // stroke
1230 if ((render & 3) == 1 || (render & 3) == 2) {
1231 LOG (printf ("stroke string\n"));
1232 cairo_set_source (cairo, stroke_pattern);
1233 cairo_glyph_path (cairo, glyphs, glyphCount);
1234 cairo_stroke (cairo);
1235 if (cairo_shape) {
1236 cairo_glyph_path (cairo_shape, glyphs, glyphCount);
1237 cairo_stroke (cairo_shape);
1238 }
1239 }
1240
1241 // clip
1242 if ((render & 4)) {
1243 LOG (printf ("clip string\n"));
1244 // append the glyph path to textClipPath.
1245
1246 // set textClipPath as the currentPath
1247 if (textClipPath) {
1248 cairo_append_path (cairo, textClipPath);
1249 if (cairo_shape) {
1250 cairo_append_path (cairo_shape, textClipPath);
1251 }
1252 cairo_path_destroy (textClipPath);
1253 }
1254
1255 // append the glyph path
1256 cairo_glyph_path (cairo, glyphs, glyphCount);
1257
1258 // move the path back into textClipPath
1259 // and clear the current path
1260 textClipPath = cairo_copy_path (cairo);
1261 cairo_new_path (cairo);
1262 if (cairo_shape) {
1263 cairo_new_path (cairo_shape);
1264 }
1265 }
1266
1267 gfree (glyphs);
1268 glyphs = NULL;
1269 if (use_show_text_glyphs) {
1270 gfree (clusters);
1271 clusters = NULL;
1272 gfree (utf8);
1273 utf8 = NULL;
1274 }
1275}
1276
1277
1278GBool CairoOutputDev::beginType3Char(GfxState *state, double x, double y,
1279 double dx, double dy,
1280 CharCode code, Unicode *u, int uLen) {
1281
1282 cairo_save (cairo);
1283 double *ctm;
1284 cairo_matrix_t matrix;
1285
1286 ctm = state->getCTM();
1287 matrix.xx = ctm[0];
1288 matrix.yx = ctm[1];
1289 matrix.xy = ctm[2];
1290 matrix.yy = ctm[3];
1291 matrix.x0 = ctm[4];
1292 matrix.y0 = ctm[5];
1293 /* Restore the original matrix and then transform to matrix needed for the
1294 * type3 font. This is ugly but seems to work. Perhaps there is a better way to do it?*/
1295 cairo_set_matrix(cairo, &orig_matrix);
1296 cairo_transform(cairo, &matrix);
1297 if (cairo_shape) {
1298 cairo_save (cairo_shape);
1299 cairo_set_matrix(cairo_shape, &orig_matrix);
1300 cairo_transform(cairo_shape, &matrix);
1301 }
1302 cairo_pattern_destroy(stroke_pattern);
1303 cairo_pattern_reference(fill_pattern);
1304 stroke_pattern = fill_pattern;
1305 return gFalse;
1306}
1307
1308void CairoOutputDev::endType3Char(GfxState *state) {
1309 cairo_restore (cairo);
1310 if (cairo_shape) {
1311 cairo_restore (cairo_shape);
1312 }
1313}
1314
1315void CairoOutputDev::type3D0(GfxState *state, double wx, double wy) {
1316 t3_glyph_wx = wx;
1317 t3_glyph_wy = wy;
1318}
1319
1320void CairoOutputDev::type3D1(GfxState *state, double wx, double wy,
1321 double llx, double lly, double urx, double ury) {
1322 t3_glyph_wx = wx;
1323 t3_glyph_wy = wy;
1324 t3_glyph_bbox[0] = llx;
1325 t3_glyph_bbox[1] = lly;
1326 t3_glyph_bbox[2] = urx;
1327 t3_glyph_bbox[3] = ury;
1328 t3_glyph_has_bbox = gTrue;
1329}
1330
1331void CairoOutputDev::beginTextObject(GfxState *state) {
1332}
1333
1334void CairoOutputDev::endTextObject(GfxState *state) {
1335 if (textClipPath) {
1336 // clip the accumulated text path
1337 cairo_append_path (cairo, textClipPath);
1338 cairo_clip (cairo);
1339 if (cairo_shape) {
1340 cairo_append_path (cairo_shape, textClipPath);
1341 cairo_clip (cairo_shape);
1342 }
1343 cairo_path_destroy (textClipPath);
1344 textClipPath = NULL;
1345 }
1346}
1347
1348void CairoOutputDev::beginActualText(GfxState *state, GooString *text)
1349{
1350 if (this->text)
1351 actualText->begin(state, text);
1352}
1353
1354void CairoOutputDev::endActualText(GfxState *state)
1355{
1356 if (text)
1357 actualText->end(state);
1358}
1359
1360static inline int splashRound(SplashCoord x) {
1361 return (int)floor(x + 0.5);
1362}
1363
1364static inline int splashCeil(SplashCoord x) {
1365 return (int)ceil(x);
1366}
1367
1368static inline int splashFloor(SplashCoord x) {
1369 return (int)floor(x);
1370}
1371
1372static
1373cairo_surface_t *cairo_surface_create_similar_clip (cairo_t *cairo, cairo_content_t content)
1374{
1375 double x1, y1, x2, y2;
1376 int width, height;
1377 cairo_clip_extents (cairo, &x1, &y1, &x2, &y2);
1378 cairo_matrix_t matrix;
1379 cairo_get_matrix (cairo, &matrix);
1380 //cairo_matrix_transform_point(&matrix, &x1, &y1);
1381 //cairo_matrix_transform_point(&matrix, &x2, &y2);*/
1382 cairo_user_to_device(cairo, &x1, &y1);
1383 cairo_user_to_device(cairo, &x2, &y2);
1384 width = splashCeil(x2) - splashFloor(x1);
1385 //XXX: negative matrix
1386 ////height = splashCeil(y2) - splashFloor(y1);
1387 height = splashFloor(y1) - splashCeil(y2);
1388 cairo_surface_t *target = cairo_get_target (cairo);
1389 cairo_surface_t *result;
1390
1391 result = cairo_surface_create_similar (target, content, width, height);
1392 double x_offset, y_offset;
1393 cairo_surface_get_device_offset(target, &x_offset, &y_offset);
1394 cairo_surface_set_device_offset(result, x_offset, y_offset);
1395
1396
1397 return result;
1398}
1399
1400
1401
1402void CairoOutputDev::beginTransparencyGroup(GfxState * /*state*/, double * /*bbox*/,
1403 GfxColorSpace * blendingColorSpace,
1404 GBool /*isolated*/, GBool knockout,
1405 GBool forSoftMask) {
1406 /* push color space */
1407 ColorSpaceStack* css = new ColorSpaceStack;
1408 css->cs = blendingColorSpace;
1409 css->knockout = knockout;
1410 cairo_get_matrix(cairo, &css->group_matrix);
1411 css->next = groupColorSpaceStack;
1412 groupColorSpaceStack = css;
1413
1414 LOG(printf ("begin transparency group. knockout: %s\n", knockout ? "yes":"no"));
1415
1416 if (knockout) {
1417 knockoutCount++;
1418 if (!cairo_shape) {
1419 /* create a surface for tracking the shape */
1420 cairo_surface_t *cairo_shape_surface = cairo_surface_create_similar_clip (cairo, CAIRO_CONTENT_ALPHA);
1421 cairo_shape = cairo_create (cairo_shape_surface);
1422 cairo_surface_destroy (cairo_shape_surface);
1423
1424 /* the color doesn't matter as long as it is opaque */
1425 cairo_set_source_rgb (cairo_shape, 0, 0, 0);
1426 cairo_matrix_t matrix;
1427 cairo_get_matrix (cairo, &matrix);
1428 //printMatrix(&matrix);
1429 cairo_set_matrix (cairo_shape, &matrix);
1430 } else {
1431 cairo_reference (cairo_shape);
1432 }
1433 }
1434 if (groupColorSpaceStack->next && groupColorSpaceStack->next->knockout) {
1435 /* we need to track the shape */
1436 cairo_push_group (cairo_shape);
1437 }
1438 if (0 && forSoftMask)
1439 cairo_push_group_with_content (cairo, CAIRO_CONTENT_ALPHA);
1440 else
1441 cairo_push_group (cairo);
1442
1443 /* push_group has an implicit cairo_save() */
1444 if (knockout) {
1445 /*XXX: let's hope this matches the semantics needed */
1446 cairo_set_operator(cairo, CAIRO_OPERATOR_SOURCE);
1447 } else {
1448 cairo_set_operator(cairo, CAIRO_OPERATOR_OVER);
1449 }
1450}
1451
1452void CairoOutputDev::endTransparencyGroup(GfxState * /*state*/) {
1453 if (group)
1454 cairo_pattern_destroy(group);
1455 group = cairo_pop_group (cairo);
1456
1457 LOG(printf ("end transparency group\n"));
1458
1459 if (groupColorSpaceStack->next && groupColorSpaceStack->next->knockout) {
1460 if (shape)
1461 cairo_pattern_destroy(shape);
1462 shape = cairo_pop_group (cairo_shape);
1463 }
1464}
1465
1466void CairoOutputDev::paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/) {
1467 LOG(printf ("paint transparency group\n"));
1468
1469 cairo_save (cairo);
1470 cairo_set_matrix (cairo, &groupColorSpaceStack->group_matrix);
1471 cairo_set_source (cairo, group);
1472
1473 if (!mask) {
1474 //XXX: deal with mask && shape case
1475 if (shape) {
1476 cairo_save (cairo);
1477
1478 /* OPERATOR_SOURCE w/ a mask is defined as (src IN mask) ADD (dest OUT mask)
1479 * however our source has already been clipped to mask so we only need to
1480 * do ADD and OUT */
1481
1482 /* clear the shape mask */
1483 cairo_set_source (cairo, shape);
1484 cairo_set_operator (cairo, CAIRO_OPERATOR_DEST_OUT);
1485 cairo_paint (cairo);
1486
1487 cairo_set_operator (cairo, CAIRO_OPERATOR_ADD);
1488 cairo_set_source (cairo, group);
1489 cairo_paint (cairo);
1490
1491 cairo_restore (cairo);
1492
1493 cairo_pattern_destroy (shape);
1494 shape = NULL;
1495 } else {
1496 cairo_paint_with_alpha (cairo, fill_opacity);
1497 }
1498 cairo_status_t status = cairo_status(cairo);
1499 if (status)
1500 printf("BAD status: %s\n", cairo_status_to_string(status));
1501 } else {
1502 if (fill_opacity < 1.0) {
1503 cairo_push_group(cairo);
1504 }
1505 cairo_save(cairo);
1506 cairo_set_matrix(cairo, &mask_matrix);
1507 cairo_mask(cairo, mask);
1508 cairo_restore(cairo);
1509 if (fill_opacity < 1.0) {
1510 cairo_pop_group_to_source(cairo);
1511 cairo_paint_with_alpha (cairo, fill_opacity);
1512 }
1513 cairo_pattern_destroy(mask);
1514 mask = NULL;
1515 }
1516
1517 popTransparencyGroup();
1518 cairo_restore(cairo);
1519}
1520
1521static int luminocity(uint32_t x)
1522{
1523 int r = (x >> 16) & 0xff;
1524 int g = (x >> 8) & 0xff;
1525 int b = (x >> 0) & 0xff;
1526 // an arbitrary integer approximation of .3*r + .59*g + .11*b
1527 int y = (r*19661+g*38666+b*7209 + 32829)>>16;
1528 return y;
1529}
1530
1531
1532/* XXX: do we need to deal with shape here? */
1533void CairoOutputDev::setSoftMask(GfxState * state, double * bbox, GBool alpha,
1534 Function * transferFunc, GfxColor * backdropColor) {
1535 cairo_pattern_destroy(mask);
1536
1537 LOG(printf ("set softMask\n"));
1538
1539 if (alpha == false) {
1540 /* We need to mask according to the luminocity of the group.
1541 * So we paint the group to an image surface convert it to a luminocity map
1542 * and then use that as the mask. */
1543
1544 /* Get clip extents in device space */
1545 double x1, y1, x2, y2, x_min, y_min, x_max, y_max;
1546 cairo_clip_extents(cairo, &x1, &y1, &x2, &y2);
1547 cairo_user_to_device(cairo, &x1, &y1);
1548 cairo_user_to_device(cairo, &x2, &y2);
1549 x_min = MIN(x1, x2);
1550 y_min = MIN(y1, y2);
1551 x_max = MAX(x1, x2);
1552 y_max = MAX(y1, y2);
1553 cairo_clip_extents(cairo, &x1, &y1, &x2, &y2);
1554 cairo_user_to_device(cairo, &x1, &y2);
1555 cairo_user_to_device(cairo, &x2, &y1);
1556 x_min = MIN(x_min,MIN(x1, x2));
1557 y_min = MIN(y_min,MIN(y1, y2));
1558 x_max = MAX(x_max,MAX(x1, x2));
1559 y_max = MAX(y_max,MAX(y1, y2));
1560
1561 int width = (int)(ceil(x_max) - floor(x_min));
1562 int height = (int)(ceil(y_max) - floor(y_min));
1563
1564 /* Get group device offset */
1565 double x_offset, y_offset;
1566 if (cairo_get_group_target(cairo) == cairo_get_target(cairo)) {
1567 cairo_surface_get_device_offset(cairo_get_group_target(cairo), &x_offset, &y_offset);
1568 } else {
1569 cairo_surface_t *pats;
1570 cairo_pattern_get_surface(group, &pats);
1571 cairo_surface_get_device_offset(pats, &x_offset, &y_offset);
1572 }
1573
1574 /* Adjust extents by group offset */
1575 x_min += x_offset;
1576 y_min += y_offset;
1577
1578 cairo_surface_t *source = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height);
1579 cairo_t *maskCtx = cairo_create(source);
1580
1581 //XXX: hopefully this uses the correct color space */
1582 GfxRGB backdropColorRGB;
1583 groupColorSpaceStack->cs->getRGB(backdropColor, &backdropColorRGB);
1584 /* paint the backdrop */
1585 cairo_set_source_rgb(maskCtx,
1586 colToDbl(backdropColorRGB.r),
1587 colToDbl(backdropColorRGB.g),
1588 colToDbl(backdropColorRGB.b));
1589 cairo_paint(maskCtx);
1590
1591 /* Copy source ctm to mask ctm and translate origin so that the
1592 * mask appears it the same location on the source surface. */
1593 cairo_matrix_t mat, tmat;
1594 cairo_matrix_init_translate(&tmat, -x_min, -y_min);
1595 cairo_get_matrix(cairo, &mat);
1596 cairo_matrix_multiply(&mat, &mat, &tmat);
1597 cairo_set_matrix(maskCtx, &mat);
1598
1599 /* make the device offset of the new mask match that of the group */
1600 cairo_surface_set_device_offset(source, x_offset, y_offset);
1601
1602 /* paint the group */
1603 cairo_set_source(maskCtx, group);
1604 cairo_paint(maskCtx);
1605
1606 /* XXX status = cairo_status(maskCtx); */
1607 cairo_destroy(maskCtx);
1608
1609 /* convert to a luminocity map */
1610 uint32_t *source_data = (uint32_t*)cairo_image_surface_get_data(source);
1611 /* get stride in units of 32 bits */
1612 int stride = cairo_image_surface_get_stride(source)/4;
1613 for (int y=0; y<height; y++) {
1614 for (int x=0; x<width; x++) {
1615 int lum;
1616 lum = luminocity(source_data[y*stride + x]);
1617 if (transferFunc) {
1618 double lum_in, lum_out;
1619 lum_in = lum/256.0;
1620 transferFunc->transform(&lum_in, &lum_out);
1621 lum = (int)(lum_out * 255.0 + 0.5);
1622 }
1623 source_data[y*stride + x] = lum << 24;
1624 }
1625 }
1626 cairo_surface_mark_dirty (source);
1627
1628 /* setup the new mask pattern */
1629 mask = cairo_pattern_create_for_surface(source);
1630 cairo_get_matrix(cairo, &mask_matrix);
1631
1632 if (cairo_get_group_target(cairo) == cairo_get_target(cairo)) {
1633 cairo_pattern_set_matrix(mask, &mat);
1634 } else {
1635 cairo_matrix_t patMatrix;
1636 cairo_pattern_get_matrix(group, &patMatrix);
1637 /* Apply x_min, y_min offset to it appears in the same location as source. */
1638 cairo_matrix_multiply(&patMatrix, &patMatrix, &tmat);
1639 cairo_pattern_set_matrix(mask, &patMatrix);
1640 }
1641
1642 cairo_surface_destroy(source);
1643 } else {
1644 mask = cairo_pattern_reference(group);
1645 cairo_get_matrix(cairo, &mask_matrix);
1646 }
1647
1648 popTransparencyGroup();
1649}
1650
1651void CairoOutputDev::popTransparencyGroup() {
1652 /* pop color space */
1653 ColorSpaceStack *css = groupColorSpaceStack;
1654 if (css->knockout) {
1655 knockoutCount--;
1656 if (!knockoutCount) {
1657 /* we don't need to track the shape anymore because
1658 * we are not above any knockout groups */
1659 cairo_destroy(cairo_shape);
1660 cairo_shape = NULL;
1661 }
1662 }
1663 groupColorSpaceStack = css->next;
1664 delete css;
1665}
1666
1667
1668void CairoOutputDev::clearSoftMask(GfxState * /*state*/) {
1669 if (mask)
1670 cairo_pattern_destroy(mask);
1671 mask = NULL;
1672}
1673
1674/* Taken from cairo/doc/tutorial/src/singular.c */
1675static void
1676get_singular_values (const cairo_matrix_t *matrix,
1677 double *major,
1678 double *minor)
1679{
1680 double xx = matrix->xx, xy = matrix->xy;
1681 double yx = matrix->yx, yy = matrix->yy;
1682
1683 double a = xx*xx+yx*yx;
1684 double b = xy*xy+yy*yy;
1685 double k = xx*xy+yx*yy;
1686
1687 double f = (a+b) * .5;
1688 double g = (a-b) * .5;
1689 double delta = sqrt (g*g + k*k);
1690
1691 if (major)
1692 *major = sqrt (f + delta);
1693 if (minor)
1694 *minor = sqrt (f - delta);
1695}
1696
1697void CairoOutputDev::getScaledSize(int orig_width,
1698 int orig_height,
1699 int *scaledWidth,
1700 int *scaledHeight) {
1701 cairo_matrix_t matrix;
1702 cairo_get_matrix(cairo, &matrix);
1703
1704 double xScale;
1705 double yScale;
1706 if (orig_width > orig_height)
1707 get_singular_values (&matrix, &xScale, &yScale);
1708 else
1709 get_singular_values (&matrix, &yScale, &xScale);
1710
1711 int tx, tx2, ty, ty2; /* the integer co-oridinates of the resulting image */
1712 if (xScale >= 0) {
1713 tx = splashRound(matrix.x0 - 0.01);
1714 tx2 = splashRound(matrix.x0 + xScale + 0.01) - 1;
1715 } else {
1716 tx = splashRound(matrix.x0 + 0.01) - 1;
1717 tx2 = splashRound(matrix.x0 + xScale - 0.01);
1718 }
1719 *scaledWidth = abs(tx2 - tx) + 1;
1720 //scaledWidth = splashRound(fabs(xScale));
1721 if (*scaledWidth == 0) {
1722 // technically, this should draw nothing, but it generally seems
1723 // better to draw a one-pixel-wide stripe rather than throwing it
1724 // away
1725 *scaledWidth = 1;
1726 }
1727 if (yScale >= 0) {
1728 ty = splashFloor(matrix.y0 + 0.01);
1729 ty2 = splashCeil(matrix.y0 + yScale - 0.01);
1730 } else {
1731 ty = splashCeil(matrix.y0 - 0.01);
1732 ty2 = splashFloor(matrix.y0 + yScale + 0.01);
1733 }
1734 *scaledHeight = abs(ty2 - ty);
1735 if (*scaledHeight == 0) {
1736 *scaledHeight = 1;
1737 }
1738}
1739
1740cairo_surface_t *CairoOutputDev::downscaleSurface(cairo_surface_t *orig_surface) {
1741 cairo_surface_t *dest_surface;
1742 unsigned char *dest_buffer;
1743 int dest_stride;
1744 unsigned char *orig_buffer;
1745 int orig_width, orig_height;
1746 int orig_stride;
1747 int scaledHeight;
1748 int scaledWidth;
1749 GBool res;
1750
1751 if (printing)
1752 return NULL;
1753
1754 orig_width = cairo_image_surface_get_width (orig_surface);
1755 orig_height = cairo_image_surface_get_height (orig_surface);
1756 getScaledSize (orig_width, orig_height, &scaledWidth, &scaledHeight);
1757 if (scaledWidth >= orig_width || scaledHeight >= orig_height)
1758 return NULL;
1759
1760 dest_surface = cairo_surface_create_similar (orig_surface,
1761 cairo_surface_get_content (orig_surface),
1762 scaledWidth, scaledHeight);
1763 dest_buffer = cairo_image_surface_get_data (dest_surface);
1764 dest_stride = cairo_image_surface_get_stride (dest_surface);
1765
1766 orig_buffer = cairo_image_surface_get_data (orig_surface);
1767 orig_stride = cairo_image_surface_get_stride (orig_surface);
1768
1769 res = downscale_box_filter((uint32_t *)orig_buffer,
1770 orig_stride, orig_width, orig_height,
1771 scaledWidth, scaledHeight, 0, 0,
1772 scaledWidth, scaledHeight,
1773 (uint32_t *)dest_buffer, dest_stride);
1774 if (!res) {
1775 cairo_surface_destroy (dest_surface);
1776 return NULL;
1777 }
1778
1779 return dest_surface;
1780
1781}
1782
1783cairo_filter_t
1784CairoOutputDev::getFilterForSurface(cairo_surface_t *image,
1785 GBool interpolate)
1786{
1787 if (interpolate)
1788 return CAIRO_FILTER_BILINEAR;
1789
1790 int orig_width = cairo_image_surface_get_width (image);
1791 int orig_height = cairo_image_surface_get_height (image);
1792 if (orig_width == 0 || orig_height == 0)
1793 return CAIRO_FILTER_NEAREST;
1794
1795 int scaled_width, scaled_height;
1796 getScaledSize (orig_width, orig_height, &scaled_width, &scaled_height);
1797
1798 /* When scale factor is >= 400% we don't interpolate. See bugs #25268, #9860 */
1799 if (scaled_width / orig_width >= 4 || scaled_height / orig_height >= 4)
1800 return CAIRO_FILTER_NEAREST;
1801
1802 return CAIRO_FILTER_BILINEAR;
1803}
1804
1805void CairoOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
1806 int width, int height, GBool invert,
1807 GBool interpolate, GBool inlineImg) {
1808
1809 /* FIXME: Doesn't the image mask support any colorspace? */
1810 cairo_set_source (cairo, fill_pattern);
1811
1812 /* work around a cairo bug when scaling 1x1 surfaces */
1813 if (width == 1 && height == 1) {
1814 ImageStream *imgStr;
1815 Guchar pix;
1816 int invert_bit;
1817
1818 imgStr = new ImageStream(str, width, 1, 1);
1819 imgStr->reset();
1820 imgStr->getPixel(&pix);
1821 imgStr->close();
1822 delete imgStr;
1823
1824 invert_bit = invert ? 1 : 0;
1825 if (pix ^ invert_bit)
1826 return;
1827
1828 cairo_save (cairo);
1829 cairo_rectangle (cairo, 0., 0., width, height);
1830 cairo_fill (cairo);
1831 cairo_restore (cairo);
1832 if (cairo_shape) {
1833 cairo_save (cairo_shape);
1834 cairo_rectangle (cairo_shape, 0., 0., width, height);
1835 cairo_fill (cairo_shape);
1836 cairo_restore (cairo_shape);
1837 }
1838 return;
1839 }
1840
1841 /* shape is 1.0 for painted areas, 0.0 for unpainted ones */
1842
1843 cairo_matrix_t matrix;
1844 cairo_get_matrix (cairo, &matrix);
1845 //XXX: it is possible that we should only do sub pixel positioning if
1846 // we are rendering fonts */
1847 if (!printing && prescaleImages
1848 /* not rotated */
1849 && matrix.xy == 0 && matrix.yx == 0
1850 /* axes not flipped / not 180 deg rotated */
1851 && matrix.xx > 0 && (upsideDown() ? -1 : 1) * matrix.yy > 0) {
1852 drawImageMaskPrescaled(state, ref, str, width, height, invert, interpolate, inlineImg);
1853 } else {
1854 drawImageMaskRegular(state, ref, str, width, height, invert, interpolate, inlineImg);
1855 }
1856
1857}
1858
1859void CairoOutputDev::setSoftMaskFromImageMask(GfxState *state, Object *ref, Stream *str,
1860 int width, int height, GBool invert,
1861 GBool inlineImg, double *baseMatrix) {
1862
1863 /* FIXME: Doesn't the image mask support any colorspace? */
1864 cairo_set_source (cairo, fill_pattern);
1865
1866 /* work around a cairo bug when scaling 1x1 surfaces */
1867 if (width == 1 && height == 1) {
1868 ImageStream *imgStr;
1869 Guchar pix;
1870 int invert_bit;
1871
1872 imgStr = new ImageStream(str, width, 1, 1);
1873 imgStr->reset();
1874 imgStr->getPixel(&pix);
1875 imgStr->close();
1876 delete imgStr;
1877
1878 invert_bit = invert ? 1 : 0;
1879 if (pix ^ invert_bit)
1880 return;
1881
1882 cairo_save (cairo);
1883 cairo_rectangle (cairo, 0., 0., width, height);
1884 cairo_fill (cairo);
1885 cairo_restore (cairo);
1886 if (cairo_shape) {
1887 cairo_save (cairo_shape);
1888 cairo_rectangle (cairo_shape, 0., 0., width, height);
1889 cairo_fill (cairo_shape);
1890 cairo_restore (cairo_shape);
1891 }
1892 return;
1893 }
1894
1895 cairo_push_group_with_content (cairo, CAIRO_CONTENT_ALPHA);
1896
1897 /* shape is 1.0 for painted areas, 0.0 for unpainted ones */
1898
1899 cairo_matrix_t matrix;
1900 cairo_get_matrix (cairo, &matrix);
1901 //XXX: it is possible that we should only do sub pixel positioning if
1902 // we are rendering fonts */
1903 if (!printing && prescaleImages && matrix.xy == 0.0 && matrix.yx == 0.0) {
1904 drawImageMaskPrescaled(state, ref, str, width, height, invert, gFalse, inlineImg);
1905 } else {
1906 drawImageMaskRegular(state, ref, str, width, height, invert, gFalse, inlineImg);
1907 }
1908
1909 if (state->getFillColorSpace()->getMode() == csPattern) {
1910 cairo_set_source_rgb (cairo, 1, 1, 1);
1911 cairo_set_matrix (cairo, &mask_matrix);
1912 cairo_mask (cairo, mask);
1913 }
1914
1915 if (mask)
1916 cairo_pattern_destroy (mask);
1917 mask = cairo_pop_group (cairo);
1918
1919 saveState(state);
1920 double bbox[4] = {0,0,1,1}; // dummy
1921 beginTransparencyGroup(state, bbox, state->getFillColorSpace(),
1922 gTrue, gFalse, gFalse);
1923}
1924
1925void CairoOutputDev::unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) {
1926 double bbox[4] = {0,0,1,1}; // dummy
1927
1928 endTransparencyGroup(state);
1929 restoreState(state);
1930 paintTransparencyGroup(state, bbox);
1931 clearSoftMask(state);
1932}
1933
1934void CairoOutputDev::drawImageMaskRegular(GfxState *state, Object *ref, Stream *str,
1935 int width, int height, GBool invert,
1936 GBool interpolate, GBool inlineImg) {
1937 unsigned char *buffer;
1938 unsigned char *dest;
1939 cairo_surface_t *image;
1940 cairo_pattern_t *pattern;
1941 int x, y, i, bit;
1942 ImageStream *imgStr;
1943 Guchar *pix;
1944 cairo_matrix_t matrix;
1945 int invert_bit;
1946 int row_stride;
1947 cairo_filter_t filter;
1948
1949 /* TODO: Do we want to cache these? */
1950 imgStr = new ImageStream(str, width, 1, 1);
1951 imgStr->reset();
1952
1953 image = cairo_image_surface_create (CAIRO_FORMAT_A1, width, height);
1954 if (cairo_surface_status (image))
1955 goto cleanup;
1956
1957 buffer = cairo_image_surface_get_data (image);
1958 row_stride = cairo_image_surface_get_stride (image);
1959
1960 invert_bit = invert ? 1 : 0;
1961
1962 for (y = 0; y < height; y++) {
1963 pix = imgStr->getLine();
1964 dest = buffer + y * row_stride;
1965 i = 0;
1966 bit = 0;
1967 for (x = 0; x < width; x++) {
1968 if (bit == 0)
1969 dest[i] = 0;
1970 if (!(pix[x] ^ invert_bit)) {
1971#ifdef WORDS_BIGENDIAN
1972 dest[i] |= (1 << (7 - bit));
1973#else
1974 dest[i] |= (1 << bit);
1975#endif
1976 }
1977 bit++;
1978 if (bit > 7) {
1979 bit = 0;
1980 i++;
1981 }
1982 }
1983 }
1984
1985 filter = getFilterForSurface (image, interpolate);
1986
1987 cairo_surface_mark_dirty (image);
1988 pattern = cairo_pattern_create_for_surface (image);
1989 cairo_surface_destroy (image);
1990 if (cairo_pattern_status (pattern))
1991 goto cleanup;
1992
1993 LOG (printf ("drawImageMask %dx%d\n", width, height));
1994
1995 cairo_pattern_set_filter (pattern, filter);
1996
1997 if (!printing)
1998 cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD);
1999
2000 cairo_matrix_init_translate (&matrix, 0, height);
2001 cairo_matrix_scale (&matrix, width, -height);
2002 cairo_pattern_set_matrix (pattern, &matrix);
2003 if (cairo_pattern_status (pattern)) {
2004 cairo_pattern_destroy (pattern);
2005 goto cleanup;
2006 }
2007
2008 if (state->getFillColorSpace()->getMode() == csPattern) {
2009 mask = cairo_pattern_reference (pattern);
2010 cairo_get_matrix (cairo, &mask_matrix);
2011 } else if (!printing) {
2012 cairo_save (cairo);
2013 cairo_rectangle (cairo, 0., 0., 1., 1.);
2014 cairo_clip (cairo);
2015 cairo_mask (cairo, pattern);
2016 cairo_restore (cairo);
2017 } else {
2018 cairo_mask (cairo, pattern);
2019 }
2020
2021 if (cairo_shape) {
2022 cairo_save (cairo_shape);
2023 cairo_set_source (cairo_shape, pattern);
2024 if (!printing) {
2025 cairo_rectangle (cairo_shape, 0., 0., 1., 1.);
2026 cairo_fill (cairo_shape);
2027 } else {
2028 cairo_mask (cairo_shape, pattern);
2029 }
2030 cairo_restore (cairo_shape);
2031 }
2032
2033 cairo_pattern_destroy (pattern);
2034
2035cleanup:
2036 imgStr->close();
2037 delete imgStr;
2038}
2039
2040
2041void CairoOutputDev::drawImageMaskPrescaled(GfxState *state, Object *ref, Stream *str,
2042 int width, int height, GBool invert,
2043 GBool interpolate, GBool inlineImg) {
2044 unsigned char *buffer;
2045 cairo_surface_t *image;
2046 cairo_pattern_t *pattern;
2047 ImageStream *imgStr;
2048 Guchar *pix;
2049 cairo_matrix_t matrix;
2050 int invert_bit;
2051 int row_stride;
2052
2053 /* cairo does a very poor job of scaling down images so we scale them ourselves */
2054
2055 LOG (printf ("drawImageMaskPrescaled %dx%d\n", width, height));
2056
2057 /* this scaling code is adopted from the splash image scaling code */
2058 cairo_get_matrix(cairo, &matrix);
2059#if 0
2060 printf("[%f %f], [%f %f], %f %f\n", matrix.xx, matrix.xy, matrix.yx, matrix.yy, matrix.x0, matrix.y0);
2061#endif
2062 /* this whole computation should be factored out */
2063 double xScale = matrix.xx;
2064 double yScale = matrix.yy;
2065 int tx, tx2, ty, ty2; /* the integer co-oridinates of the resulting image */
2066 int scaledHeight;
2067 int scaledWidth;
2068 if (xScale >= 0) {
2069 tx = splashRound(matrix.x0 - 0.01);
2070 tx2 = splashRound(matrix.x0 + xScale + 0.01) - 1;
2071 } else {
2072 tx = splashRound(matrix.x0 + 0.01) - 1;
2073 tx2 = splashRound(matrix.x0 + xScale - 0.01);
2074 }
2075 scaledWidth = abs(tx2 - tx) + 1;
2076 //scaledWidth = splashRound(fabs(xScale));
2077 if (scaledWidth == 0) {
2078 // technically, this should draw nothing, but it generally seems
2079 // better to draw a one-pixel-wide stripe rather than throwing it
2080 // away
2081 scaledWidth = 1;
2082 }
2083 if (yScale >= 0) {
2084 ty = splashFloor(matrix.y0 + 0.01);
2085 ty2 = splashCeil(matrix.y0 + yScale - 0.01);
2086 } else {
2087 ty = splashCeil(matrix.y0 - 0.01);
2088 ty2 = splashFloor(matrix.y0 + yScale + 0.01);
2089 }
2090 scaledHeight = abs(ty2 - ty);
2091 if (scaledHeight == 0) {
2092 scaledHeight = 1;
2093 }
2094#if 0
2095 printf("xscale: %g, yscale: %g\n", xScale, yScale);
2096 printf("width: %d, height: %d\n", width, height);
2097 printf("scaledWidth: %d, scaledHeight: %d\n", scaledWidth, scaledHeight);
2098#endif
2099
2100 /* compute the required padding */
2101 /* Padding is used to preserve the aspect ratio.
2102 We compute total_pad to make (height+total_pad)/scaledHeight as close to height/yScale as possible */
2103 int head_pad = 0;
2104 int tail_pad = 0;
2105 int total_pad = splashRound(height*(scaledHeight/fabs(yScale)) - height);
2106
2107 /* compute the two pieces of padding */
2108 if (total_pad > 0) {
2109 //XXX: i'm not positive fabs() is correct
2110 float tail_error = fabs(matrix.y0 - ty);
2111 float head_error = fabs(ty2 - (matrix.y0 + yScale));
2112 float tail_fraction = tail_error/(tail_error + head_error);
2113 tail_pad = splashRound(total_pad*tail_fraction);
2114 head_pad = total_pad - tail_pad;
2115 } else {
2116 tail_pad = 0;
2117 head_pad = 0;
2118 }
2119 int origHeight = height;
2120 height += tail_pad;
2121 height += head_pad;
2122#if 0
2123 printf("head_pad: %d tail_pad: %d\n", head_pad, tail_pad);
2124 printf("origHeight: %d height: %d\n", origHeight, height);
2125 printf("ty: %d, ty2: %d\n", ty, ty2);
2126#endif
2127
2128 /* TODO: Do we want to cache these? */
2129 imgStr = new ImageStream(str, width, 1, 1);
2130 imgStr->reset();
2131
2132 invert_bit = invert ? 1 : 0;
2133
2134 image = cairo_image_surface_create (CAIRO_FORMAT_A8, scaledWidth, scaledHeight);
2135 if (cairo_surface_status (image)) {
2136 imgStr->close();
2137 delete imgStr;
2138 return;
2139 }
2140
2141 buffer = cairo_image_surface_get_data (image);
2142 row_stride = cairo_image_surface_get_stride (image);
2143
2144 int yp = height / scaledHeight;
2145 int yq = height % scaledHeight;
2146 int xp = width / scaledWidth;
2147 int xq = width % scaledWidth;
2148 int yt = 0;
2149 int origHeight_c = origHeight;
2150 /* use MIN() because yp might be > origHeight because of padding */
2151 unsigned char *pixBuf = (unsigned char *)malloc(MIN(yp+1, origHeight)*width);
2152 int lastYStep = 1;
2153 int total = 0;
2154 for (int y = 0; y < scaledHeight; y++) {
2155 // y scale Bresenham
2156 int yStep = yp;
2157 yt += yq;
2158
2159 if (yt >= scaledHeight) {
2160 yt -= scaledHeight;
2161 ++yStep;
2162 }
2163
2164 // read row (s) from image ignoring the padding as appropriate
2165 {
2166 int n = (yp > 0) ? yStep : lastYStep;
2167 total += n;
2168 if (n > 0) {
2169 unsigned char *p = pixBuf;
2170 int head_pad_count = head_pad;
2171 int origHeight_count = origHeight;
2172 int tail_pad_count = tail_pad;
2173 for (int i=0; i<n; i++) {
2174 // get row
2175 if (head_pad_count) {
2176 head_pad_count--;
2177 } else if (origHeight_count) {
2178 pix = imgStr->getLine();
2179 for (int j=0; j<width; j++) {
2180 if (pix[j] ^ invert_bit)
2181 p[j] = 0;
2182 else
2183 p[j] = 255;
2184 }
2185 origHeight_count--;
2186 p += width;
2187 } else if (tail_pad_count) {
2188 tail_pad_count--;
2189 } else {
2190 printf("%d %d\n", n, total);
2191 assert(0 && "over run\n");
2192 }
2193 }
2194 }
2195 }
2196
2197 lastYStep = yStep;
2198 int k1 = y;
2199
2200 int xt = 0;
2201 int xSrc = 0;
2202 int x1 = k1;
2203 int n = yStep > 0 ? yStep : 1;
2204 int origN = n;
2205
2206 /* compute the size of padding and pixels that will be used for this row */
2207 int head_pad_size = MIN(n, head_pad);
2208 n -= head_pad_size;
2209 head_pad -= MIN(head_pad_size, yStep);
2210
2211 int pix_size = MIN(n, origHeight);
2212 n -= pix_size;
2213 origHeight -= MIN(pix_size, yStep);
2214
2215 int tail_pad_size = MIN(n, tail_pad);
2216 n -= tail_pad_size;
2217 tail_pad -= MIN(tail_pad_size, yStep);
2218 if (n != 0) {
2219 printf("n = %d (%d %d %d)\n", n, head_pad_size, pix_size, tail_pad_size);
2220 assert(n == 0);
2221 }
2222
2223 for (int x = 0; x < scaledWidth; ++x) {
2224 int xStep = xp;
2225 xt += xq;
2226 if (xt >= scaledWidth) {
2227 xt -= scaledWidth;
2228 ++xStep;
2229 }
2230 int m = xStep > 0 ? xStep : 1;
2231 float pixAcc0 = 0;
2232 /* could m * head_pad_size * tail_pad_size overflow? */
2233 if (invert_bit) {
2234 pixAcc0 += m * head_pad_size * tail_pad_size * 255;
2235 } else {
2236 pixAcc0 += m * head_pad_size * tail_pad_size * 0;
2237 }
2238 /* Accumulate all of the source pixels for the destination pixel */
2239 for (int i = 0; i < pix_size; ++i) {
2240 for (int j = 0; j< m; ++j) {
2241 if (xSrc + i*width + j > MIN(yp + 1, origHeight_c)*width) {
2242 printf("%d > %d (%d %d %d %d) (%d %d %d)\n", xSrc + i*width + j, MIN(yp + 1, origHeight_c)*width, xSrc, i , width, j, yp, origHeight_c, width);
2243 printf("%d %d %d\n", head_pad_size, pix_size, tail_pad_size);
2244 assert(0 && "bad access\n");
2245 }
2246 pixAcc0 += pixBuf[xSrc + i*width + j];
2247 }
2248 }
2249 buffer[y * row_stride + x] = splashFloor(pixAcc0 / (origN*m));
2250 xSrc += xStep;
2251 x1 += 1;
2252 }
2253
2254 }
2255 free(pixBuf);
2256
2257 cairo_surface_mark_dirty (image);
2258 pattern = cairo_pattern_create_for_surface (image);
2259 cairo_surface_destroy (image);
2260 if (cairo_pattern_status (pattern)) {
2261 imgStr->close();
2262 delete imgStr;
2263 return;
2264 }
2265
2266 /* we should actually be using CAIRO_FILTER_NEAREST here. However,
2267 * cairo doesn't yet do minifaction filtering causing scaled down
2268 * images with CAIRO_FILTER_NEAREST to look really bad */
2269 cairo_pattern_set_filter (pattern,
2270 interpolate ? CAIRO_FILTER_BEST : CAIRO_FILTER_FAST);
2271 cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD);
2272
2273 if (state->getFillColorSpace()->getMode() == csPattern) {
2274 cairo_matrix_init_translate (&matrix, 0, scaledHeight);
2275 cairo_matrix_scale (&matrix, scaledWidth, -scaledHeight);
2276 cairo_pattern_set_matrix (pattern, &matrix);
2277 if (cairo_pattern_status (pattern)) {
2278 cairo_pattern_destroy (pattern);
2279 imgStr->close();
2280 delete imgStr;
2281 return;
2282 }
2283
2284 mask = cairo_pattern_reference (pattern);
2285 cairo_get_matrix (cairo, &mask_matrix);
2286 } else {
2287 cairo_save (cairo);
2288
2289 /* modify our current transformation so that the prescaled image
2290 * goes where it is supposed to */
2291 cairo_get_matrix(cairo, &matrix);
2292 cairo_scale(cairo, 1.0/matrix.xx, 1.0/matrix.yy);
2293 // get integer co-ords
2294 cairo_translate (cairo, tx - matrix.x0, ty2 - matrix.y0);
2295 if (yScale > 0)
2296 cairo_scale(cairo, 1, -1);
2297
2298 cairo_rectangle (cairo, 0., 0., scaledWidth, scaledHeight);
2299 cairo_clip (cairo);
2300 cairo_mask (cairo, pattern);
2301
2302 //cairo_get_matrix(cairo, &matrix);
2303 //printf("mask at: [%f %f], [%f %f], %f %f\n\n", matrix.xx, matrix.xy, matrix.yx, matrix.yy, matrix.x0, matrix.y0);
2304 cairo_restore(cairo);
2305 }
2306
2307 if (cairo_shape) {
2308 cairo_save (cairo_shape);
2309
2310 /* modify our current transformation so that the prescaled image
2311 * goes where it is supposed to */
2312 cairo_get_matrix(cairo_shape, &matrix);
2313 cairo_scale(cairo_shape, 1.0/matrix.xx, 1.0/matrix.yy);
2314 // get integer co-ords
2315 cairo_translate (cairo_shape, tx - matrix.x0, ty2 - matrix.y0);
2316 if (yScale > 0)
2317 cairo_scale(cairo_shape, 1, -1);
2318
2319 cairo_rectangle (cairo_shape, 0., 0., scaledWidth, scaledHeight);
2320 cairo_fill (cairo_shape);
2321
2322 cairo_restore(cairo_shape);
2323 }
2324
2325 cairo_pattern_destroy (pattern);
2326
2327 imgStr->close();
2328 delete imgStr;
2329}
2330
2331void CairoOutputDev::drawMaskedImage(GfxState *state, Object *ref,
2332 Stream *str, int width, int height,
2333 GfxImageColorMap *colorMap,
2334 GBool interpolate,
2335 Stream *maskStr, int maskWidth,
2336 int maskHeight, GBool maskInvert,
2337 GBool maskInterpolate)
2338{
2339 ImageStream *maskImgStr, *imgStr;
2340 int row_stride;
2341 unsigned char *maskBuffer, *buffer;
2342 unsigned char *maskDest;
2343 unsigned int *dest;
2344 cairo_surface_t *maskImage, *image;
2345 cairo_pattern_t *maskPattern, *pattern;
2346 cairo_matrix_t matrix;
2347 cairo_matrix_t maskMatrix;
2348 Guchar *pix;
2349 int x, y;
2350 int invert_bit;
2351 cairo_filter_t filter;
2352 cairo_filter_t maskFilter;
2353
2354 maskImgStr = new ImageStream(maskStr, maskWidth, 1, 1);
2355 maskImgStr->reset();
2356
2357 maskImage = cairo_image_surface_create (CAIRO_FORMAT_A8, maskWidth, maskHeight);
2358 if (cairo_surface_status (maskImage)) {
2359 maskImgStr->close();
2360 delete maskImgStr;
2361 return;
2362 }
2363
2364 maskBuffer = cairo_image_surface_get_data (maskImage);
2365 row_stride = cairo_image_surface_get_stride (maskImage);
2366
2367 invert_bit = maskInvert ? 1 : 0;
2368
2369 for (y = 0; y < maskHeight; y++) {
2370 pix = maskImgStr->getLine();
2371 maskDest = maskBuffer + y * row_stride;
2372 for (x = 0; x < maskWidth; x++) {
2373 if (pix[x] ^ invert_bit)
2374 *maskDest++ = 0;
2375 else
2376 *maskDest++ = 255;
2377 }
2378 }
2379
2380 maskImgStr->close();
2381 delete maskImgStr;
2382
2383 maskFilter = getFilterForSurface (maskImage, maskInterpolate);
2384
2385 cairo_surface_mark_dirty (maskImage);
2386 maskPattern = cairo_pattern_create_for_surface (maskImage);
2387 cairo_surface_destroy (maskImage);
2388 if (cairo_pattern_status (maskPattern))
2389 return;
2390
2391#if 0
2392 /* ICCBased color space doesn't do any color correction
2393 * so check its underlying color space as well */
2394 int is_identity_transform;
2395 is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB ||
2396 (colorMap->getColorSpace()->getMode() == csICCBased &&
2397 ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB);
2398#endif
2399
2400 /* TODO: Do we want to cache these? */
2401 imgStr = new ImageStream(str, width,
2402 colorMap->getNumPixelComps(),
2403 colorMap->getBits());
2404 imgStr->reset();
2405
2406 image = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, height);
2407 if (cairo_surface_status (image))
2408 goto cleanup;
2409
2410 buffer = cairo_image_surface_get_data (image);
2411 row_stride = cairo_image_surface_get_stride (image);
2412 for (y = 0; y < height; y++) {
2413 dest = (unsigned int *) (buffer + y * row_stride);
2414 pix = imgStr->getLine();
2415 colorMap->getRGBLine (pix, dest, width);
2416 }
2417
2418 filter = getFilterForSurface (image, interpolate);
2419
2420 cairo_surface_mark_dirty (image);
2421 pattern = cairo_pattern_create_for_surface (image);
2422 cairo_surface_destroy (image);
2423 if (cairo_pattern_status (pattern))
2424 goto cleanup;
2425
2426 LOG (printf ("drawMaskedImage %dx%d\n", width, height));
2427
2428 cairo_pattern_set_filter (pattern, filter);
2429 cairo_pattern_set_filter (maskPattern, maskFilter);
2430
2431 if (!printing) {
2432 cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD);
2433 cairo_pattern_set_extend (maskPattern, CAIRO_EXTEND_PAD);
2434 }
2435
2436 cairo_matrix_init_translate (&matrix, 0, height);
2437 cairo_matrix_scale (&matrix, width, -height);
2438 cairo_pattern_set_matrix (pattern, &matrix);
2439 if (cairo_pattern_status (pattern)) {
2440 cairo_pattern_destroy (pattern);
2441 cairo_pattern_destroy (maskPattern);
2442 goto cleanup;
2443 }
2444
2445 cairo_matrix_init_translate (&maskMatrix, 0, maskHeight);
2446 cairo_matrix_scale (&maskMatrix, maskWidth, -maskHeight);
2447 cairo_pattern_set_matrix (maskPattern, &maskMatrix);
2448 if (cairo_pattern_status (maskPattern)) {
2449 cairo_pattern_destroy (maskPattern);
2450 cairo_pattern_destroy (pattern);
2451 goto cleanup;
2452 }
2453
2454 if (!printing) {
2455 cairo_save (cairo);
2456 cairo_set_source (cairo, pattern);
2457 cairo_rectangle (cairo, 0., 0., 1., 1.);
2458 cairo_clip (cairo);
2459 cairo_mask (cairo, maskPattern);
2460 cairo_restore (cairo);
2461 } else {
2462 cairo_set_source (cairo, pattern);
2463 cairo_mask (cairo, maskPattern);
2464 }
2465
2466 if (cairo_shape) {
2467 cairo_save (cairo_shape);
2468 cairo_set_source (cairo_shape, pattern);
2469 if (!printing) {
2470 cairo_rectangle (cairo_shape, 0., 0., 1., 1.);
2471 cairo_fill (cairo_shape);
2472 } else {
2473 cairo_mask (cairo_shape, pattern);
2474 }
2475 cairo_restore (cairo_shape);
2476 }
2477
2478 cairo_pattern_destroy (maskPattern);
2479 cairo_pattern_destroy (pattern);
2480
2481cleanup:
2482 imgStr->close();
2483 delete imgStr;
2484}
2485
2486
2487//XXX: is this affect by AIS(alpha is shape)?
2488void CairoOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
2489 int width, int height,
2490 GfxImageColorMap *colorMap,
2491 GBool interpolate,
2492 Stream *maskStr,
2493 int maskWidth, int maskHeight,
2494 GfxImageColorMap *maskColorMap,
2495 GBool maskInterpolate)
2496{
2497 ImageStream *maskImgStr, *imgStr;
2498 int row_stride;
2499 unsigned char *maskBuffer, *buffer;
2500 unsigned char *maskDest;
2501 unsigned int *dest;
2502 cairo_surface_t *maskImage, *image;
2503 cairo_pattern_t *maskPattern, *pattern;
2504 cairo_matrix_t maskMatrix, matrix;
2505 Guchar *pix;
2506 int y;
2507 cairo_filter_t filter;
2508 cairo_filter_t maskFilter;
2509
2510 maskImgStr = new ImageStream(maskStr, maskWidth,
2511 maskColorMap->getNumPixelComps(),
2512 maskColorMap->getBits());
2513 maskImgStr->reset();
2514
2515 maskImage = cairo_image_surface_create (CAIRO_FORMAT_A8, maskWidth, maskHeight);
2516 if (cairo_surface_status (maskImage)) {
2517 maskImgStr->close();
2518 delete maskImgStr;
2519 return;
2520 }
2521
2522 maskBuffer = cairo_image_surface_get_data (maskImage);
2523 row_stride = cairo_image_surface_get_stride (maskImage);
2524 for (y = 0; y < maskHeight; y++) {
2525 maskDest = (unsigned char *) (maskBuffer + y * row_stride);
2526 pix = maskImgStr->getLine();
2527 maskColorMap->getGrayLine (pix, maskDest, maskWidth);
2528 }
2529
2530 maskImgStr->close();
2531 delete maskImgStr;
2532
2533 maskFilter = getFilterForSurface (maskImage, maskInterpolate);
2534
2535 cairo_surface_mark_dirty (maskImage);
2536 maskPattern = cairo_pattern_create_for_surface (maskImage);
2537 cairo_surface_destroy (maskImage);
2538 if (cairo_pattern_status (maskPattern))
2539 return;
2540
2541#if 0
2542 /* ICCBased color space doesn't do any color correction
2543 * so check its underlying color space as well */
2544 int is_identity_transform;
2545 is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB ||
2546 (colorMap->getColorSpace()->getMode() == csICCBased &&
2547 ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB);
2548#endif
2549
2550 /* TODO: Do we want to cache these? */
2551 imgStr = new ImageStream(str, width,
2552 colorMap->getNumPixelComps(),
2553 colorMap->getBits());
2554 imgStr->reset();
2555
2556 image = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, height);
2557 if (cairo_surface_status (image))
2558 goto cleanup;
2559
2560 buffer = cairo_image_surface_get_data (image);
2561 row_stride = cairo_image_surface_get_stride (image);
2562 for (y = 0; y < height; y++) {
2563 dest = (unsigned int *) (buffer + y * row_stride);
2564 pix = imgStr->getLine();
2565 colorMap->getRGBLine (pix, dest, width);
2566 }
2567
2568 filter = getFilterForSurface (image, interpolate);
2569
2570 cairo_surface_mark_dirty (image);
2571
2572 setMimeData(str, ref, image);
2573
2574 pattern = cairo_pattern_create_for_surface (image);
2575 cairo_surface_destroy (image);
2576 if (cairo_pattern_status (pattern))
2577 goto cleanup;
2578
2579 LOG (printf ("drawSoftMaskedImage %dx%d\n", width, height));
2580
2581 cairo_pattern_set_filter (pattern, filter);
2582 cairo_pattern_set_filter (maskPattern, maskFilter);
2583
2584 if (!printing) {
2585 cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD);
2586 cairo_pattern_set_extend (maskPattern, CAIRO_EXTEND_PAD);
2587 }
2588
2589 cairo_matrix_init_translate (&matrix, 0, height);
2590 cairo_matrix_scale (&matrix, width, -height);
2591 cairo_pattern_set_matrix (pattern, &matrix);
2592 if (cairo_pattern_status (pattern)) {
2593 cairo_pattern_destroy (pattern);
2594 cairo_pattern_destroy (maskPattern);
2595 goto cleanup;
2596 }
2597
2598 cairo_matrix_init_translate (&maskMatrix, 0, maskHeight);
2599 cairo_matrix_scale (&maskMatrix, maskWidth, -maskHeight);
2600 cairo_pattern_set_matrix (maskPattern, &maskMatrix);
2601 if (cairo_pattern_status (maskPattern)) {
2602 cairo_pattern_destroy (maskPattern);
2603 cairo_pattern_destroy (pattern);
2604 goto cleanup;
2605 }
2606
2607 if (fill_opacity != 1.0)
2608 cairo_push_group (cairo);
2609 else
2610 cairo_save (cairo);
2611
2612 cairo_set_source (cairo, pattern);
2613 if (!printing) {
2614 cairo_rectangle (cairo, 0., 0.,
2615 MIN (width, maskWidth) / (double)width,
2616 MIN (height, maskHeight) / (double)height);
2617 cairo_clip (cairo);
2618 }
2619 cairo_mask (cairo, maskPattern);
2620
2621 if (fill_opacity != 1.0) {
2622 cairo_pop_group_to_source (cairo);
2623 cairo_save (cairo);
2624 if (!printing) {
2625 cairo_rectangle (cairo, 0., 0.,
2626 MIN (width, maskWidth) / (double)width,
2627 MIN (height, maskHeight) / (double)height);
2628 cairo_clip (cairo);
2629 }
2630 cairo_paint_with_alpha (cairo, fill_opacity);
2631 }
2632 cairo_restore (cairo);
2633
2634 if (cairo_shape) {
2635 cairo_save (cairo_shape);
2636 cairo_set_source (cairo_shape, pattern);
2637 if (!printing) {
2638 cairo_rectangle (cairo_shape, 0., 0.,
2639 MIN (width, maskWidth) / (double)width,
2640 MIN (height, maskHeight) / (double)height);
2641 cairo_fill (cairo_shape);
2642 } else {
2643 cairo_mask (cairo_shape, pattern);
2644 }
2645 cairo_restore (cairo_shape);
2646 }
2647
2648 cairo_pattern_destroy (maskPattern);
2649 cairo_pattern_destroy (pattern);
2650
2651cleanup:
2652 imgStr->close();
2653 delete imgStr;
2654}
2655
2656GBool CairoOutputDev::getStreamData (Stream *str, char **buffer, int *length)
2657{
2658 int len, i;
2659 char *strBuffer;
2660
2661 len = 0;
2662 str->close();
2663 str->reset();
2664 while (str->getChar() != EOF) len++;
2665 if (len == 0)
2666 return gFalse;
2667
2668 strBuffer = (char *)gmalloc (len);
2669
2670 str->close();
2671 str->reset();
2672 for (i = 0; i < len; ++i)
2673 strBuffer[i] = str->getChar();
2674
2675 *buffer = strBuffer;
2676 *length = len;
2677
2678 return gTrue;
2679}
2680
2681void CairoOutputDev::setMimeData(Stream *str, Object *ref, cairo_surface_t *image)
2682{
2683 char *strBuffer;
2684 int len;
2685 Object obj;
2686
2687 if (!printing || !(str->getKind() == strDCT || str->getKind() == strJPX))
2688 return;
2689
2690 // colorspace in stream dict may be different from colorspace in jpx
2691 // data
2692 if (str->getKind() == strJPX) {
2693 GBool hasColorSpace = !str->getDict()->lookup("ColorSpace", &obj)->isNull();
2694 obj.free();
2695 if (hasColorSpace)
2696 return;
2697 }
2698
2699 if (getStreamData (str->getNextStream(), &strBuffer, &len)) {
2700 cairo_status_t st;
2701
2702#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2)
2703 if (ref && ref->isRef()) {
2704 Ref imgRef = ref->getRef();
2705 GooString *surfaceId = new GooString("poppler-surface-");
2706 surfaceId->appendf("{0:d}-{1:d}", imgRef.gen, imgRef.num);
2707 char *idBuffer = copyString(surfaceId->getCString());
2708 st = cairo_surface_set_mime_data (image, CAIRO_MIME_TYPE_UNIQUE_ID,
2709 (const unsigned char *)idBuffer,
2710 surfaceId->getLength(),
2711 gfree, idBuffer);
2712 if (st)
2713 gfree(idBuffer);
2714 delete surfaceId;
2715 }
2716#endif
2717
2718 st = cairo_surface_set_mime_data (image,
2719 str->getKind() == strDCT ?
2720 CAIRO_MIME_TYPE_JPEG : CAIRO_MIME_TYPE_JP2,
2721 (const unsigned char *)strBuffer, len,
2722 gfree, strBuffer);
2723 if (st)
2724 gfree (strBuffer);
2725 }
2726}
2727
2728void CairoOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
2729 int width, int height,
2730 GfxImageColorMap *colorMap,
2731 GBool interpolate,
2732 int *maskColors, GBool inlineImg)
2733{
2734 cairo_surface_t *image;
2735 cairo_pattern_t *pattern, *maskPattern;
2736 ImageStream *imgStr;
2737 cairo_matrix_t matrix;
2738 unsigned char *buffer;
2739 int stride, i;
2740 GfxRGB *lookup = NULL;
2741 cairo_filter_t filter = CAIRO_FILTER_BILINEAR;
2742
2743 /* TODO: Do we want to cache these? */
2744 imgStr = new ImageStream(str, width,
2745 colorMap->getNumPixelComps(),
2746 colorMap->getBits());
2747 imgStr->reset();
2748
2749#if 0
2750 /* ICCBased color space doesn't do any color correction
2751 * so check its underlying color space as well */
2752 int is_identity_transform;
2753 is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB ||
2754 (colorMap->getColorSpace()->getMode() == csICCBased &&
2755 ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB);
2756#endif
2757
2758 image = cairo_image_surface_create (maskColors ?
2759 CAIRO_FORMAT_ARGB32 :
2760 CAIRO_FORMAT_RGB24,
2761 width, height);
2762 if (cairo_surface_status (image))
2763 goto cleanup;
2764
2765 // special case for one-channel (monochrome/gray/separation) images:
2766 // build a lookup table here
2767 if (colorMap->getNumPixelComps() == 1) {
2768 int n;
2769 Guchar pix;
2770
2771 n = 1 << colorMap->getBits();
2772 lookup = (GfxRGB *)gmallocn(n, sizeof(GfxRGB));
2773 for (i = 0; i < n; ++i) {
2774 pix = (Guchar)i;
2775
2776 colorMap->getRGB(&pix, &lookup[i]);
2777 }
2778 }
2779
2780 buffer = cairo_image_surface_get_data (image);
2781 stride = cairo_image_surface_get_stride (image);
2782 for (int y = 0; y < height; y++) {
2783 uint32_t *dest = (uint32_t *) (buffer + y * stride);
2784 Guchar *pix = imgStr->getLine();
2785
2786 if (lookup) {
2787 Guchar *p = pix;
2788 GfxRGB rgb;
2789
2790 for (i = 0; i < width; i++) {
2791 rgb = lookup[*p];
2792 dest[i] =
2793 ((int) colToByte(rgb.r) << 16) |
2794 ((int) colToByte(rgb.g) << 8) |
2795 ((int) colToByte(rgb.b) << 0);
2796 p++;
2797 }
2798 } else {
2799 colorMap->getRGBLine (pix, dest, width);
2800 }
2801
2802 if (maskColors) {
2803 for (int x = 0; x < width; x++) {
2804 bool is_opaque = false;
2805 for (int i = 0; i < colorMap->getNumPixelComps(); ++i) {
2806 if (pix[i] < maskColors[2*i] ||
2807 pix[i] > maskColors[2*i+1]) {
2808 is_opaque = true;
2809 break;
2810 }
2811 }
2812 if (is_opaque)
2813 *dest |= 0xff000000;
2814 else
2815 *dest = 0;
2816 dest++;
2817 pix += colorMap->getNumPixelComps();
2818 }
2819 }
2820 }
2821 gfree(lookup);
2822
2823 LOG (printf ("drawImage %dx%d\n", width, height));
2824
2825 cairo_surface_t *scaled_surface;
2826
2827 scaled_surface = downscaleSurface (image);
2828 if (scaled_surface) {
2829 if (cairo_surface_status (scaled_surface))
2830 goto cleanup;
2831 cairo_surface_destroy (image);
2832 image = scaled_surface;
2833 width = cairo_image_surface_get_width (image);
2834 height = cairo_image_surface_get_height (image);
2835 } else {
2836 filter = getFilterForSurface (image, interpolate);
2837 }
2838
2839 cairo_surface_mark_dirty (image);
2840
2841 if (!inlineImg) /* don't read stream twice if it is an inline image */
2842 setMimeData(str, ref, image);
2843
2844 pattern = cairo_pattern_create_for_surface (image);
2845 cairo_surface_destroy (image);
2846 if (cairo_pattern_status (pattern))
2847 goto cleanup;
2848
2849 cairo_pattern_set_filter (pattern, filter);
2850
2851 if (!printing)
2852 cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD);
2853
2854 cairo_matrix_init_translate (&matrix, 0, height);
2855 cairo_matrix_scale (&matrix, width, -height);
2856 cairo_pattern_set_matrix (pattern, &matrix);
2857 if (cairo_pattern_status (pattern)) {
2858 cairo_pattern_destroy (pattern);
2859 goto cleanup;
2860 }
2861
2862 if (!mask && fill_opacity != 1.0) {
2863 maskPattern = cairo_pattern_create_rgba (1., 1., 1., fill_opacity);
2864 } else if (mask) {
2865 maskPattern = cairo_pattern_reference (mask);
2866 } else {
2867 maskPattern = NULL;
2868 }
2869
2870 cairo_save (cairo);
2871 cairo_set_source (cairo, pattern);
2872 if (!printing)
2873 cairo_rectangle (cairo, 0., 0., 1., 1.);
2874 if (maskPattern) {
2875 if (!printing)
2876 cairo_clip (cairo);
2877 cairo_set_matrix (cairo, &mask_matrix);
2878 cairo_mask (cairo, maskPattern);
2879 } else {
2880 if (printing)
2881 cairo_paint (cairo);
2882 else
2883 cairo_fill (cairo);
2884 }
2885 cairo_restore (cairo);
2886
2887 cairo_pattern_destroy (maskPattern);
2888
2889 if (cairo_shape) {
2890 cairo_save (cairo_shape);
2891 cairo_set_source (cairo_shape, pattern);
2892 if (printing) {
2893 cairo_paint (cairo_shape);
2894 } else {
2895 cairo_rectangle (cairo_shape, 0., 0., 1., 1.);
2896 cairo_fill (cairo_shape);
2897 }
2898 cairo_restore (cairo_shape);
2899 }
2900
2901 cairo_pattern_destroy (pattern);
2902
2903cleanup:
2904 imgStr->close();
2905 delete imgStr;
2906}
2907
2908
2909//------------------------------------------------------------------------
2910// ImageOutputDev
2911//------------------------------------------------------------------------
2912
2913CairoImageOutputDev::CairoImageOutputDev()
2914{
2915 images = NULL;
2916 numImages = 0;
2917 size = 0;
2918 imgDrawCbk = NULL;
2919 imgDrawCbkData = NULL;
2920}
2921
2922CairoImageOutputDev::~CairoImageOutputDev()
2923{
2924 int i;
2925
2926 for (i = 0; i < numImages; i++)
2927 delete images[i];
2928 gfree (images);
2929}
2930
2931void CairoImageOutputDev::saveImage(CairoImage *image)
2932{
2933 if (numImages >= size) {
2934 size += 16;
2935 images = (CairoImage **) greallocn (images, size, sizeof (CairoImage *));
2936 }
2937 images[numImages++] = image;
2938}
2939
2940void CairoImageOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str,
2941 int width, int height, GBool invert,
2942 GBool interpolate, GBool inlineImg)
2943{
2944 cairo_t *cr;
2945 cairo_surface_t *surface;
2946 double x1, y1, x2, y2;
2947 double *ctm;
2948 double mat[6];
2949 CairoImage *image;
2950
2951 ctm = state->getCTM();
2952
2953 mat[0] = ctm[0];
2954 mat[1] = ctm[1];
2955 mat[2] = -ctm[2];
2956 mat[3] = -ctm[3];
2957 mat[4] = ctm[2] + ctm[4];
2958 mat[5] = ctm[3] + ctm[5];
2959 x1 = mat[4];
2960 y1 = mat[5];
2961 x2 = x1 + width;
2962 y2 = y1 + height;
2963
2964 image = new CairoImage (x1, y1, x2, y2);
2965 saveImage (image);
2966
2967 if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) {
2968 surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
2969 cr = cairo_create (surface);
2970 setCairo (cr);
2971 cairo_translate (cr, 0, height);
2972 cairo_scale (cr, width, -height);
2973
2974 CairoOutputDev::drawImageMask(state, ref, str, width, height, invert, interpolate, inlineImg);
2975 image->setImage (surface);
2976
2977 setCairo (NULL);
2978 cairo_surface_destroy (surface);
2979 cairo_destroy (cr);
2980 }
2981}
2982
2983void CairoImageOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
2984 int width, int height, GfxImageColorMap *colorMap,
2985 GBool interpolate, int *maskColors, GBool inlineImg)
2986{
2987 cairo_t *cr;
2988 cairo_surface_t *surface;
2989 double x1, y1, x2, y2;
2990 double *ctm;
2991 double mat[6];
2992 CairoImage *image;
2993
2994 ctm = state->getCTM();
2995
2996 mat[0] = ctm[0];
2997 mat[1] = ctm[1];
2998 mat[2] = -ctm[2];
2999 mat[3] = -ctm[3];
3000 mat[4] = ctm[2] + ctm[4];
3001 mat[5] = ctm[3] + ctm[5];
3002 x1 = mat[4];
3003 y1 = mat[5];
3004 x2 = x1 + width;
3005 y2 = y1 + height;
3006
3007 image = new CairoImage (x1, y1, x2, y2);
3008 saveImage (image);
3009
3010 if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) {
3011 surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
3012 cr = cairo_create (surface);
3013 setCairo (cr);
3014 cairo_translate (cr, 0, height);
3015 cairo_scale (cr, width, -height);
3016
3017 CairoOutputDev::drawImage(state, ref, str, width, height, colorMap, interpolate, maskColors, inlineImg);
3018 image->setImage (surface);
3019
3020 setCairo (NULL);
3021 cairo_surface_destroy (surface);
3022 cairo_destroy (cr);
3023 }
3024}
3025
3026void CairoImageOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
3027 int width, int height,
3028 GfxImageColorMap *colorMap,
3029 GBool interpolate,
3030 Stream *maskStr,
3031 int maskWidth, int maskHeight,
3032 GfxImageColorMap *maskColorMap,
3033 GBool maskInterpolate)
3034{
3035 cairo_t *cr;
3036 cairo_surface_t *surface;
3037 double x1, y1, x2, y2;
3038 double *ctm;
3039 double mat[6];
3040 CairoImage *image;
3041
3042 ctm = state->getCTM();
3043
3044 mat[0] = ctm[0];
3045 mat[1] = ctm[1];
3046 mat[2] = -ctm[2];
3047 mat[3] = -ctm[3];
3048 mat[4] = ctm[2] + ctm[4];
3049 mat[5] = ctm[3] + ctm[5];
3050 x1 = mat[4];
3051 y1 = mat[5];
3052 x2 = x1 + width;
3053 y2 = y1 + height;
3054
3055 image = new CairoImage (x1, y1, x2, y2);
3056 saveImage (image);
3057
3058 if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) {
3059 surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
3060 cr = cairo_create (surface);
3061 setCairo (cr);
3062 cairo_translate (cr, 0, height);
3063 cairo_scale (cr, width, -height);
3064
3065 CairoOutputDev::drawSoftMaskedImage(state, ref, str, width, height, colorMap, interpolate,
3066 maskStr, maskWidth, maskHeight, maskColorMap, maskInterpolate);
3067 image->setImage (surface);
3068
3069 setCairo (NULL);
3070 cairo_surface_destroy (surface);
3071 cairo_destroy (cr);
3072 }
3073}
3074
3075void CairoImageOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str,
3076 int width, int height,
3077 GfxImageColorMap *colorMap,
3078 GBool interpolate,
3079 Stream *maskStr,
3080 int maskWidth, int maskHeight,
3081 GBool maskInvert, GBool maskInterpolate)
3082{
3083 cairo_t *cr;
3084 cairo_surface_t *surface;
3085 double x1, y1, x2, y2;
3086 double *ctm;
3087 double mat[6];
3088 CairoImage *image;
3089
3090 ctm = state->getCTM();
3091
3092 mat[0] = ctm[0];
3093 mat[1] = ctm[1];
3094 mat[2] = -ctm[2];
3095 mat[3] = -ctm[3];
3096 mat[4] = ctm[2] + ctm[4];
3097 mat[5] = ctm[3] + ctm[5];
3098 x1 = mat[4];
3099 y1 = mat[5];
3100 x2 = x1 + width;
3101 y2 = y1 + height;
3102
3103 image = new CairoImage (x1, y1, x2, y2);
3104 saveImage (image);
3105
3106 if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) {
3107 surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
3108 cr = cairo_create (surface);
3109 setCairo (cr);
3110 cairo_translate (cr, 0, height);
3111 cairo_scale (cr, width, -height);
3112
3113 CairoOutputDev::drawMaskedImage(state, ref, str, width, height, colorMap, interpolate,
3114 maskStr, maskWidth, maskHeight, maskInvert, maskInterpolate);
3115 image->setImage (surface);
3116
3117 setCairo (NULL);
3118 cairo_surface_destroy (surface);
3119 cairo_destroy (cr);
3120 }
3121}
03122
=== modified file '.pc/ltmain-as-needed.diff/ltmain.sh'
--- .pc/ltmain-as-needed.diff/ltmain.sh 2012-02-12 22:49:35 +0000
+++ .pc/ltmain-as-needed.diff/ltmain.sh 2012-11-16 16:39:27 +0000
@@ -70,7 +70,7 @@
70# compiler: $LTCC70# compiler: $LTCC
71# compiler flags: $LTCFLAGS71# compiler flags: $LTCFLAGS
72# linker: $LD (gnu? $with_gnu_ld)72# linker: $LD (gnu? $with_gnu_ld)
73# $progname: (GNU libtool) 2.4.273# $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1
74# automake: $automake_version74# automake: $automake_version
75# autoconf: $autoconf_version75# autoconf: $autoconf_version
76#76#
@@ -80,7 +80,7 @@
8080
81PROGRAM=libtool81PROGRAM=libtool
82PACKAGE=libtool82PACKAGE=libtool
83VERSION=2.4.283VERSION="2.4.2 Debian-2.4.2-1ubuntu1"
84TIMESTAMP=""84TIMESTAMP=""
85package_revision=1.333785package_revision=1.3337
8686
@@ -6124,7 +6124,10 @@
6124 case $pass in6124 case $pass in
6125 dlopen) libs="$dlfiles" ;;6125 dlopen) libs="$dlfiles" ;;
6126 dlpreopen) libs="$dlprefiles" ;;6126 dlpreopen) libs="$dlprefiles" ;;
6127 link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;6127 link)
6128 libs="$deplibs %DEPLIBS%"
6129 test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
6130 ;;
6128 esac6131 esac
6129 fi6132 fi
6130 if test "$linkmode,$pass" = "lib,dlpreopen"; then6133 if test "$linkmode,$pass" = "lib,dlpreopen"; then
@@ -6444,19 +6447,19 @@
6444 # It is a libtool convenience library, so add in its objects.6447 # It is a libtool convenience library, so add in its objects.
6445 func_append convenience " $ladir/$objdir/$old_library"6448 func_append convenience " $ladir/$objdir/$old_library"
6446 func_append old_convenience " $ladir/$objdir/$old_library"6449 func_append old_convenience " $ladir/$objdir/$old_library"
6450 tmp_libs=
6451 for deplib in $dependency_libs; do
6452 deplibs="$deplib $deplibs"
6453 if $opt_preserve_dup_deps ; then
6454 case "$tmp_libs " in
6455 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
6456 esac
6457 fi
6458 func_append tmp_libs " $deplib"
6459 done
6447 elif test "$linkmode" != prog && test "$linkmode" != lib; then6460 elif test "$linkmode" != prog && test "$linkmode" != lib; then
6448 func_fatal_error "\`$lib' is not a convenience library"6461 func_fatal_error "\`$lib' is not a convenience library"
6449 fi6462 fi
6450 tmp_libs=
6451 for deplib in $dependency_libs; do
6452 deplibs="$deplib $deplibs"
6453 if $opt_preserve_dup_deps ; then
6454 case "$tmp_libs " in
6455 *" $deplib "*) func_append specialdeplibs " $deplib" ;;
6456 esac
6457 fi
6458 func_append tmp_libs " $deplib"
6459 done
6460 continue6463 continue
6461 fi # $pass = conv6464 fi # $pass = conv
64626465
@@ -7349,6 +7352,9 @@
7349 revision="$number_minor"7352 revision="$number_minor"
7350 lt_irix_increment=no7353 lt_irix_increment=no
7351 ;;7354 ;;
7355 *)
7356 func_fatal_configuration "$modename: unknown library version type \`$version_type'"
7357 ;;
7352 esac7358 esac
7353 ;;7359 ;;
7354 no)7360 no)
73557361
=== added directory '.pc/qt4-visibility.diff'
=== added directory '.pc/qt4-visibility.diff/qt4'
=== added directory '.pc/qt4-visibility.diff/qt4/src'
=== added file '.pc/qt4-visibility.diff/qt4/src/Makefile.am'
--- .pc/qt4-visibility.diff/qt4/src/Makefile.am 1970-01-01 00:00:00 +0000
+++ .pc/qt4-visibility.diff/qt4/src/Makefile.am 2012-11-16 16:39:27 +0000
@@ -0,0 +1,74 @@
1INCLUDES = \
2 -I$(top_srcdir) \
3 -I$(top_srcdir)/poppler \
4 $(FONTCONFIG_CFLAGS) \
5 $(POPPLER_QT4_CFLAGS)
6
7SUFFIXES: .moc
8
9poppler_includedir = $(includedir)/poppler/qt4
10
11poppler_include_HEADERS = \
12 poppler-qt4.h \
13 poppler-link.h \
14 poppler-annotation.h \
15 poppler-form.h \
16 poppler-optcontent.h \
17 poppler-export.h \
18 poppler-media.h \
19 poppler-page-transition.h
20
21lib_LTLIBRARIES = libpoppler-qt4.la
22
23libpoppler_qt4_la_SOURCES = \
24 poppler-document.cc \
25 poppler-page.cc \
26 poppler-fontinfo.cc \
27 poppler-embeddedfile.cc \
28 poppler-textbox.cc \
29 poppler-link.cc \
30 poppler-annotation.cc \
31 poppler-link-extractor.cc \
32 poppler-optcontent.cc \
33 poppler-optcontent.h \
34 poppler-page-transition.cc \
35 poppler-sound.cc \
36 poppler-form.cc \
37 poppler-base-converter.cc \
38 poppler-ps-converter.cc \
39 poppler-pdf-converter.cc \
40 poppler-qiodeviceoutstream.cc \
41 poppler-private.cc \
42 poppler-movie.cc \
43 poppler-media.cc \
44 poppler-annotation-helper.h \
45 poppler-page-private.h \
46 poppler-link-extractor-private.h \
47 poppler-annotation-private.h \
48 poppler-converter-private.h \
49 poppler-qiodeviceoutstream-private.h \
50 poppler-optcontent-private.h \
51 poppler-export.h \
52 poppler-private.h \
53 poppler-page-transition-private.h \
54 poppler-embeddedfile-private.h
55
56libpoppler_qt4_la_CXXFLAGS = \
57 -Dpoppler_qt4_EXPORTS
58
59libpoppler_qt4_la_LIBADD = \
60 $(top_builddir)/poppler/libpoppler.la \
61 $(top_builddir)/poppler/libpoppler-arthur.la \
62 $(FONTCONFIG_LIBS) \
63 $(POPPLER_QT4_LIBS)
64
65libpoppler_qt4_la_LDFLAGS = -version-info 4:0:0 @create_shared_lib@ @auto_import_flags@
66
67# This rule lets GNU make create any *.moc from the equivalent *.h
68.h.moc:
69 $(AM_V_GEN) $(MOCQT4) -i $< -o $@
70
71BUILT_SOURCES = poppler-optcontent.moc
72
73clean-generic:
74 rm -f *.moc
075
=== added file '.pc/qt4-visibility.diff/qt4/src/Makefile.in'
--- .pc/qt4-visibility.diff/qt4/src/Makefile.in 1970-01-01 00:00:00 +0000
+++ .pc/qt4-visibility.diff/qt4/src/Makefile.in 2012-11-16 16:39:27 +0000
@@ -0,0 +1,948 @@
1# Makefile.in generated by automake 1.11.5 from Makefile.am.
2# @configure_input@
3
4# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
5# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
6# Foundation, Inc.
7# This Makefile.in is free software; the Free Software Foundation
8# gives unlimited permission to copy and/or distribute it,
9# with or without modifications, as long as this notice is preserved.
10
11# This program is distributed in the hope that it will be useful,
12# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
13# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
14# PARTICULAR PURPOSE.
15
16@SET_MAKE@
17
18
19VPATH = @srcdir@
20am__make_dryrun = \
21 { \
22 am__dry=no; \
23 case $$MAKEFLAGS in \
24 *\\[\ \ ]*) \
25 echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
26 | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
27 *) \
28 for am__flg in $$MAKEFLAGS; do \
29 case $$am__flg in \
30 *=*|--*) ;; \
31 *n*) am__dry=yes; break;; \
32 esac; \
33 done;; \
34 esac; \
35 test $$am__dry = yes; \
36 }
37pkgdatadir = $(datadir)/@PACKAGE@
38pkgincludedir = $(includedir)/@PACKAGE@
39pkglibdir = $(libdir)/@PACKAGE@
40pkglibexecdir = $(libexecdir)/@PACKAGE@
41am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
42install_sh_DATA = $(install_sh) -c -m 644
43install_sh_PROGRAM = $(install_sh) -c
44install_sh_SCRIPT = $(install_sh) -c
45INSTALL_HEADER = $(INSTALL_DATA)
46transform = $(program_transform_name)
47NORMAL_INSTALL = :
48PRE_INSTALL = :
49POST_INSTALL = :
50NORMAL_UNINSTALL = :
51PRE_UNINSTALL = :
52POST_UNINSTALL = :
53build_triplet = @build@
54host_triplet = @host@
55subdir = qt4/src
56DIST_COMMON = $(poppler_include_HEADERS) $(srcdir)/Makefile.am \
57 $(srcdir)/Makefile.in
58ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
59am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \
60 $(top_srcdir)/m4/define-dir.m4 $(top_srcdir)/m4/gtk-doc.m4 \
61 $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/introspection.m4 \
62 $(top_srcdir)/m4/libjpeg.m4 $(top_srcdir)/m4/libtool.m4 \
63 $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
64 $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
65 $(top_srcdir)/configure.ac
66am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
67 $(ACLOCAL_M4)
68mkinstalldirs = $(install_sh) -d
69CONFIG_HEADER = $(top_builddir)/config.h \
70 $(top_builddir)/poppler/poppler-config.h
71CONFIG_CLEAN_FILES =
72CONFIG_CLEAN_VPATH_FILES =
73am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
74am__vpath_adj = case $$p in \
75 $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
76 *) f=$$p;; \
77 esac;
78am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
79am__install_max = 40
80am__nobase_strip_setup = \
81 srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
82am__nobase_strip = \
83 for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
84am__nobase_list = $(am__nobase_strip_setup); \
85 for p in $$list; do echo "$$p $$p"; done | \
86 sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
87 $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
88 if (++n[$$2] == $(am__install_max)) \
89 { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
90 END { for (dir in files) print dir, files[dir] }'
91am__base_list = \
92 sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
93 sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
94am__uninstall_files_from_dir = { \
95 test -z "$$files" \
96 || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
97 || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
98 $(am__cd) "$$dir" && rm -f $$files; }; \
99 }
100am__installdirs = "$(DESTDIR)$(libdir)" \
101 "$(DESTDIR)$(poppler_includedir)"
102LTLIBRARIES = $(lib_LTLIBRARIES)
103am__DEPENDENCIES_1 =
104libpoppler_qt4_la_DEPENDENCIES = \
105 $(top_builddir)/poppler/libpoppler.la \
106 $(top_builddir)/poppler/libpoppler-arthur.la \
107 $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
108am_libpoppler_qt4_la_OBJECTS = libpoppler_qt4_la-poppler-document.lo \
109 libpoppler_qt4_la-poppler-page.lo \
110 libpoppler_qt4_la-poppler-fontinfo.lo \
111 libpoppler_qt4_la-poppler-embeddedfile.lo \
112 libpoppler_qt4_la-poppler-textbox.lo \
113 libpoppler_qt4_la-poppler-link.lo \
114 libpoppler_qt4_la-poppler-annotation.lo \
115 libpoppler_qt4_la-poppler-link-extractor.lo \
116 libpoppler_qt4_la-poppler-optcontent.lo \
117 libpoppler_qt4_la-poppler-page-transition.lo \
118 libpoppler_qt4_la-poppler-sound.lo \
119 libpoppler_qt4_la-poppler-form.lo \
120 libpoppler_qt4_la-poppler-base-converter.lo \
121 libpoppler_qt4_la-poppler-ps-converter.lo \
122 libpoppler_qt4_la-poppler-pdf-converter.lo \
123 libpoppler_qt4_la-poppler-qiodeviceoutstream.lo \
124 libpoppler_qt4_la-poppler-private.lo \
125 libpoppler_qt4_la-poppler-movie.lo \
126 libpoppler_qt4_la-poppler-media.lo
127libpoppler_qt4_la_OBJECTS = $(am_libpoppler_qt4_la_OBJECTS)
128AM_V_lt = $(am__v_lt_@AM_V@)
129am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
130am__v_lt_0 = --silent
131libpoppler_qt4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \
132 $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \
133 $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) \
134 $(libpoppler_qt4_la_LDFLAGS) $(LDFLAGS) -o $@
135DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler
136depcomp = $(SHELL) $(top_srcdir)/depcomp
137am__depfiles_maybe = depfiles
138am__mv = mv -f
139CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
140 $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
141LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
142 $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \
143 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
144 $(AM_CXXFLAGS) $(CXXFLAGS)
145AM_V_CXX = $(am__v_CXX_@AM_V@)
146am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@)
147am__v_CXX_0 = @echo " CXX " $@;
148AM_V_at = $(am__v_at_@AM_V@)
149am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
150am__v_at_0 = @
151CXXLD = $(CXX)
152CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \
153 $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \
154 $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
155AM_V_CXXLD = $(am__v_CXXLD_@AM_V@)
156am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@)
157am__v_CXXLD_0 = @echo " CXXLD " $@;
158COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
159 $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
160LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
161 $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
162 $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
163 $(AM_CFLAGS) $(CFLAGS)
164AM_V_CC = $(am__v_CC_@AM_V@)
165am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
166am__v_CC_0 = @echo " CC " $@;
167CCLD = $(CC)
168LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
169 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
170 $(AM_LDFLAGS) $(LDFLAGS) -o $@
171AM_V_CCLD = $(am__v_CCLD_@AM_V@)
172am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
173am__v_CCLD_0 = @echo " CCLD " $@;
174AM_V_GEN = $(am__v_GEN_@AM_V@)
175am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
176am__v_GEN_0 = @echo " GEN " $@;
177SOURCES = $(libpoppler_qt4_la_SOURCES)
178DIST_SOURCES = $(libpoppler_qt4_la_SOURCES)
179am__can_run_installinfo = \
180 case $$AM_UPDATE_INFO_DIR in \
181 n|no|NO) false;; \
182 *) (install-info --version) >/dev/null 2>&1;; \
183 esac
184HEADERS = $(poppler_include_HEADERS)
185ETAGS = etags
186CTAGS = ctags
187DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
188ACLOCAL = @ACLOCAL@
189AMTAR = @AMTAR@
190AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
191AR = @AR@
192AS = @AS@
193AUTOCONF = @AUTOCONF@
194AUTOHEADER = @AUTOHEADER@
195AUTOMAKE = @AUTOMAKE@
196AWK = @AWK@
197CAIRO_CFLAGS = @CAIRO_CFLAGS@
198CAIRO_FEATURE = @CAIRO_FEATURE@
199CAIRO_LIBS = @CAIRO_LIBS@
200CAIRO_REQ = @CAIRO_REQ@
201CAIRO_VERSION = @CAIRO_VERSION@
202CC = @CC@
203CCDEPMODE = @CCDEPMODE@
204CFLAGS = @CFLAGS@
205CPP = @CPP@
206CPPFLAGS = @CPPFLAGS@
207CXX = @CXX@
208CXXCPP = @CXXCPP@
209CXXDEPMODE = @CXXDEPMODE@
210CXXFLAGS = @CXXFLAGS@
211CYGPATH_W = @CYGPATH_W@
212DEFS = @DEFS@
213DEPDIR = @DEPDIR@
214DLLTOOL = @DLLTOOL@
215DSYMUTIL = @DSYMUTIL@
216DUMPBIN = @DUMPBIN@
217ECHO_C = @ECHO_C@
218ECHO_N = @ECHO_N@
219ECHO_T = @ECHO_T@
220EGREP = @EGREP@
221EXEEXT = @EXEEXT@
222FGREP = @FGREP@
223FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@
224FONTCONFIG_LIBS = @FONTCONFIG_LIBS@
225FREETYPE_CFLAGS = @FREETYPE_CFLAGS@
226FREETYPE_CONFIG = @FREETYPE_CONFIG@
227FREETYPE_LIBS = @FREETYPE_LIBS@
228GLIB_MKENUMS = @GLIB_MKENUMS@
229GLIB_REQ = @GLIB_REQ@
230GLIB_REQUIRED = @GLIB_REQUIRED@
231GREP = @GREP@
232GTKDOC_CHECK = @GTKDOC_CHECK@
233GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@
234GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@
235GTKDOC_MKPDF = @GTKDOC_MKPDF@
236GTKDOC_REBASE = @GTKDOC_REBASE@
237GTK_TEST_CFLAGS = @GTK_TEST_CFLAGS@
238GTK_TEST_LIBS = @GTK_TEST_LIBS@
239HTML_DIR = @HTML_DIR@
240INSTALL = @INSTALL@
241INSTALL_DATA = @INSTALL_DATA@
242INSTALL_PROGRAM = @INSTALL_PROGRAM@
243INSTALL_SCRIPT = @INSTALL_SCRIPT@
244INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
245INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@
246INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@
247INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@
248INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@
249INTROSPECTION_LIBS = @INTROSPECTION_LIBS@
250INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@
251INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@
252INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@
253LCMS_CFLAGS = @LCMS_CFLAGS@
254LCMS_LIBS = @LCMS_LIBS@
255LD = @LD@
256LDFLAGS = @LDFLAGS@
257LIBCURL_CFLAGS = @LIBCURL_CFLAGS@
258LIBCURL_LIBS = @LIBCURL_LIBS@
259LIBICONV = @LIBICONV@
260LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@
261LIBJPEG_LIBS = @LIBJPEG_LIBS@
262LIBOBJS = @LIBOBJS@
263LIBOPENJPEG_CFLAGS = @LIBOPENJPEG_CFLAGS@
264LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@
265LIBPNG_CFLAGS = @LIBPNG_CFLAGS@
266LIBPNG_LIBS = @LIBPNG_LIBS@
267LIBS = @LIBS@
268LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@
269LIBTIFF_CFLAGSS = @LIBTIFF_CFLAGSS@
270LIBTIFF_LIBS = @LIBTIFF_LIBS@
271LIBTOOL = @LIBTOOL@
272LIPO = @LIPO@
273LN_S = @LN_S@
274LTLIBICONV = @LTLIBICONV@
275LTLIBOBJS = @LTLIBOBJS@
276MAKEINFO = @MAKEINFO@
277MANIFEST_TOOL = @MANIFEST_TOOL@
278MKDIR_P = @MKDIR_P@
279MOCQT4 = @MOCQT4@
280NM = @NM@
281NMEDIT = @NMEDIT@
282OBJDUMP = @OBJDUMP@
283OBJEXT = @OBJEXT@
284OTOOL = @OTOOL@
285OTOOL64 = @OTOOL64@
286PACKAGE = @PACKAGE@
287PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
288PACKAGE_NAME = @PACKAGE_NAME@
289PACKAGE_STRING = @PACKAGE_STRING@
290PACKAGE_TARNAME = @PACKAGE_TARNAME@
291PACKAGE_URL = @PACKAGE_URL@
292PACKAGE_VERSION = @PACKAGE_VERSION@
293PATH_SEPARATOR = @PATH_SEPARATOR@
294PC_REQUIRES = @PC_REQUIRES@
295PC_REQUIRES_PRIVATE = @PC_REQUIRES_PRIVATE@
296PDFTOCAIRO_CFLAGS = @PDFTOCAIRO_CFLAGS@
297PDFTOCAIRO_LIBS = @PDFTOCAIRO_LIBS@
298PKG_CONFIG = @PKG_CONFIG@
299PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
300PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
301POPPLER_DATADIR = @POPPLER_DATADIR@
302POPPLER_GLIB_CFLAGS = @POPPLER_GLIB_CFLAGS@
303POPPLER_GLIB_DISABLE_DEPRECATED = @POPPLER_GLIB_DISABLE_DEPRECATED@
304POPPLER_GLIB_DISABLE_SINGLE_INCLUDES = @POPPLER_GLIB_DISABLE_SINGLE_INCLUDES@
305POPPLER_GLIB_LIBS = @POPPLER_GLIB_LIBS@
306POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@
307POPPLER_MICRO_VERSION = @POPPLER_MICRO_VERSION@
308POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@
309POPPLER_QT4_CFLAGS = @POPPLER_QT4_CFLAGS@
310POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@
311POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@
312POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@
313POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@
314POPPLER_VERSION = @POPPLER_VERSION@
315PTHREAD_CC = @PTHREAD_CC@
316PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
317PTHREAD_LIBS = @PTHREAD_LIBS@
318RANLIB = @RANLIB@
319SED = @SED@
320SET_MAKE = @SET_MAKE@
321SHELL = @SHELL@
322STRIP = @STRIP@
323TESTDATADIR = @TESTDATADIR@
324VERSION = @VERSION@
325XMKMF = @XMKMF@
326X_CFLAGS = @X_CFLAGS@
327X_EXTRA_LIBS = @X_EXTRA_LIBS@
328X_LIBS = @X_LIBS@
329X_PRE_LIBS = @X_PRE_LIBS@
330ZLIB_LIBS = @ZLIB_LIBS@
331abs_builddir = @abs_builddir@
332abs_srcdir = @abs_srcdir@
333abs_top_builddir = @abs_top_builddir@
334abs_top_srcdir = @abs_top_srcdir@
335ac_ct_AR = @ac_ct_AR@
336ac_ct_CC = @ac_ct_CC@
337ac_ct_CXX = @ac_ct_CXX@
338ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
339acx_pthread_config = @acx_pthread_config@
340am__include = @am__include@
341am__leading_dot = @am__leading_dot@
342am__quote = @am__quote@
343am__tar = @am__tar@
344am__untar = @am__untar@
345auto_import_flags = @auto_import_flags@
346bindir = @bindir@
347build = @build@
348build_alias = @build_alias@
349build_cpu = @build_cpu@
350build_os = @build_os@
351build_vendor = @build_vendor@
352builddir = @builddir@
353create_shared_lib = @create_shared_lib@
354datadir = @datadir@
355datarootdir = @datarootdir@
356docdir = @docdir@
357dvidir = @dvidir@
358exec_prefix = @exec_prefix@
359host = @host@
360host_alias = @host_alias@
361host_cpu = @host_cpu@
362host_os = @host_os@
363host_vendor = @host_vendor@
364htmldir = @htmldir@
365includedir = @includedir@
366infodir = @infodir@
367install_sh = @install_sh@
368libdir = @libdir@
369libexecdir = @libexecdir@
370localedir = @localedir@
371localstatedir = @localstatedir@
372mandir = @mandir@
373mkdir_p = @mkdir_p@
374oldincludedir = @oldincludedir@
375pdfdir = @pdfdir@
376prefix = @prefix@
377program_transform_name = @program_transform_name@
378psdir = @psdir@
379sbindir = @sbindir@
380sharedstatedir = @sharedstatedir@
381srcdir = @srcdir@
382sysconfdir = @sysconfdir@
383target_alias = @target_alias@
384top_build_prefix = @top_build_prefix@
385top_builddir = @top_builddir@
386top_srcdir = @top_srcdir@
387win32_libs = @win32_libs@
388INCLUDES = \
389 -I$(top_srcdir) \
390 -I$(top_srcdir)/poppler \
391 $(FONTCONFIG_CFLAGS) \
392 $(POPPLER_QT4_CFLAGS)
393
394poppler_includedir = $(includedir)/poppler/qt4
395poppler_include_HEADERS = \
396 poppler-qt4.h \
397 poppler-link.h \
398 poppler-annotation.h \
399 poppler-form.h \
400 poppler-optcontent.h \
401 poppler-export.h \
402 poppler-media.h \
403 poppler-page-transition.h
404
405lib_LTLIBRARIES = libpoppler-qt4.la
406libpoppler_qt4_la_SOURCES = \
407 poppler-document.cc \
408 poppler-page.cc \
409 poppler-fontinfo.cc \
410 poppler-embeddedfile.cc \
411 poppler-textbox.cc \
412 poppler-link.cc \
413 poppler-annotation.cc \
414 poppler-link-extractor.cc \
415 poppler-optcontent.cc \
416 poppler-optcontent.h \
417 poppler-page-transition.cc \
418 poppler-sound.cc \
419 poppler-form.cc \
420 poppler-base-converter.cc \
421 poppler-ps-converter.cc \
422 poppler-pdf-converter.cc \
423 poppler-qiodeviceoutstream.cc \
424 poppler-private.cc \
425 poppler-movie.cc \
426 poppler-media.cc \
427 poppler-annotation-helper.h \
428 poppler-page-private.h \
429 poppler-link-extractor-private.h \
430 poppler-annotation-private.h \
431 poppler-converter-private.h \
432 poppler-qiodeviceoutstream-private.h \
433 poppler-optcontent-private.h \
434 poppler-export.h \
435 poppler-private.h \
436 poppler-page-transition-private.h \
437 poppler-embeddedfile-private.h
438
439libpoppler_qt4_la_CXXFLAGS = \
440 -Dpoppler_qt4_EXPORTS
441
442libpoppler_qt4_la_LIBADD = \
443 $(top_builddir)/poppler/libpoppler.la \
444 $(top_builddir)/poppler/libpoppler-arthur.la \
445 $(FONTCONFIG_LIBS) \
446 $(POPPLER_QT4_LIBS)
447
448libpoppler_qt4_la_LDFLAGS = -version-info 4:0:0 @create_shared_lib@ @auto_import_flags@
449BUILT_SOURCES = poppler-optcontent.moc
450all: $(BUILT_SOURCES)
451 $(MAKE) $(AM_MAKEFLAGS) all-am
452
453.SUFFIXES:
454.SUFFIXES: .cc .h .lo .moc .o .obj
455$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
456 @for dep in $?; do \
457 case '$(am__configure_deps)' in \
458 *$$dep*) \
459 ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
460 && { if test -f $@; then exit 0; else break; fi; }; \
461 exit 1;; \
462 esac; \
463 done; \
464 echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign qt4/src/Makefile'; \
465 $(am__cd) $(top_srcdir) && \
466 $(AUTOMAKE) --foreign qt4/src/Makefile
467.PRECIOUS: Makefile
468Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
469 @case '$?' in \
470 *config.status*) \
471 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
472 *) \
473 echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
474 cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
475 esac;
476
477$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
478 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
479
480$(top_srcdir)/configure: $(am__configure_deps)
481 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
482$(ACLOCAL_M4): $(am__aclocal_m4_deps)
483 cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
484$(am__aclocal_m4_deps):
485install-libLTLIBRARIES: $(lib_LTLIBRARIES)
486 @$(NORMAL_INSTALL)
487 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
488 list2=; for p in $$list; do \
489 if test -f $$p; then \
490 list2="$$list2 $$p"; \
491 else :; fi; \
492 done; \
493 test -z "$$list2" || { \
494 echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \
495 $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \
496 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
497 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
498 }
499
500uninstall-libLTLIBRARIES:
501 @$(NORMAL_UNINSTALL)
502 @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
503 for p in $$list; do \
504 $(am__strip_dir) \
505 echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
506 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
507 done
508
509clean-libLTLIBRARIES:
510 -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
511 @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
512 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
513 test "$$dir" != "$$p" || dir=.; \
514 echo "rm -f \"$${dir}/so_locations\""; \
515 rm -f "$${dir}/so_locations"; \
516 done
517libpoppler-qt4.la: $(libpoppler_qt4_la_OBJECTS) $(libpoppler_qt4_la_DEPENDENCIES) $(EXTRA_libpoppler_qt4_la_DEPENDENCIES)
518 $(AM_V_CXXLD)$(libpoppler_qt4_la_LINK) -rpath $(libdir) $(libpoppler_qt4_la_OBJECTS) $(libpoppler_qt4_la_LIBADD) $(LIBS)
519
520mostlyclean-compile:
521 -rm -f *.$(OBJEXT)
522
523distclean-compile:
524 -rm -f *.tab.c
525
526@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-annotation.Plo@am__quote@
527@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-base-converter.Plo@am__quote@
528@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-document.Plo@am__quote@
529@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-embeddedfile.Plo@am__quote@
530@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-fontinfo.Plo@am__quote@
531@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-form.Plo@am__quote@
532@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-link-extractor.Plo@am__quote@
533@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-link.Plo@am__quote@
534@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-media.Plo@am__quote@
535@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-movie.Plo@am__quote@
536@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-optcontent.Plo@am__quote@
537@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-page-transition.Plo@am__quote@
538@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-page.Plo@am__quote@
539@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-pdf-converter.Plo@am__quote@
540@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-private.Plo@am__quote@
541@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-ps-converter.Plo@am__quote@
542@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-qiodeviceoutstream.Plo@am__quote@
543@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-sound.Plo@am__quote@
544@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-textbox.Plo@am__quote@
545
546.cc.o:
547@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
548@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
549@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
550@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
551@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $<
552
553.cc.obj:
554@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
555@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
556@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
557@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
558@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
559
560.cc.lo:
561@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
562@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
563@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
564@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
565@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $<
566
567libpoppler_qt4_la-poppler-document.lo: poppler-document.cc
568@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-document.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-document.Tpo -c -o libpoppler_qt4_la-poppler-document.lo `test -f 'poppler-document.cc' || echo '$(srcdir)/'`poppler-document.cc
569@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-document.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-document.Plo
570@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-document.cc' object='libpoppler_qt4_la-poppler-document.lo' libtool=yes @AMDEPBACKSLASH@
571@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
572@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-document.lo `test -f 'poppler-document.cc' || echo '$(srcdir)/'`poppler-document.cc
573
574libpoppler_qt4_la-poppler-page.lo: poppler-page.cc
575@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-page.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-page.Tpo -c -o libpoppler_qt4_la-poppler-page.lo `test -f 'poppler-page.cc' || echo '$(srcdir)/'`poppler-page.cc
576@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-page.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-page.Plo
577@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-page.cc' object='libpoppler_qt4_la-poppler-page.lo' libtool=yes @AMDEPBACKSLASH@
578@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
579@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-page.lo `test -f 'poppler-page.cc' || echo '$(srcdir)/'`poppler-page.cc
580
581libpoppler_qt4_la-poppler-fontinfo.lo: poppler-fontinfo.cc
582@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-fontinfo.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-fontinfo.Tpo -c -o libpoppler_qt4_la-poppler-fontinfo.lo `test -f 'poppler-fontinfo.cc' || echo '$(srcdir)/'`poppler-fontinfo.cc
583@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-fontinfo.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-fontinfo.Plo
584@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-fontinfo.cc' object='libpoppler_qt4_la-poppler-fontinfo.lo' libtool=yes @AMDEPBACKSLASH@
585@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
586@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-fontinfo.lo `test -f 'poppler-fontinfo.cc' || echo '$(srcdir)/'`poppler-fontinfo.cc
587
588libpoppler_qt4_la-poppler-embeddedfile.lo: poppler-embeddedfile.cc
589@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-embeddedfile.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-embeddedfile.Tpo -c -o libpoppler_qt4_la-poppler-embeddedfile.lo `test -f 'poppler-embeddedfile.cc' || echo '$(srcdir)/'`poppler-embeddedfile.cc
590@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-embeddedfile.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-embeddedfile.Plo
591@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-embeddedfile.cc' object='libpoppler_qt4_la-poppler-embeddedfile.lo' libtool=yes @AMDEPBACKSLASH@
592@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
593@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-embeddedfile.lo `test -f 'poppler-embeddedfile.cc' || echo '$(srcdir)/'`poppler-embeddedfile.cc
594
595libpoppler_qt4_la-poppler-textbox.lo: poppler-textbox.cc
596@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-textbox.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-textbox.Tpo -c -o libpoppler_qt4_la-poppler-textbox.lo `test -f 'poppler-textbox.cc' || echo '$(srcdir)/'`poppler-textbox.cc
597@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-textbox.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-textbox.Plo
598@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-textbox.cc' object='libpoppler_qt4_la-poppler-textbox.lo' libtool=yes @AMDEPBACKSLASH@
599@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
600@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-textbox.lo `test -f 'poppler-textbox.cc' || echo '$(srcdir)/'`poppler-textbox.cc
601
602libpoppler_qt4_la-poppler-link.lo: poppler-link.cc
603@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-link.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-link.Tpo -c -o libpoppler_qt4_la-poppler-link.lo `test -f 'poppler-link.cc' || echo '$(srcdir)/'`poppler-link.cc
604@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-link.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-link.Plo
605@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-link.cc' object='libpoppler_qt4_la-poppler-link.lo' libtool=yes @AMDEPBACKSLASH@
606@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
607@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-link.lo `test -f 'poppler-link.cc' || echo '$(srcdir)/'`poppler-link.cc
608
609libpoppler_qt4_la-poppler-annotation.lo: poppler-annotation.cc
610@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-annotation.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-annotation.Tpo -c -o libpoppler_qt4_la-poppler-annotation.lo `test -f 'poppler-annotation.cc' || echo '$(srcdir)/'`poppler-annotation.cc
611@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-annotation.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-annotation.Plo
612@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-annotation.cc' object='libpoppler_qt4_la-poppler-annotation.lo' libtool=yes @AMDEPBACKSLASH@
613@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
614@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-annotation.lo `test -f 'poppler-annotation.cc' || echo '$(srcdir)/'`poppler-annotation.cc
615
616libpoppler_qt4_la-poppler-link-extractor.lo: poppler-link-extractor.cc
617@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-link-extractor.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-link-extractor.Tpo -c -o libpoppler_qt4_la-poppler-link-extractor.lo `test -f 'poppler-link-extractor.cc' || echo '$(srcdir)/'`poppler-link-extractor.cc
618@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-link-extractor.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-link-extractor.Plo
619@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-link-extractor.cc' object='libpoppler_qt4_la-poppler-link-extractor.lo' libtool=yes @AMDEPBACKSLASH@
620@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
621@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-link-extractor.lo `test -f 'poppler-link-extractor.cc' || echo '$(srcdir)/'`poppler-link-extractor.cc
622
623libpoppler_qt4_la-poppler-optcontent.lo: poppler-optcontent.cc
624@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-optcontent.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-optcontent.Tpo -c -o libpoppler_qt4_la-poppler-optcontent.lo `test -f 'poppler-optcontent.cc' || echo '$(srcdir)/'`poppler-optcontent.cc
625@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-optcontent.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-optcontent.Plo
626@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-optcontent.cc' object='libpoppler_qt4_la-poppler-optcontent.lo' libtool=yes @AMDEPBACKSLASH@
627@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
628@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-optcontent.lo `test -f 'poppler-optcontent.cc' || echo '$(srcdir)/'`poppler-optcontent.cc
629
630libpoppler_qt4_la-poppler-page-transition.lo: poppler-page-transition.cc
631@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-page-transition.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-page-transition.Tpo -c -o libpoppler_qt4_la-poppler-page-transition.lo `test -f 'poppler-page-transition.cc' || echo '$(srcdir)/'`poppler-page-transition.cc
632@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-page-transition.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-page-transition.Plo
633@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-page-transition.cc' object='libpoppler_qt4_la-poppler-page-transition.lo' libtool=yes @AMDEPBACKSLASH@
634@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
635@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-page-transition.lo `test -f 'poppler-page-transition.cc' || echo '$(srcdir)/'`poppler-page-transition.cc
636
637libpoppler_qt4_la-poppler-sound.lo: poppler-sound.cc
638@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-sound.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-sound.Tpo -c -o libpoppler_qt4_la-poppler-sound.lo `test -f 'poppler-sound.cc' || echo '$(srcdir)/'`poppler-sound.cc
639@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-sound.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-sound.Plo
640@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-sound.cc' object='libpoppler_qt4_la-poppler-sound.lo' libtool=yes @AMDEPBACKSLASH@
641@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
642@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-sound.lo `test -f 'poppler-sound.cc' || echo '$(srcdir)/'`poppler-sound.cc
643
644libpoppler_qt4_la-poppler-form.lo: poppler-form.cc
645@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-form.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-form.Tpo -c -o libpoppler_qt4_la-poppler-form.lo `test -f 'poppler-form.cc' || echo '$(srcdir)/'`poppler-form.cc
646@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-form.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-form.Plo
647@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-form.cc' object='libpoppler_qt4_la-poppler-form.lo' libtool=yes @AMDEPBACKSLASH@
648@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
649@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-form.lo `test -f 'poppler-form.cc' || echo '$(srcdir)/'`poppler-form.cc
650
651libpoppler_qt4_la-poppler-base-converter.lo: poppler-base-converter.cc
652@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-base-converter.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-base-converter.Tpo -c -o libpoppler_qt4_la-poppler-base-converter.lo `test -f 'poppler-base-converter.cc' || echo '$(srcdir)/'`poppler-base-converter.cc
653@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-base-converter.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-base-converter.Plo
654@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-base-converter.cc' object='libpoppler_qt4_la-poppler-base-converter.lo' libtool=yes @AMDEPBACKSLASH@
655@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
656@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-base-converter.lo `test -f 'poppler-base-converter.cc' || echo '$(srcdir)/'`poppler-base-converter.cc
657
658libpoppler_qt4_la-poppler-ps-converter.lo: poppler-ps-converter.cc
659@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-ps-converter.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-ps-converter.Tpo -c -o libpoppler_qt4_la-poppler-ps-converter.lo `test -f 'poppler-ps-converter.cc' || echo '$(srcdir)/'`poppler-ps-converter.cc
660@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-ps-converter.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-ps-converter.Plo
661@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-ps-converter.cc' object='libpoppler_qt4_la-poppler-ps-converter.lo' libtool=yes @AMDEPBACKSLASH@
662@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
663@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-ps-converter.lo `test -f 'poppler-ps-converter.cc' || echo '$(srcdir)/'`poppler-ps-converter.cc
664
665libpoppler_qt4_la-poppler-pdf-converter.lo: poppler-pdf-converter.cc
666@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-pdf-converter.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-pdf-converter.Tpo -c -o libpoppler_qt4_la-poppler-pdf-converter.lo `test -f 'poppler-pdf-converter.cc' || echo '$(srcdir)/'`poppler-pdf-converter.cc
667@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-pdf-converter.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-pdf-converter.Plo
668@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-pdf-converter.cc' object='libpoppler_qt4_la-poppler-pdf-converter.lo' libtool=yes @AMDEPBACKSLASH@
669@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
670@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-pdf-converter.lo `test -f 'poppler-pdf-converter.cc' || echo '$(srcdir)/'`poppler-pdf-converter.cc
671
672libpoppler_qt4_la-poppler-qiodeviceoutstream.lo: poppler-qiodeviceoutstream.cc
673@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-qiodeviceoutstream.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-qiodeviceoutstream.Tpo -c -o libpoppler_qt4_la-poppler-qiodeviceoutstream.lo `test -f 'poppler-qiodeviceoutstream.cc' || echo '$(srcdir)/'`poppler-qiodeviceoutstream.cc
674@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-qiodeviceoutstream.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-qiodeviceoutstream.Plo
675@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-qiodeviceoutstream.cc' object='libpoppler_qt4_la-poppler-qiodeviceoutstream.lo' libtool=yes @AMDEPBACKSLASH@
676@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
677@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-qiodeviceoutstream.lo `test -f 'poppler-qiodeviceoutstream.cc' || echo '$(srcdir)/'`poppler-qiodeviceoutstream.cc
678
679libpoppler_qt4_la-poppler-private.lo: poppler-private.cc
680@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-private.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-private.Tpo -c -o libpoppler_qt4_la-poppler-private.lo `test -f 'poppler-private.cc' || echo '$(srcdir)/'`poppler-private.cc
681@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-private.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-private.Plo
682@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-private.cc' object='libpoppler_qt4_la-poppler-private.lo' libtool=yes @AMDEPBACKSLASH@
683@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
684@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-private.lo `test -f 'poppler-private.cc' || echo '$(srcdir)/'`poppler-private.cc
685
686libpoppler_qt4_la-poppler-movie.lo: poppler-movie.cc
687@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-movie.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-movie.Tpo -c -o libpoppler_qt4_la-poppler-movie.lo `test -f 'poppler-movie.cc' || echo '$(srcdir)/'`poppler-movie.cc
688@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-movie.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-movie.Plo
689@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-movie.cc' object='libpoppler_qt4_la-poppler-movie.lo' libtool=yes @AMDEPBACKSLASH@
690@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
691@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-movie.lo `test -f 'poppler-movie.cc' || echo '$(srcdir)/'`poppler-movie.cc
692
693libpoppler_qt4_la-poppler-media.lo: poppler-media.cc
694@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -MT libpoppler_qt4_la-poppler-media.lo -MD -MP -MF $(DEPDIR)/libpoppler_qt4_la-poppler-media.Tpo -c -o libpoppler_qt4_la-poppler-media.lo `test -f 'poppler-media.cc' || echo '$(srcdir)/'`poppler-media.cc
695@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-media.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-media.Plo
696@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-media.cc' object='libpoppler_qt4_la-poppler-media.lo' libtool=yes @AMDEPBACKSLASH@
697@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@
698@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) -c -o libpoppler_qt4_la-poppler-media.lo `test -f 'poppler-media.cc' || echo '$(srcdir)/'`poppler-media.cc
699
700mostlyclean-libtool:
701 -rm -f *.lo
702
703clean-libtool:
704 -rm -rf .libs _libs
705install-poppler_includeHEADERS: $(poppler_include_HEADERS)
706 @$(NORMAL_INSTALL)
707 @list='$(poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \
708 if test -n "$$list"; then \
709 echo " $(MKDIR_P) '$(DESTDIR)$(poppler_includedir)'"; \
710 $(MKDIR_P) "$(DESTDIR)$(poppler_includedir)" || exit 1; \
711 fi; \
712 for p in $$list; do \
713 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
714 echo "$$d$$p"; \
715 done | $(am__base_list) | \
716 while read files; do \
717 echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(poppler_includedir)'"; \
718 $(INSTALL_HEADER) $$files "$(DESTDIR)$(poppler_includedir)" || exit $$?; \
719 done
720
721uninstall-poppler_includeHEADERS:
722 @$(NORMAL_UNINSTALL)
723 @list='$(poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \
724 files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
725 dir='$(DESTDIR)$(poppler_includedir)'; $(am__uninstall_files_from_dir)
726
727ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
728 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
729 unique=`for i in $$list; do \
730 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
731 done | \
732 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
733 END { if (nonempty) { for (i in files) print i; }; }'`; \
734 mkid -fID $$unique
735tags: TAGS
736
737TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
738 $(TAGS_FILES) $(LISP)
739 set x; \
740 here=`pwd`; \
741 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
742 unique=`for i in $$list; do \
743 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
744 done | \
745 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
746 END { if (nonempty) { for (i in files) print i; }; }'`; \
747 shift; \
748 if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
749 test -n "$$unique" || unique=$$empty_fix; \
750 if test $$# -gt 0; then \
751 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
752 "$$@" $$unique; \
753 else \
754 $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
755 $$unique; \
756 fi; \
757 fi
758ctags: CTAGS
759CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
760 $(TAGS_FILES) $(LISP)
761 list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
762 unique=`for i in $$list; do \
763 if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
764 done | \
765 $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
766 END { if (nonempty) { for (i in files) print i; }; }'`; \
767 test -z "$(CTAGS_ARGS)$$unique" \
768 || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
769 $$unique
770
771GTAGS:
772 here=`$(am__cd) $(top_builddir) && pwd` \
773 && $(am__cd) $(top_srcdir) \
774 && gtags -i $(GTAGS_ARGS) "$$here"
775
776distclean-tags:
777 -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
778
779distdir: $(DISTFILES)
780 @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
781 topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
782 list='$(DISTFILES)'; \
783 dist_files=`for file in $$list; do echo $$file; done | \
784 sed -e "s|^$$srcdirstrip/||;t" \
785 -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
786 case $$dist_files in \
787 */*) $(MKDIR_P) `echo "$$dist_files" | \
788 sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
789 sort -u` ;; \
790 esac; \
791 for file in $$dist_files; do \
792 if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
793 if test -d $$d/$$file; then \
794 dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
795 if test -d "$(distdir)/$$file"; then \
796 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
797 fi; \
798 if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
799 cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
800 find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
801 fi; \
802 cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
803 else \
804 test -f "$(distdir)/$$file" \
805 || cp -p $$d/$$file "$(distdir)/$$file" \
806 || exit 1; \
807 fi; \
808 done
809check-am: all-am
810check: $(BUILT_SOURCES)
811 $(MAKE) $(AM_MAKEFLAGS) check-am
812all-am: Makefile $(LTLIBRARIES) $(HEADERS)
813installdirs:
814 for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(poppler_includedir)"; do \
815 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
816 done
817install: $(BUILT_SOURCES)
818 $(MAKE) $(AM_MAKEFLAGS) install-am
819install-exec: install-exec-am
820install-data: install-data-am
821uninstall: uninstall-am
822
823install-am: all-am
824 @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
825
826installcheck: installcheck-am
827install-strip:
828 if test -z '$(STRIP)'; then \
829 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
830 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
831 install; \
832 else \
833 $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
834 install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
835 "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
836 fi
837mostlyclean-generic:
838
839distclean-generic:
840 -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
841 -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
842
843maintainer-clean-generic:
844 @echo "This command is intended for maintainers to use"
845 @echo "it deletes files that may require special tools to rebuild."
846 -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
847clean: clean-am
848
849clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
850 mostlyclean-am
851
852distclean: distclean-am
853 -rm -rf ./$(DEPDIR)
854 -rm -f Makefile
855distclean-am: clean-am distclean-compile distclean-generic \
856 distclean-tags
857
858dvi: dvi-am
859
860dvi-am:
861
862html: html-am
863
864html-am:
865
866info: info-am
867
868info-am:
869
870install-data-am: install-poppler_includeHEADERS
871
872install-dvi: install-dvi-am
873
874install-dvi-am:
875
876install-exec-am: install-libLTLIBRARIES
877
878install-html: install-html-am
879
880install-html-am:
881
882install-info: install-info-am
883
884install-info-am:
885
886install-man:
887
888install-pdf: install-pdf-am
889
890install-pdf-am:
891
892install-ps: install-ps-am
893
894install-ps-am:
895
896installcheck-am:
897
898maintainer-clean: maintainer-clean-am
899 -rm -rf ./$(DEPDIR)
900 -rm -f Makefile
901maintainer-clean-am: distclean-am maintainer-clean-generic
902
903mostlyclean: mostlyclean-am
904
905mostlyclean-am: mostlyclean-compile mostlyclean-generic \
906 mostlyclean-libtool
907
908pdf: pdf-am
909
910pdf-am:
911
912ps: ps-am
913
914ps-am:
915
916uninstall-am: uninstall-libLTLIBRARIES \
917 uninstall-poppler_includeHEADERS
918
919.MAKE: all check install install-am install-strip
920
921.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
922 clean-libLTLIBRARIES clean-libtool ctags distclean \
923 distclean-compile distclean-generic distclean-libtool \
924 distclean-tags distdir dvi dvi-am html html-am info info-am \
925 install install-am install-data install-data-am install-dvi \
926 install-dvi-am install-exec install-exec-am install-html \
927 install-html-am install-info install-info-am \
928 install-libLTLIBRARIES install-man install-pdf install-pdf-am \
929 install-poppler_includeHEADERS install-ps install-ps-am \
930 install-strip installcheck installcheck-am installdirs \
931 maintainer-clean maintainer-clean-generic mostlyclean \
932 mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
933 pdf pdf-am ps ps-am tags uninstall uninstall-am \
934 uninstall-libLTLIBRARIES uninstall-poppler_includeHEADERS
935
936
937SUFFIXES: .moc
938
939# This rule lets GNU make create any *.moc from the equivalent *.h
940.h.moc:
941 $(AM_V_GEN) $(MOCQT4) -i $< -o $@
942
943clean-generic:
944 rm -f *.moc
945
946# Tell versions [3.59,3.63) of GNU make to not export all variables.
947# Otherwise a system limit (for SysV at least) may be exceeded.
948.NOEXPORT:
0949
=== added file '.pc/qt4-visibility.diff/qt4/src/poppler-export.h'
--- .pc/qt4-visibility.diff/qt4/src/poppler-export.h 1970-01-01 00:00:00 +0000
+++ .pc/qt4-visibility.diff/qt4/src/poppler-export.h 2012-11-16 16:39:27 +0000
@@ -0,0 +1,17 @@
1/*
2* This file is used to set the poppler_qt4_EXPORT macros right.
3* This is needed for setting the visibility on windows, it will have no effect on other platforms.
4*/
5#if defined(_WIN32)
6# define LIB_EXPORT __declspec(dllexport)
7# define LIB_IMPORT __declspec(dllimport)
8#else
9# define LIB_EXPORT
10# define LIB_IMPORT
11#endif
12
13#ifdef poppler_qt4_EXPORTS
14# define POPPLER_QT4_EXPORT LIB_EXPORT
15#else
16# define POPPLER_QT4_EXPORT LIB_IMPORT
17#endif
018
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2012-06-07 17:13:58 +0000
+++ CMakeLists.txt 2012-11-16 16:39:27 +0000
@@ -16,7 +16,7 @@
1616
17set(POPPLER_MAJOR_VERSION "0")17set(POPPLER_MAJOR_VERSION "0")
18set(POPPLER_MINOR_VERSION "20")18set(POPPLER_MINOR_VERSION "20")
19set(POPPLER_MICRO_VERSION "0")19set(POPPLER_MICRO_VERSION "4")
20set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}")20set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}")
2121
22# command line switches22# command line switches
@@ -386,7 +386,7 @@
386else(MSVC)386else(MSVC)
387add_library(poppler SHARED ${poppler_SRCS})387add_library(poppler SHARED ${poppler_SRCS})
388endif(MSVC)388endif(MSVC)
389set_target_properties(poppler PROPERTIES VERSION 25.0.0 SOVERSION 25)389set_target_properties(poppler PROPERTIES VERSION 28.0.0 SOVERSION 28)
390target_link_libraries(poppler ${poppler_LIBS})390target_link_libraries(poppler ${poppler_LIBS})
391target_link_libraries(poppler LINK_INTERFACE_LIBRARIES "")391target_link_libraries(poppler LINK_INTERFACE_LIBRARIES "")
392install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})392install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX})
393393
=== modified file 'ChangeLog'
--- ChangeLog 2012-06-07 17:13:58 +0000
+++ ChangeLog 2012-11-16 16:39:27 +0000
@@ -1,3 +1,687 @@
1commit 5fd691dc58aac817bca81c87c4820afcf53989d1
2Author: Albert Astals Cid <aacid@kde.org>
3Date: Mon Sep 10 19:29:01 2012 +0200
4
5 0.20.40.20.40.20.40.20.4
6
7 CMakeLists.txt | 4 ++--
8 NEWS | 13 +++++++++++++
9 configure.ac | 2 +-
10 cpp/Doxyfile | 2 +-
11 poppler/Makefile.am | 2 +-
12 qt4/src/Doxyfile | 2 +-
13 6 files changed, 19 insertions(+), 6 deletions(-)
14
15commit b3e86dbdba82956f125e37f69176072e2d0127f2
16Author: Thomas Freitag <Thomas.Freitag@kabelmail.de>
17Date: Sun Sep 9 23:35:45 2012 +0200
18
19 Try to find another rootNum if actual rootNum doesn't point to a dict
20
21 Bug #14303
22
23 poppler/XRef.cc | 14 ++++++++++++--
24 poppler/XRef.h | 4 ++--
25 2 files changed, 14 insertions(+), 4 deletions(-)
26
27commit 558a7d9b046bbbe185dea263b48a3cb2664378fc
28Author: Thomas Freitag <Thomas.Freitag@alfa.de>
29Date: Sun Sep 9 23:25:47 2012 +0200
30
31 Fix invalid memory access in solves 1066.pdf.asan.38.75
32
33 splash/SplashClip.cc | 23 +++++++++++++++++++++++
34 splash/SplashXPathScanner.cc | 3 +++
35 2 files changed, 26 insertions(+)
36
37commit d0df8e54512f584ca2b3edbae1c19e167948e5c3
38Author: Thomas Freitag <Thomas.Freitag@alfa.de>
39Date: Sun Sep 9 23:21:38 2012 +0200
40
41 Fix invalid memory access in 1106.pdf.asan.30.120.patch
42
43 poppler/Function.cc | 5 +++++
44 1 file changed, 5 insertions(+)
45
46commit 86b89864396a1dcf027e5793e6ac75411977bcf9
47Author: Thomas Freitag <Thomas.Freitag@kabelmail.de>
48Date: Sun Sep 9 23:08:49 2012 +0200
49
50 Fix crash in 1255.pdf.SIGSEGV.56f.285
51
52 poppler/XRef.cc | 6 ++++++
53 1 file changed, 6 insertions(+)
54
55commit 96931732f343d2bbda9af9488b485da031866c3b
56Author: Thomas Freitag <Thomas.Freitag@alfa.de>
57Date: Sun Sep 9 22:47:57 2012 +0200
58
59 Fix invalid memory access in 61.pdf.asan.13.95
60
61 fofi/FoFiType1C.cc | 25 +++++++++++++++++--------
62 fofi/FoFiType1C.h | 2 ++
63 2 files changed, 19 insertions(+), 8 deletions(-)
64
65commit 26917d69c4da6a110db02b120133c36579fbb17c
66Author: Albert Astals Cid <aacid@kde.org>
67Date: Sun Sep 9 22:23:36 2012 +0200
68
69 Add unlikely
70
71 poppler/Gfx.cc | 2 +-
72 1 file changed, 1 insertion(+), 1 deletion(-)
73
74commit e6a3c797c01aa343f640f2e6f45de5bf379aa8ad
75Author: Thomas Freitag <Thomas.Freitag@alfa.de>
76Date: Sun Sep 9 22:22:59 2012 +0200
77
78 Fix wrong memory access in 68.pdf.asan.7.1030
79
80 poppler/Gfx.cc | 4 ++++
81 1 file changed, 4 insertions(+)
82
83commit 48fe18cf277cd2a4e665c74b3a594482f762f4b6
84Author: Albert Astals Cid <aacid@kde.org>
85Date: Sun Sep 9 22:09:44 2012 +0200
86
87 Fix memory leak
88
89 poppler/Gfx.cc | 1 +
90 1 file changed, 1 insertion(+)
91
92commit b87aafc0cdb36c3555053f2684c45f1a9d7b2f94
93Author: Albert Astals Cid <aacid@kde.org>
94Date: Sun Sep 9 21:42:48 2012 +0200
95
96 Add unlikelys to the ifs
97
98 poppler/DCTStream.cc | 4 ++--
99 poppler/JBIG2Stream.cc | 2 +-
100 2 files changed, 3 insertions(+), 3 deletions(-)
101
102commit a019eef2f8ca53addd7ccab7f9c47657f4e52286
103Author: Thomas Freitag <Thomas.Freitag@alfa.de>
104Date: Sun Sep 9 21:41:09 2012 +0200
105
106 Fix crash in 1162.pdf.SIGSEGV.28e.182
107
108 poppler/DCTStream.cc | 4 ++++
109 1 file changed, 4 insertions(+)
110
111commit ad7c6ac88f2315c9ce003308d1b4988592d4434b
112Author: William Bader <williambader@hotmail.com>
113Date: Sun Sep 9 21:31:58 2012 +0200
114
115 Fix crash in 1028.pdf.SIGSEGV.ae6.33
116
117 poppler/JBIG2Stream.cc | 8 ++++++++
118 1 file changed, 8 insertions(+)
119
120commit b861af714daee4125e54b250dddf82106f5a8ce8
121Author: Albert Astals Cid <aacid@kde.org>
122Date: Sun Sep 9 21:15:06 2012 +0200
123
124 Fix memory leak
125
126 poppler/Form.cc | 2 +-
127 1 file changed, 1 insertion(+), 1 deletion(-)
128
129commit a4f59113574a8d7460c6ce5000cb09d20fe52b74
130Author: Albert Astals Cid <aacid@kde.org>
131Date: Sun Sep 9 12:49:43 2012 +0200
132
133 Fix memory leak
134
135 poppler/Annot.cc | 3 ++-
136 1 file changed, 2 insertions(+), 1 deletion(-)
137
138commit 28240046f8fe37ca96f9a80cb1ea3a59af9c66f3
139Author: Thomas Freitag <Thomas.Freitag@alfa.de>
140Date: Sun Sep 9 12:48:26 2012 +0200
141
142 Fix crash in 589.pdf.SIGSEGV.8b1.929
143
144 poppler/Annot.cc | 8 ++++++++
145 1 file changed, 8 insertions(+)
146
147commit ccd3db5a7723ddb692f6dc85ed9d0f5e3dde189f
148Author: Albert Astals Cid <aacid@kde.org>
149Date: Sat Sep 8 18:10:14 2012 +0200
150
151 Only complain when the malloc really failed
152
153 poppler/JBIG2Stream.cc | 2 +-
154 1 file changed, 1 insertion(+), 1 deletion(-)
155
156commit 6356c0bbae47db291a3585d31c7727bc3f8d97a4
157Author: Albert Astals Cid <aacid@kde.org>
158Date: Thu Aug 30 00:57:51 2012 +0200
159
160 qt4: unbreak spacing
161
162 qt4/src/poppler-embeddedfile.cc | 6 +++---
163 1 file changed, 3 insertions(+), 3 deletions(-)
164
165commit 46948868dee6d4e68b658c68d7df482590e34da3
166Author: Albert Astals Cid <aacid@kde.org>
167Date: Thu Aug 30 00:43:45 2012 +0200
168
169 Accept FileSpec as Dict too and not only as Ref
170
171 File to try in KDE bug #306008
172
173 poppler/Catalog.cc | 4 +++-
174 1 file changed, 3 insertions(+), 1 deletion(-)
175
176commit debc8fb497bc22c0f9f34d785852981a87475c30
177Author: Albert Astals Cid <aacid@kde.org>
178Date: Thu Aug 30 00:35:40 2012 +0200
179
180 Take into account the embFile returned by the core may be NULL
181
182 qt4/src/poppler-embeddedfile-private.h | 4 +++-
183 qt4/src/poppler-embeddedfile.cc | 19 ++++++++++++-------
184 2 files changed, 15 insertions(+), 8 deletions(-)
185
186commit 3ca67a59fc15782abb1e479eb2b8916de5b1b6ed
187Author: Albert Astals Cid <aacid@kde.org>
188Date: Thu Aug 30 00:34:06 2012 +0200
189
190 Return NULL EmbFile if the FileSpec is not ok
191
192 Otherwise we might end up asserting
193
194 poppler/FileSpec.cc | 4 ++++
195 1 file changed, 4 insertions(+)
196
197commit 686ec0cc92e25f74eaa9e09a328724cbdf939bca
198Author: Albert Astals Cid <aacid@kde.org>
199Date: Wed Aug 15 20:02:05 2012 +0200
200
201 Remove declared but not implemented function
202
203 poppler/XRef.h | 1 -
204 1 file changed, 1 deletion(-)
205
206commit e83568065f77ba722b147b3b10faed1ff66f22dc
207Author: Pino Toscano <pino@kde.org>
208Date: Sat Aug 11 01:38:08 2012 +0200
209
210 remove extra execution permissions
211
212 (cherry picked from commit 9a5a19ee2f9cd536c3527b30c0256ca9dce3638c)
213
214 0 files changed
215
216commit 1b2903c104012fdd3c982d57898910945dff9a15
217Author: Albert Astals Cid <aacid@kde.org>
218Date: Sat Aug 11 00:05:10 2012 +0200
219
220 0.20.3
221
222 CMakeLists.txt | 4 ++--
223 NEWS | 16 ++++++++++++++++
224 configure.ac | 2 +-
225 cpp/Doxyfile | 2 +-
226 poppler/Makefile.am | 2 +-
227 qt4/src/Doxyfile | 2 +-
228 6 files changed, 22 insertions(+), 6 deletions(-)
229
230commit 40e7b744d32152ab4c6201b8bda7fb7caf6bfd4e
231Author: Albert Astals Cid <aacid@kde.org>
232Date: Sun Aug 5 15:07:16 2012 +0200
233
234 If NULL, NULL fails as password try EMPTY, EMPTY before failing
235
236 Reviewed by Jose Aliste
237 Bug #3498
238
239 poppler/SecurityHandler.cc | 7 ++++++-
240 1 file changed, 6 insertions(+), 1 deletion(-)
241
242commit 3ca2bc0d3abdf92741b7921ea402c9de09e531f6
243Author: Markus Trippelsdorf <markus@trippelsdorf.de>
244Date: Fri Aug 3 00:48:12 2012 +0200
245
246 Fix segfault when scaleImage returns NULL
247
248 Bug 52488
249
250 splash/Splash.cc | 7 +++++++
251 1 file changed, 7 insertions(+)
252
253commit 768cf5877f48f8cee80fe96e2ee52f42f230dfdf
254Author: Thomas Freitag <Thomas.Freitag@alfa.de>
255Date: Thu Aug 2 00:22:19 2012 +0200
256
257 PSOutputDev: Fix Bitmaps in level2sep or level3sep
258
259 Bug #52384
260
261 poppler/PSOutputDev.cc | 4 ++--
262 1 file changed, 2 insertions(+), 2 deletions(-)
263
264commit 315447843a368556a8536bc30e579c9bf338682e
265Author: Thomas Freitag <Thomas.Freitag@alfa.de>
266Date: Wed Aug 1 22:56:49 2012 +0200
267
268 Splash: Blend mode enhancements for CMYK
269
270 poppler/SplashOutputDev.cc | 76
271 +++++++++++++++++++++++++++++++-------------
272 splash/Splash.cc | 22 -------------
273 2 files changed, 54 insertions(+), 44 deletions(-)
274
275commit c0c88b3707fc7337e814ae4252d80002641a19ee
276Author: Albert Astals Cid <aacid@kde.org>
277Date: Tue Jul 31 23:32:19 2012 +0200
278
279 Replace c++ style includes with c style ones
280
281 Fixes build in Solaris 10
282 Bug #52426
283
284 goo/gstrtod.cc | 10 +++++-----
285 1 file changed, 5 insertions(+), 5 deletions(-)
286
287commit dcbc923bd3592a81876f84005fbaddcea18641cc
288Author: Thomas Freitag <Thomas.Freitag@alfa.de>
289Date: Sun Jul 22 18:40:46 2012 +0200
290
291 Make sure xScale and yScale are always initialized
292
293 Bug #52215
294
295 poppler/PSOutputDev.cc | 5 +----
296 1 file changed, 1 insertion(+), 4 deletions(-)
297
298commit ef7c2418e12d3e6a79f1d89a0051b005fadbc344
299Author: Thomas Freitag <Thomas.Freitag@alfa.de>
300Date: Sat Jul 21 00:01:49 2012 +0200
301
302 Fix conversion to ps when having multiple strips
303
304 Bug 51982
305
306 poppler/PSOutputDev.cc | 4 +++-
307 1 file changed, 3 insertions(+), 1 deletion(-)
308
309commit 349b21acc249c130fb053bc4a0c75019f75bd35b
310Author: Torsten Kasch <tk@CeBiTec.Uni-Bielefeld.DE>
311Date: Thu Jul 19 00:18:14 2012 +0200
312
313 Unify poppler-config.h includes in core "installed" headers
314
315 Bug 52193
316
317 goo/FixedPoint.h | 2 +-
318 goo/GooTimer.h | 2 +-
319 goo/JpegWriter.h | 2 +-
320 goo/PNGWriter.h | 2 +-
321 goo/TiffWriter.h | 2 +-
322 goo/gfile.h | 2 +-
323 goo/gmem.h | 2 +-
324 splash/SplashFTFont.h | 2 +-
325 splash/SplashMath.h | 2 +-
326 9 files changed, 9 insertions(+), 9 deletions(-)
327
328commit 15c6ae699f083ea6c9716c1098ae9833a56eeb3e
329Author: Torsten Kasch <tk@CeBiTec.Uni-Bielefeld.DE>
330Date: Thu Jul 19 00:06:45 2012 +0200
331
332 autoconf: Do not assume the shell is bash compatible
333
334 Bug 52197
335
336 configure.ac | 2 +-
337 1 file changed, 1 insertion(+), 1 deletion(-)
338
339commit f5311da76ec7cd7c1e6cdfc4e18df6dd56e8398b
340Author: Albert Astals Cid <aacid@kde.org>
341Date: Thu Jul 19 00:01:49 2012 +0200
342
343 pdfseparate: Return 0 on success
344
345 utils/pdfseparate.cc | 6 +++++-
346 1 file changed, 5 insertions(+), 1 deletion(-)
347
348commit 51f22ca0badfc41c19cba66cabd63184244f81c7
349Author: Thomas Freitag <Thomas.Freitag@alfa.de>
350Date: Mon Jul 16 23:32:23 2012 +0200
351
352 PSOutputDev: Fix DeviceN images with alternate Lab colorspace in
353 level 3 PostScript
354
355 Bug #51822
356
357 poppler/PSOutputDev.cc | 54
358 +++++++++++++++++++++++++++++++++++++++++-------
359 poppler/PSOutputDev.h | 2 +-
360 2 files changed, 48 insertions(+), 8 deletions(-)
361
362commit 950d5f3dec4bff5d3c523d55689d7b70215dc110
363Author: Thomas Freitag <Thomas.Freitag@alfa.de>
364Date: Fri Jul 13 00:56:48 2012 +0200
365
366 Fix Splash::arbitraryTransformImage causes bogus memory allocation
367 size
368
369 Bug #49523
370
371 poppler/SplashOutputDev.cc | 2 +-
372 splash/Splash.cc | 79
373 +++++++++++++++++++++++++-------------------
374 splash/Splash.h | 4 +--
375 3 files changed, 48 insertions(+), 37 deletions(-)
376
377commit e09be3bc6ba1290fd31bde0c3d19c4ffcbadbf00
378Author: Albert Astals Cid <aacid@kde.org>
379Date: Tue Jul 10 23:06:53 2012 +0200
380
381 0.20.2
382
383 CMakeLists.txt | 2 +-
384 NEWS | 11 +++++++++++
385 configure.ac | 2 +-
386 cpp/Doxyfile | 2 +-
387 qt4/src/Doxyfile | 2 +-
388 5 files changed, 15 insertions(+), 4 deletions(-)
389
390commit e15fe0e1e6accf779caeb1179a8d62161c0aa650
391Author: Thomas Freitag <Thomas.Freitag@alfa.de>
392Date: Thu Jul 5 17:44:02 2012 +0200
393
394 Fix handling of DeviceN images in level 3 PostScript
395
396 bug #51548
397
398 poppler/PSOutputDev.cc | 14 --------------
399 1 file changed, 14 deletions(-)
400
401commit 02c4e6bf4cc0f5535946fe31815081a40b1de986
402Author: Albert Astals Cid <aacid@kde.org>
403Date: Fri Jun 29 01:56:55 2012 +0200
404
405 PSOutputDev: Correct %%DocumentCustomColors
406
407 Bug 51479
408
409 poppler/PSOutputDev.cc | 20 ++++++++++++++++++++
410 1 file changed, 20 insertions(+)
411
412commit f7990386d268a444c297958e9c50ed27a0825a00
413Author: Albert Astals Cid <aacid@kde.org>
414Date: Thu Jun 28 00:18:07 2012 +0200
415
416 Add some security checks to JPXStream decoding
417
418 Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk
419 and Gynvael Coldwind
420
421 poppler/JPXStream.cc | 14 ++++++++++++--
422 1 file changed, 12 insertions(+), 2 deletions(-)
423
424commit c5c6eed1623506e1206e89cee0b7c887d815ba62
425Author: Albert Astals Cid <aacid@kde.org>
426Date: Sun Jun 24 23:43:03 2012 +0200
427
428 Change SplashBitmap gmallocn to gmallocn_checkoverflow
429
430 Fixes abort in KDE bug #302372
431
432 splash/Splash.cc | 37 +++++++++++++++++++++++--------------
433 splash/SplashBitmap.cc | 18 +++++++++++-------
434 2 files changed, 34 insertions(+), 21 deletions(-)
435
436commit c87738ee234aafc6eda5a263ad789205037020e1
437Author: Thomas Freitag <Thomas.Freitag@alfa.de>
438Date: Sun Jun 24 20:20:38 2012 +0200
439
440 copy resources content defined in the pages dict
441
442 Fixes bug #51369
443
444 poppler/PDFDoc.cc | 16 ++++++++++++++--
445 1 file changed, 14 insertions(+), 2 deletions(-)
446
447commit 6cdf879e389f05abba30b3fad8083b7fff23056e
448Author: Fabio D'Urso <fabiodurso@hotmail.it>
449Date: Sun Jun 24 11:48:04 2012 +0200
450
451 qt4: Do not hang on malformed /Annots objects
452
453 Don't recurse infinitely if the /Annots object contains annotation
454 dictionaries (according to specs, /Annots must contain *references*
455 to annotation dictionaries).
456
457 Fixes bug #51361
458
459 qt4/src/poppler-annotation.cc | 5 +++++
460 1 file changed, 5 insertions(+)
461
462commit 3575becd60585324bcefc0631b1bac47c1db3c5c
463Author: Mark Brand <mabrand@mabrand.nl>
464Date: Thu Jun 14 20:31:26 2012 +0200
465
466 fix typo to compile in Windows
467
468 poppler/GlobalParamsWin.cc | 3 ++-
469 1 file changed, 2 insertions(+), 1 deletion(-)
470
471commit 06618065c8a97a5bec125560546b98edfc1210f3
472Author: Albert Astals Cid <aacid@kde.org>
473Date: Mon Jun 11 15:17:59 2012 +0200
474
475 Add some security checks to JBIG2Stream decoding
476
477 Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk
478 and Gynvael Coldwind
479
480 poppler/JBIG2Stream.cc | 58
481 ++++++++++++++++++++++++++++++++++++------------
482 1 file changed, 44 insertions(+), 14 deletions(-)
483
484commit e3fe88df3646a80945210ba426eb4681a98b55e9
485Author: Hib Eris <hib@hiberis.nl>
486Date: Sun Jun 10 19:44:18 2012 +0200
487
488 Check value of first page in linearization table
489
490 Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk
491 and Gynvael Coldwind
492
493 poppler/Linearization.cc | 4 ++--
494 1 file changed, 2 insertions(+), 2 deletions(-)
495
496commit 1240eee8c0d0d01113443e0fda87721775a76da9
497Author: Albert Astals Cid <aacid@kde.org>
498Date: Sun Jun 10 20:42:55 2012 +0200
499
500 0.20.1
501
502 CMakeLists.txt | 4 ++--
503 NEWS | 25 +++++++++++++++++++++++++
504 configure.ac | 2 +-
505 cpp/Doxyfile | 2 +-
506 poppler/Makefile.am | 2 +-
507 qt4/src/Doxyfile | 2 +-
508 6 files changed, 31 insertions(+), 6 deletions(-)
509
510commit c783037619e2b4c101e8ecd7e61c94ee077b4be2
511Author: Albert Astals Cid <aacid@kde.org>
512Date: Sun Jun 10 20:15:01 2012 +0200
513
514 Update copyrights
515
516 poppler/GlobalParamsWin.cc | 1 +
517 1 file changed, 1 insertion(+)
518
519commit f3f9d8f28a97338da92c842d5668b0ef3495ef13
520Author: Albert Astals Cid <aacid@kde.org>
521Date: Sun Jun 10 19:09:17 2012 +0200
522
523 Do use NULL function
524
525 Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk
526 and Gynvael Coldwind
527
528 poppler/Gfx.cc | 5 +++--
529 1 file changed, 3 insertions(+), 2 deletions(-)
530
531commit 92ef16e3699da949c80716c3fd4b438fe79c134d
532Author: Thomas Freitag <Thomas.Freitag@alfa.de>
533Date: Sun Jun 10 16:58:54 2012 +0200
534
535 use setoverprintmode only if rip knows it
536
537 poppler/PSOutputDev.cc | 6 +++---
538 1 file changed, 3 insertions(+), 3 deletions(-)
539
540commit 99aa734ae2d3ba51f840d4c8ef450488fb702a31
541Author: Fabio D'Urso <fabiodurso@hotmail.it>
542Date: Thu May 24 23:17:27 2012 +0200
543
544 qt4: Keep page rotation into account when normalizing annotation
545 coords
546
547 If the page is rotated by 90 or 270 degrees, width and height need
548 to be swapped
549
550 qt4/src/poppler-annotation.cc | 16 ++++++++++++++--
551 1 file changed, 14 insertions(+), 2 deletions(-)
552
553commit bde31ce7b223abc86d25e06f3d73668b792c70df
554Author: Fabio D'Urso <fabiodurso@hotmail.it>
555Date: Sat Jun 9 01:31:29 2012 +0200
556
557 Fix saving to xml
558
559 The default icon is Note not comment
560
561 qt4/src/poppler-annotation.cc | 2 +-
562 1 file changed, 1 insertion(+), 1 deletion(-)
563
564commit 9904b8f10abf068a7816bd90976ccbb320387645
565Author: Adrian Johnson <ajohnson@redneon.com>
566Date: Thu May 24 18:24:48 2012 +0930
567
568 glib docs: fix typo
569
570 glib/poppler-document.cc | 4 ++--
571 1 file changed, 2 insertions(+), 2 deletions(-)
572
573commit 028f580056f99719cfb8af7bbe8184ceac02cb16
574Author: Adrian Johnson <ajohnson@redneon.com>
575Date: Sun May 13 21:36:36 2012 +0930
576
577 add sustitute font name to GlobalParamsWin32 to fix compilation
578
579 poppler/GlobalParamsWin.cc | 5 ++++-
580 1 file changed, 4 insertions(+), 1 deletion(-)
581
582commit 1916d000a86336213ffd6e9bd44ce873e8955895
583Author: Adrian Johnson <ajohnson@redneon.com>
584Date: Sat May 12 16:31:38 2012 +0930
585
586 Include substitute font name in system font cache
587
588 Bug 49826
589
590 poppler/FontInfo.cc | 1 +
591 poppler/GlobalParams.cc | 58
592 ++++++++++++++++++++++++++---------------------
593 2 files changed, 33 insertions(+), 26 deletions(-)
594
595commit 1c6e84555572a6bf3a2e3fbe9a54b40f11c122ad
596Author: Fabio D'Urso <fabiodurso@hotmail.it>
597Date: Fri May 18 16:22:46 2012 +0200
598
599 qt4: Make TextAnnotation ctor public
600
601 qt4/src/poppler-annotation.h | 2 +-
602 1 file changed, 1 insertion(+), 1 deletion(-)
603
604commit 8e504bf2543621973fdaddbd29055ce435540146
605Author: Ville Skyttä <ville.skytta@iki.fi>
606Date: Wed May 16 23:49:01 2012 +0300
607
608 pdfseparate.1: Syntax fixes.
609
610 utils/pdfseparate.1 | 6 +++---
611 1 file changed, 3 insertions(+), 3 deletions(-)
612
613commit 9f7d919e68a26bb7dd809986d8394fe20b750bd0
614Author: Anthony Wesley <awesley@smartnetworks.com.au>
615Date: Thu May 17 19:54:47 2012 +0200
616
617 Fix logic on SplashBitmap::writeImgFile
618
619 splash/SplashBitmap.cc | 3 ++-
620 1 file changed, 2 insertions(+), 1 deletion(-)
621
622commit 7e7997e12faccf4c0513811b324a2fd0fa960a96
623Author: Igor Slepchin <igor.slepchin@gmail.com>
624Date: Tue May 15 23:16:27 2012 +0200
625
626 Determine if font is bold or italic based on FontDescriptor.
627
628 Bug #49758
629
630 utils/HtmlFonts.cc | 24 ++++++++++++++++++------
631 utils/HtmlFonts.h | 3 ++-
632 utils/HtmlOutputDev.cc | 4 +---
633 3 files changed, 21 insertions(+), 10 deletions(-)
634
635commit 329bb1e2b4f4b58832847bcf805d19ac0fd5ef02
636Author: Carlos Garcia Campos <carlosgc@gnome.org>
637Date: Sun May 13 19:45:55 2012 +0200
638
639 glib: Make sure password is always converted to latin1
640
641 Remove the utf8 validation since glib API is supposed to always
642 receive
643 utf8 strings.
644
645 glib/poppler-document.cc | 38 +++++++++++++++++++-------------------
646 1 file changed, 19 insertions(+), 19 deletions(-)
647
648commit 7714b4e319c48ee915061a172208245ae7c4141b
649Author: Carlos Garcia Campos <carlosgc@gnome.org>
650Date: Sun May 13 19:30:17 2012 +0200
651
652 glib: Fix memory leak when document fails to load
653
654 glib/poppler-document.cc | 3 +--
655 1 file changed, 1 insertion(+), 2 deletions(-)
656
657commit 13d2aa303eb1fd900f1045efec14af8002477b02
658Author: Thomas Freitag <Thomas.Freitag@alfa.de>
659Date: Sun May 13 17:25:15 2012 +0200
660
661 remove unnecesary transparency group handling in splash
662
663 Bug #13487
664
665 poppler/Gfx.cc | 64
666 +++++++++++++++++++++++++++++++++++++++++++-
667 poppler/Gfx.h | 4 ++-
668 poppler/GfxState.cc | 4 ++-
669 poppler/OutputDev.h | 1 +
670 poppler/SplashOutputDev.cc | 11 ++++++++
671 poppler/SplashOutputDev.h | 1 +
672 6 files changed, 82 insertions(+), 3 deletions(-)
673
674commit a76867003a7bff5ab03016156c75b4c928788d50
675Author: Albert Astals Cid <aacid@kde.org>
676Date: Sun May 13 13:10:40 2012 +0200
677
678 Distribute cmake/modules/FindLCMS2.cmake
679
680 Bug #49818
681
682 Makefile.am | 1 +
683 1 file changed, 1 insertion(+)
684
1commit 4114c928fa2560937e02319f57937f1c267a9817685commit 4114c928fa2560937e02319f57937f1c267a9817
2Author: Albert Astals Cid <aacid@kde.org>686Author: Albert Astals Cid <aacid@kde.org>
3Date: Thu May 10 21:09:14 2012 +0200687Date: Thu May 10 21:09:14 2012 +0200
4688
=== modified file 'Makefile.am'
--- Makefile.am 2012-06-07 17:13:58 +0000
+++ Makefile.am 2012-11-16 16:39:27 +0000
@@ -76,6 +76,7 @@
76 cmake/modules/FindGTK.cmake \76 cmake/modules/FindGTK.cmake \
77 cmake/modules/FindIconv.cmake \77 cmake/modules/FindIconv.cmake \
78 cmake/modules/FindLCMS.cmake \78 cmake/modules/FindLCMS.cmake \
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches