Merge lp:~matttbe/ubuntu/quantal/poppler/lp1072129 into lp:ubuntu/quantal-proposed/poppler
- Quantal (12.10)
- lp1072129
- Merge into quantal-proposed
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 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Sebastien Bacher | Approve | ||
Review via email: mp+134708@code.launchpad.net |
Commit message
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:/
- Ubuntu Quantal 12.10: https:/
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
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
1 | === added file '.pc/.quilt_patches' | |||
2 | --- .pc/.quilt_patches 1970-01-01 00:00:00 +0000 | |||
3 | +++ .pc/.quilt_patches 2012-11-16 16:39:27 +0000 | |||
4 | @@ -0,0 +1,1 @@ | |||
5 | 1 | debian/patches | ||
6 | 0 | 2 | ||
7 | === added file '.pc/.quilt_series' | |||
8 | --- .pc/.quilt_series 1970-01-01 00:00:00 +0000 | |||
9 | +++ .pc/.quilt_series 2012-11-16 16:39:27 +0000 | |||
10 | @@ -0,0 +1,1 @@ | |||
11 | 1 | series | ||
12 | 0 | 2 | ||
13 | === modified file '.pc/applied-patches' | |||
14 | --- .pc/applied-patches 2012-06-07 17:13:58 +0000 | |||
15 | +++ .pc/applied-patches 2012-11-16 16:39:27 +0000 | |||
16 | @@ -1,1 +1,3 @@ | |||
17 | 1 | ltmain-as-needed.diff | 1 | ltmain-as-needed.diff |
18 | 2 | qt4-visibility.diff | ||
19 | 3 | git_gouraud_shading_support.patch | ||
20 | 2 | 4 | ||
21 | === added directory '.pc/git_gouraud_shading_support.patch' | |||
22 | === added directory '.pc/git_gouraud_shading_support.patch/poppler' | |||
23 | === added file '.pc/git_gouraud_shading_support.patch/poppler/CairoOutputDev.cc' | |||
24 | --- .pc/git_gouraud_shading_support.patch/poppler/CairoOutputDev.cc 1970-01-01 00:00:00 +0000 | |||
25 | +++ .pc/git_gouraud_shading_support.patch/poppler/CairoOutputDev.cc 2012-11-16 16:39:27 +0000 | |||
26 | @@ -0,0 +1,3121 @@ | |||
27 | 1 | //======================================================================== | ||
28 | 2 | // | ||
29 | 3 | // CairoOutputDev.cc | ||
30 | 4 | // | ||
31 | 5 | // Copyright 2003 Glyph & Cog, LLC | ||
32 | 6 | // Copyright 2004 Red Hat, Inc | ||
33 | 7 | // | ||
34 | 8 | //======================================================================== | ||
35 | 9 | |||
36 | 10 | //======================================================================== | ||
37 | 11 | // | ||
38 | 12 | // Modified under the Poppler project - http://poppler.freedesktop.org | ||
39 | 13 | // | ||
40 | 14 | // All changes made under the Poppler project to this file are licensed | ||
41 | 15 | // under GPL version 2 or later | ||
42 | 16 | // | ||
43 | 17 | // Copyright (C) 2005-2008 Jeff Muizelaar <jeff@infidigm.net> | ||
44 | 18 | // Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com> | ||
45 | 19 | // Copyright (C) 2005, 2009, 2012 Albert Astals Cid <aacid@kde.org> | ||
46 | 20 | // Copyright (C) 2005 Nickolay V. Shmyrev <nshmyrev@yandex.ru> | ||
47 | 21 | // Copyright (C) 2006-2011 Carlos Garcia Campos <carlosgc@gnome.org> | ||
48 | 22 | // Copyright (C) 2008 Carl Worth <cworth@cworth.org> | ||
49 | 23 | // Copyright (C) 2008-2012 Adrian Johnson <ajohnson@redneon.com> | ||
50 | 24 | // Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu> | ||
51 | 25 | // Copyright (C) 2008, 2009 Chris Wilson <chris@chris-wilson.co.uk> | ||
52 | 26 | // Copyright (C) 2008 Hib Eris <hib@hiberis.nl> | ||
53 | 27 | // Copyright (C) 2009, 2010 David Benjamin <davidben@mit.edu> | ||
54 | 28 | // Copyright (C) 2011, 2012 Thomas Freitag <Thomas.Freitag@alfa.de> | ||
55 | 29 | // Copyright (C) 2012 Patrick Pfeifer <p2000@mailinator.com> | ||
56 | 30 | // | ||
57 | 31 | // To see a description of the changes please see the Changelog file that | ||
58 | 32 | // came with your tarball or type make ChangeLog if you are building from git | ||
59 | 33 | // | ||
60 | 34 | //======================================================================== | ||
61 | 35 | |||
62 | 36 | #include <config.h> | ||
63 | 37 | |||
64 | 38 | #ifdef USE_GCC_PRAGMAS | ||
65 | 39 | #pragma implementation | ||
66 | 40 | #endif | ||
67 | 41 | |||
68 | 42 | #include <string.h> | ||
69 | 43 | #include <math.h> | ||
70 | 44 | #include <assert.h> | ||
71 | 45 | #include <cairo.h> | ||
72 | 46 | |||
73 | 47 | #include "goo/gfile.h" | ||
74 | 48 | #include "goo/gtypes_p.h" | ||
75 | 49 | #include "GlobalParams.h" | ||
76 | 50 | #include "Error.h" | ||
77 | 51 | #include "Object.h" | ||
78 | 52 | #include "Gfx.h" | ||
79 | 53 | #include "GfxState.h" | ||
80 | 54 | #include "GfxFont.h" | ||
81 | 55 | #include "Page.h" | ||
82 | 56 | #include "Link.h" | ||
83 | 57 | #include "FontEncodingTables.h" | ||
84 | 58 | #include "PDFDocEncoding.h" | ||
85 | 59 | #include <fofi/FoFiTrueType.h> | ||
86 | 60 | #include <splash/SplashBitmap.h> | ||
87 | 61 | #include "CairoOutputDev.h" | ||
88 | 62 | #include "CairoFontEngine.h" | ||
89 | 63 | #include "CairoRescaleBox.h" | ||
90 | 64 | #include "UTF8.h" | ||
91 | 65 | //------------------------------------------------------------------------ | ||
92 | 66 | |||
93 | 67 | // #define LOG_CAIRO | ||
94 | 68 | |||
95 | 69 | #ifdef LOG_CAIRO | ||
96 | 70 | #define LOG(x) (x) | ||
97 | 71 | #else | ||
98 | 72 | #define LOG(x) | ||
99 | 73 | #endif | ||
100 | 74 | |||
101 | 75 | static inline void printMatrix(cairo_matrix_t *matrix){ | ||
102 | 76 | printf("%f %f, %f %f (%f %f)\n", matrix->xx, matrix->yx, | ||
103 | 77 | matrix->xy, matrix->yy, | ||
104 | 78 | matrix->x0, matrix->y0); | ||
105 | 79 | } | ||
106 | 80 | |||
107 | 81 | |||
108 | 82 | #define MIN(a,b) (((a) < (b)) ? (a) : (b)) | ||
109 | 83 | #define MAX(a,b) (((a) > (b)) ? (a) : (b)) | ||
110 | 84 | |||
111 | 85 | |||
112 | 86 | //------------------------------------------------------------------------ | ||
113 | 87 | // CairoImage | ||
114 | 88 | //------------------------------------------------------------------------ | ||
115 | 89 | |||
116 | 90 | CairoImage::CairoImage (double x1, double y1, double x2, double y2) { | ||
117 | 91 | this->image = NULL; | ||
118 | 92 | this->x1 = x1; | ||
119 | 93 | this->y1 = y1; | ||
120 | 94 | this->x2 = x2; | ||
121 | 95 | this->y2 = y2; | ||
122 | 96 | } | ||
123 | 97 | |||
124 | 98 | CairoImage::~CairoImage () { | ||
125 | 99 | if (image) | ||
126 | 100 | cairo_surface_destroy (image); | ||
127 | 101 | } | ||
128 | 102 | |||
129 | 103 | void CairoImage::setImage (cairo_surface_t *image) { | ||
130 | 104 | if (this->image) | ||
131 | 105 | cairo_surface_destroy (this->image); | ||
132 | 106 | this->image = cairo_surface_reference (image); | ||
133 | 107 | } | ||
134 | 108 | |||
135 | 109 | //------------------------------------------------------------------------ | ||
136 | 110 | // CairoOutputDev | ||
137 | 111 | //------------------------------------------------------------------------ | ||
138 | 112 | |||
139 | 113 | // We cannot tie the lifetime of an FT_Library object to that of | ||
140 | 114 | // CairoOutputDev, since any FT_Faces created with it may end up with a | ||
141 | 115 | // reference by Cairo which can be held long after the CairoOutputDev is | ||
142 | 116 | // deleted. The simplest way to avoid problems is to never tear down the | ||
143 | 117 | // FT_Library instance; to avoid leaks, just use a single global instance | ||
144 | 118 | // initialized the first time it is needed. | ||
145 | 119 | FT_Library CairoOutputDev::ft_lib; | ||
146 | 120 | GBool CairoOutputDev::ft_lib_initialized = gFalse; | ||
147 | 121 | |||
148 | 122 | CairoOutputDev::CairoOutputDev() { | ||
149 | 123 | doc = NULL; | ||
150 | 124 | |||
151 | 125 | if (!ft_lib_initialized) { | ||
152 | 126 | FT_Init_FreeType(&ft_lib); | ||
153 | 127 | ft_lib_initialized = gTrue; | ||
154 | 128 | } | ||
155 | 129 | |||
156 | 130 | fontEngine = NULL; | ||
157 | 131 | fontEngine_owner = gFalse; | ||
158 | 132 | glyphs = NULL; | ||
159 | 133 | fill_pattern = NULL; | ||
160 | 134 | fill_color.r = fill_color.g = fill_color.b = 0; | ||
161 | 135 | stroke_pattern = NULL; | ||
162 | 136 | stroke_color.r = stroke_color.g = stroke_color.b = 0; | ||
163 | 137 | stroke_opacity = 1.0; | ||
164 | 138 | fill_opacity = 1.0; | ||
165 | 139 | textClipPath = NULL; | ||
166 | 140 | strokePathClip = NULL; | ||
167 | 141 | cairo = NULL; | ||
168 | 142 | currentFont = NULL; | ||
169 | 143 | prescaleImages = gTrue; | ||
170 | 144 | printing = gTrue; | ||
171 | 145 | use_show_text_glyphs = gFalse; | ||
172 | 146 | inType3Char = gFalse; | ||
173 | 147 | t3_glyph_has_bbox = gFalse; | ||
174 | 148 | |||
175 | 149 | groupColorSpaceStack = NULL; | ||
176 | 150 | maskStack = NULL; | ||
177 | 151 | group = NULL; | ||
178 | 152 | mask = NULL; | ||
179 | 153 | shape = NULL; | ||
180 | 154 | cairo_shape = NULL; | ||
181 | 155 | knockoutCount = 0; | ||
182 | 156 | |||
183 | 157 | text = NULL; | ||
184 | 158 | actualText = NULL; | ||
185 | 159 | |||
186 | 160 | // the SA parameter supposedly defaults to false, but Acrobat | ||
187 | 161 | // apparently hardwires it to true | ||
188 | 162 | stroke_adjust = globalParams->getStrokeAdjust(); | ||
189 | 163 | align_stroke_coords = gFalse; | ||
190 | 164 | adjusted_stroke_width = gFalse; | ||
191 | 165 | } | ||
192 | 166 | |||
193 | 167 | CairoOutputDev::~CairoOutputDev() { | ||
194 | 168 | if (fontEngine_owner && fontEngine) { | ||
195 | 169 | delete fontEngine; | ||
196 | 170 | } | ||
197 | 171 | |||
198 | 172 | if (cairo) | ||
199 | 173 | cairo_destroy (cairo); | ||
200 | 174 | cairo_pattern_destroy (stroke_pattern); | ||
201 | 175 | cairo_pattern_destroy (fill_pattern); | ||
202 | 176 | if (group) | ||
203 | 177 | cairo_pattern_destroy (group); | ||
204 | 178 | if (mask) | ||
205 | 179 | cairo_pattern_destroy (mask); | ||
206 | 180 | if (shape) | ||
207 | 181 | cairo_pattern_destroy (shape); | ||
208 | 182 | if (text) | ||
209 | 183 | text->decRefCnt(); | ||
210 | 184 | if (actualText) | ||
211 | 185 | delete actualText; | ||
212 | 186 | } | ||
213 | 187 | |||
214 | 188 | void CairoOutputDev::setCairo(cairo_t *cairo) | ||
215 | 189 | { | ||
216 | 190 | if (this->cairo != NULL) { | ||
217 | 191 | cairo_status_t status = cairo_status (this->cairo); | ||
218 | 192 | if (status) { | ||
219 | 193 | error(errInternal, -1, "cairo context error: {0:s}\n", cairo_status_to_string(status)); | ||
220 | 194 | } | ||
221 | 195 | cairo_destroy (this->cairo); | ||
222 | 196 | assert(!cairo_shape); | ||
223 | 197 | } | ||
224 | 198 | if (cairo != NULL) { | ||
225 | 199 | this->cairo = cairo_reference (cairo); | ||
226 | 200 | /* save the initial matrix so that we can use it for type3 fonts. */ | ||
227 | 201 | //XXX: is this sufficient? could we miss changes to the matrix somehow? | ||
228 | 202 | cairo_get_matrix(cairo, &orig_matrix); | ||
229 | 203 | } else { | ||
230 | 204 | this->cairo = NULL; | ||
231 | 205 | this->cairo_shape = NULL; | ||
232 | 206 | } | ||
233 | 207 | } | ||
234 | 208 | |||
235 | 209 | void CairoOutputDev::setTextPage(TextPage *text) | ||
236 | 210 | { | ||
237 | 211 | if (this->text) | ||
238 | 212 | this->text->decRefCnt(); | ||
239 | 213 | if (actualText) | ||
240 | 214 | delete actualText; | ||
241 | 215 | if (text) { | ||
242 | 216 | this->text = text; | ||
243 | 217 | this->text->incRefCnt(); | ||
244 | 218 | actualText = new ActualText(text); | ||
245 | 219 | } else { | ||
246 | 220 | this->text = NULL; | ||
247 | 221 | actualText = NULL; | ||
248 | 222 | } | ||
249 | 223 | } | ||
250 | 224 | |||
251 | 225 | void CairoOutputDev::startDoc(PDFDoc *docA, | ||
252 | 226 | CairoFontEngine *parentFontEngine) { | ||
253 | 227 | doc = docA; | ||
254 | 228 | if (parentFontEngine) { | ||
255 | 229 | fontEngine = parentFontEngine; | ||
256 | 230 | } else { | ||
257 | 231 | if (fontEngine) { | ||
258 | 232 | delete fontEngine; | ||
259 | 233 | } | ||
260 | 234 | fontEngine = new CairoFontEngine(ft_lib); | ||
261 | 235 | fontEngine_owner = gTrue; | ||
262 | 236 | } | ||
263 | 237 | } | ||
264 | 238 | |||
265 | 239 | void CairoOutputDev::startPage(int pageNum, GfxState *state) { | ||
266 | 240 | /* set up some per page defaults */ | ||
267 | 241 | cairo_pattern_destroy(fill_pattern); | ||
268 | 242 | cairo_pattern_destroy(stroke_pattern); | ||
269 | 243 | |||
270 | 244 | fill_pattern = cairo_pattern_create_rgb(0., 0., 0.); | ||
271 | 245 | stroke_pattern = cairo_pattern_reference(fill_pattern); | ||
272 | 246 | |||
273 | 247 | if (text) | ||
274 | 248 | text->startPage(state); | ||
275 | 249 | } | ||
276 | 250 | |||
277 | 251 | void CairoOutputDev::endPage() { | ||
278 | 252 | if (text) { | ||
279 | 253 | text->endPage(); | ||
280 | 254 | text->coalesce(gTrue, 0, gFalse); | ||
281 | 255 | } | ||
282 | 256 | } | ||
283 | 257 | |||
284 | 258 | void CairoOutputDev::saveState(GfxState *state) { | ||
285 | 259 | LOG(printf ("save\n")); | ||
286 | 260 | cairo_save (cairo); | ||
287 | 261 | if (cairo_shape) | ||
288 | 262 | cairo_save (cairo_shape); | ||
289 | 263 | |||
290 | 264 | MaskStack *ms = new MaskStack; | ||
291 | 265 | ms->mask = cairo_pattern_reference(mask); | ||
292 | 266 | ms->mask_matrix = mask_matrix; | ||
293 | 267 | ms->next = maskStack; | ||
294 | 268 | maskStack = ms; | ||
295 | 269 | } | ||
296 | 270 | |||
297 | 271 | void CairoOutputDev::restoreState(GfxState *state) { | ||
298 | 272 | LOG(printf ("restore\n")); | ||
299 | 273 | cairo_restore (cairo); | ||
300 | 274 | if (cairo_shape) | ||
301 | 275 | cairo_restore (cairo_shape); | ||
302 | 276 | |||
303 | 277 | /* These aren't restored by cairo_restore() since we keep them in | ||
304 | 278 | * the output device. */ | ||
305 | 279 | updateFillColor(state); | ||
306 | 280 | updateStrokeColor(state); | ||
307 | 281 | updateFillOpacity(state); | ||
308 | 282 | updateStrokeOpacity(state); | ||
309 | 283 | updateBlendMode(state); | ||
310 | 284 | |||
311 | 285 | MaskStack* ms = maskStack; | ||
312 | 286 | if (ms) { | ||
313 | 287 | if (mask) | ||
314 | 288 | cairo_pattern_destroy(mask); | ||
315 | 289 | mask = ms->mask; | ||
316 | 290 | mask_matrix = ms->mask_matrix; | ||
317 | 291 | maskStack = ms->next; | ||
318 | 292 | delete ms; | ||
319 | 293 | } | ||
320 | 294 | } | ||
321 | 295 | |||
322 | 296 | void CairoOutputDev::updateAll(GfxState *state) { | ||
323 | 297 | updateLineDash(state); | ||
324 | 298 | updateLineJoin(state); | ||
325 | 299 | updateLineCap(state); | ||
326 | 300 | updateLineWidth(state); | ||
327 | 301 | updateFlatness(state); | ||
328 | 302 | updateMiterLimit(state); | ||
329 | 303 | updateFillColor(state); | ||
330 | 304 | updateStrokeColor(state); | ||
331 | 305 | updateFillOpacity(state); | ||
332 | 306 | updateStrokeOpacity(state); | ||
333 | 307 | updateBlendMode(state); | ||
334 | 308 | needFontUpdate = gTrue; | ||
335 | 309 | if (text) | ||
336 | 310 | text->updateFont(state); | ||
337 | 311 | } | ||
338 | 312 | |||
339 | 313 | void CairoOutputDev::setDefaultCTM(double *ctm) { | ||
340 | 314 | cairo_matrix_t matrix; | ||
341 | 315 | matrix.xx = ctm[0]; | ||
342 | 316 | matrix.yx = ctm[1]; | ||
343 | 317 | matrix.xy = ctm[2]; | ||
344 | 318 | matrix.yy = ctm[3]; | ||
345 | 319 | matrix.x0 = ctm[4]; | ||
346 | 320 | matrix.y0 = ctm[5]; | ||
347 | 321 | |||
348 | 322 | cairo_transform (cairo, &matrix); | ||
349 | 323 | if (cairo_shape) | ||
350 | 324 | cairo_transform (cairo_shape, &matrix); | ||
351 | 325 | |||
352 | 326 | OutputDev::setDefaultCTM(ctm); | ||
353 | 327 | } | ||
354 | 328 | |||
355 | 329 | void CairoOutputDev::updateCTM(GfxState *state, double m11, double m12, | ||
356 | 330 | double m21, double m22, | ||
357 | 331 | double m31, double m32) { | ||
358 | 332 | cairo_matrix_t matrix, invert_matrix; | ||
359 | 333 | matrix.xx = m11; | ||
360 | 334 | matrix.yx = m12; | ||
361 | 335 | matrix.xy = m21; | ||
362 | 336 | matrix.yy = m22; | ||
363 | 337 | matrix.x0 = m31; | ||
364 | 338 | matrix.y0 = m32; | ||
365 | 339 | |||
366 | 340 | /* Make sure the matrix is invertible before setting it. | ||
367 | 341 | * cairo will blow up if we give it a matrix that's not | ||
368 | 342 | * invertible, so we need to check before passing it | ||
369 | 343 | * to cairo_transform. Ignoring it is likely to give better | ||
370 | 344 | * results than not rendering anything at all. See #14398 | ||
371 | 345 | * | ||
372 | 346 | * Ideally, we could do the cairo_transform | ||
373 | 347 | * and then check if anything went wrong and fix it then | ||
374 | 348 | * instead of having to invert the matrix. */ | ||
375 | 349 | invert_matrix = matrix; | ||
376 | 350 | if (cairo_matrix_invert(&invert_matrix)) { | ||
377 | 351 | error(errSyntaxWarning, -1, "matrix not invertible\n"); | ||
378 | 352 | return; | ||
379 | 353 | } | ||
380 | 354 | |||
381 | 355 | cairo_transform (cairo, &matrix); | ||
382 | 356 | if (cairo_shape) | ||
383 | 357 | cairo_transform (cairo_shape, &matrix); | ||
384 | 358 | updateLineDash(state); | ||
385 | 359 | updateLineJoin(state); | ||
386 | 360 | updateLineCap(state); | ||
387 | 361 | updateLineWidth(state); | ||
388 | 362 | } | ||
389 | 363 | |||
390 | 364 | void CairoOutputDev::updateLineDash(GfxState *state) { | ||
391 | 365 | double *dashPattern; | ||
392 | 366 | int dashLength; | ||
393 | 367 | double dashStart; | ||
394 | 368 | |||
395 | 369 | state->getLineDash(&dashPattern, &dashLength, &dashStart); | ||
396 | 370 | cairo_set_dash (cairo, dashPattern, dashLength, dashStart); | ||
397 | 371 | if (cairo_shape) | ||
398 | 372 | cairo_set_dash (cairo_shape, dashPattern, dashLength, dashStart); | ||
399 | 373 | } | ||
400 | 374 | |||
401 | 375 | void CairoOutputDev::updateFlatness(GfxState *state) { | ||
402 | 376 | // cairo_set_tolerance (cairo, state->getFlatness()); | ||
403 | 377 | } | ||
404 | 378 | |||
405 | 379 | void CairoOutputDev::updateLineJoin(GfxState *state) { | ||
406 | 380 | switch (state->getLineJoin()) { | ||
407 | 381 | case 0: | ||
408 | 382 | cairo_set_line_join (cairo, CAIRO_LINE_JOIN_MITER); | ||
409 | 383 | break; | ||
410 | 384 | case 1: | ||
411 | 385 | cairo_set_line_join (cairo, CAIRO_LINE_JOIN_ROUND); | ||
412 | 386 | break; | ||
413 | 387 | case 2: | ||
414 | 388 | cairo_set_line_join (cairo, CAIRO_LINE_JOIN_BEVEL); | ||
415 | 389 | break; | ||
416 | 390 | } | ||
417 | 391 | if (cairo_shape) | ||
418 | 392 | cairo_set_line_join (cairo_shape, cairo_get_line_join(cairo)); | ||
419 | 393 | } | ||
420 | 394 | |||
421 | 395 | void CairoOutputDev::updateLineCap(GfxState *state) { | ||
422 | 396 | switch (state->getLineCap()) { | ||
423 | 397 | case 0: | ||
424 | 398 | cairo_set_line_cap (cairo, CAIRO_LINE_CAP_BUTT); | ||
425 | 399 | break; | ||
426 | 400 | case 1: | ||
427 | 401 | cairo_set_line_cap (cairo, CAIRO_LINE_CAP_ROUND); | ||
428 | 402 | break; | ||
429 | 403 | case 2: | ||
430 | 404 | cairo_set_line_cap (cairo, CAIRO_LINE_CAP_SQUARE); | ||
431 | 405 | break; | ||
432 | 406 | } | ||
433 | 407 | if (cairo_shape) | ||
434 | 408 | cairo_set_line_cap (cairo_shape, cairo_get_line_cap(cairo)); | ||
435 | 409 | } | ||
436 | 410 | |||
437 | 411 | void CairoOutputDev::updateMiterLimit(GfxState *state) { | ||
438 | 412 | cairo_set_miter_limit (cairo, state->getMiterLimit()); | ||
439 | 413 | if (cairo_shape) | ||
440 | 414 | cairo_set_miter_limit (cairo_shape, state->getMiterLimit()); | ||
441 | 415 | } | ||
442 | 416 | |||
443 | 417 | void CairoOutputDev::updateLineWidth(GfxState *state) { | ||
444 | 418 | LOG(printf ("line width: %f\n", state->getLineWidth())); | ||
445 | 419 | adjusted_stroke_width = gFalse; | ||
446 | 420 | double width = state->getLineWidth(); | ||
447 | 421 | if (stroke_adjust && !printing) { | ||
448 | 422 | double x, y; | ||
449 | 423 | x = y = width; | ||
450 | 424 | |||
451 | 425 | /* find out line width in device units */ | ||
452 | 426 | cairo_user_to_device_distance(cairo, &x, &y); | ||
453 | 427 | if (fabs(x) <= 1.0 && fabs(y) <= 1.0) { | ||
454 | 428 | /* adjust width to at least one device pixel */ | ||
455 | 429 | x = y = 1.0; | ||
456 | 430 | cairo_device_to_user_distance(cairo, &x, &y); | ||
457 | 431 | width = MIN(fabs(x),fabs(y)); | ||
458 | 432 | adjusted_stroke_width = gTrue; | ||
459 | 433 | } | ||
460 | 434 | } else if (width == 0.0) { | ||
461 | 435 | /* Cairo does not support 0 line width == 1 device pixel. Find out | ||
462 | 436 | * how big pixels (device unit) are in the x and y | ||
463 | 437 | * directions. Choose the smaller of the two as our line width. | ||
464 | 438 | */ | ||
465 | 439 | double x = 1.0, y = 1.0; | ||
466 | 440 | if (printing) { | ||
467 | 441 | // assume printer pixel size is 1/600 inch | ||
468 | 442 | x = 72.0/600; | ||
469 | 443 | y = 72.0/600; | ||
470 | 444 | } | ||
471 | 445 | cairo_device_to_user_distance(cairo, &x, &y); | ||
472 | 446 | width = MIN(fabs(x),fabs(y)); | ||
473 | 447 | } | ||
474 | 448 | cairo_set_line_width (cairo, width); | ||
475 | 449 | if (cairo_shape) | ||
476 | 450 | cairo_set_line_width (cairo_shape, cairo_get_line_width (cairo)); | ||
477 | 451 | } | ||
478 | 452 | |||
479 | 453 | void CairoOutputDev::updateFillColor(GfxState *state) { | ||
480 | 454 | GfxRGB color = fill_color; | ||
481 | 455 | |||
482 | 456 | state->getFillRGB(&fill_color); | ||
483 | 457 | if (cairo_pattern_get_type (fill_pattern) != CAIRO_PATTERN_TYPE_SOLID || | ||
484 | 458 | color.r != fill_color.r || | ||
485 | 459 | color.g != fill_color.g || | ||
486 | 460 | color.b != fill_color.b) | ||
487 | 461 | { | ||
488 | 462 | cairo_pattern_destroy(fill_pattern); | ||
489 | 463 | fill_pattern = cairo_pattern_create_rgba(colToDbl(fill_color.r), | ||
490 | 464 | colToDbl(fill_color.g), | ||
491 | 465 | colToDbl(fill_color.b), | ||
492 | 466 | fill_opacity); | ||
493 | 467 | |||
494 | 468 | LOG(printf ("fill color: %d %d %d\n", | ||
495 | 469 | fill_color.r, fill_color.g, fill_color.b)); | ||
496 | 470 | } | ||
497 | 471 | } | ||
498 | 472 | |||
499 | 473 | void CairoOutputDev::updateStrokeColor(GfxState *state) { | ||
500 | 474 | GfxRGB color = stroke_color; | ||
501 | 475 | |||
502 | 476 | state->getStrokeRGB(&stroke_color); | ||
503 | 477 | if (cairo_pattern_get_type (fill_pattern) != CAIRO_PATTERN_TYPE_SOLID || | ||
504 | 478 | color.r != stroke_color.r || | ||
505 | 479 | color.g != stroke_color.g || | ||
506 | 480 | color.b != stroke_color.b) | ||
507 | 481 | { | ||
508 | 482 | cairo_pattern_destroy(stroke_pattern); | ||
509 | 483 | stroke_pattern = cairo_pattern_create_rgba(colToDbl(stroke_color.r), | ||
510 | 484 | colToDbl(stroke_color.g), | ||
511 | 485 | colToDbl(stroke_color.b), | ||
512 | 486 | stroke_opacity); | ||
513 | 487 | |||
514 | 488 | LOG(printf ("stroke color: %d %d %d\n", | ||
515 | 489 | stroke_color.r, stroke_color.g, stroke_color.b)); | ||
516 | 490 | } | ||
517 | 491 | } | ||
518 | 492 | |||
519 | 493 | void CairoOutputDev::updateFillOpacity(GfxState *state) { | ||
520 | 494 | double opacity = fill_opacity; | ||
521 | 495 | |||
522 | 496 | fill_opacity = state->getFillOpacity(); | ||
523 | 497 | if (opacity != fill_opacity) { | ||
524 | 498 | cairo_pattern_destroy(fill_pattern); | ||
525 | 499 | fill_pattern = cairo_pattern_create_rgba(colToDbl(fill_color.r), | ||
526 | 500 | colToDbl(fill_color.g), | ||
527 | 501 | colToDbl(fill_color.b), | ||
528 | 502 | fill_opacity); | ||
529 | 503 | |||
530 | 504 | LOG(printf ("fill opacity: %f\n", fill_opacity)); | ||
531 | 505 | } | ||
532 | 506 | } | ||
533 | 507 | |||
534 | 508 | void CairoOutputDev::updateStrokeOpacity(GfxState *state) { | ||
535 | 509 | double opacity = stroke_opacity; | ||
536 | 510 | |||
537 | 511 | stroke_opacity = state->getStrokeOpacity(); | ||
538 | 512 | if (opacity != stroke_opacity) { | ||
539 | 513 | cairo_pattern_destroy(stroke_pattern); | ||
540 | 514 | stroke_pattern = cairo_pattern_create_rgba(colToDbl(stroke_color.r), | ||
541 | 515 | colToDbl(stroke_color.g), | ||
542 | 516 | colToDbl(stroke_color.b), | ||
543 | 517 | stroke_opacity); | ||
544 | 518 | |||
545 | 519 | LOG(printf ("stroke opacity: %f\n", stroke_opacity)); | ||
546 | 520 | } | ||
547 | 521 | } | ||
548 | 522 | |||
549 | 523 | void CairoOutputDev::updateFillColorStop(GfxState *state, double offset) { | ||
550 | 524 | state->getFillRGB(&fill_color); | ||
551 | 525 | |||
552 | 526 | cairo_pattern_add_color_stop_rgba(fill_pattern, offset, | ||
553 | 527 | colToDbl(fill_color.r), | ||
554 | 528 | colToDbl(fill_color.g), | ||
555 | 529 | colToDbl(fill_color.b), | ||
556 | 530 | fill_opacity); | ||
557 | 531 | LOG(printf ("fill color stop: %f (%d, %d, %d)\n", | ||
558 | 532 | offset, fill_color.r, fill_color.g, fill_color.b)); | ||
559 | 533 | } | ||
560 | 534 | |||
561 | 535 | void CairoOutputDev::updateBlendMode(GfxState *state) { | ||
562 | 536 | switch (state->getBlendMode()) { | ||
563 | 537 | default: | ||
564 | 538 | case gfxBlendNormal: | ||
565 | 539 | cairo_set_operator (cairo, CAIRO_OPERATOR_OVER); | ||
566 | 540 | break; | ||
567 | 541 | case gfxBlendMultiply: | ||
568 | 542 | cairo_set_operator (cairo, CAIRO_OPERATOR_MULTIPLY); | ||
569 | 543 | break; | ||
570 | 544 | case gfxBlendScreen: | ||
571 | 545 | cairo_set_operator (cairo, CAIRO_OPERATOR_SCREEN); | ||
572 | 546 | break; | ||
573 | 547 | case gfxBlendOverlay: | ||
574 | 548 | cairo_set_operator (cairo, CAIRO_OPERATOR_OVERLAY); | ||
575 | 549 | break; | ||
576 | 550 | case gfxBlendDarken: | ||
577 | 551 | cairo_set_operator (cairo, CAIRO_OPERATOR_DARKEN); | ||
578 | 552 | break; | ||
579 | 553 | case gfxBlendLighten: | ||
580 | 554 | cairo_set_operator (cairo, CAIRO_OPERATOR_LIGHTEN); | ||
581 | 555 | break; | ||
582 | 556 | case gfxBlendColorDodge: | ||
583 | 557 | cairo_set_operator (cairo, CAIRO_OPERATOR_COLOR_DODGE); | ||
584 | 558 | break; | ||
585 | 559 | case gfxBlendColorBurn: | ||
586 | 560 | cairo_set_operator (cairo, CAIRO_OPERATOR_COLOR_BURN); | ||
587 | 561 | break; | ||
588 | 562 | case gfxBlendHardLight: | ||
589 | 563 | cairo_set_operator (cairo, CAIRO_OPERATOR_HARD_LIGHT); | ||
590 | 564 | break; | ||
591 | 565 | case gfxBlendSoftLight: | ||
592 | 566 | cairo_set_operator (cairo, CAIRO_OPERATOR_SOFT_LIGHT); | ||
593 | 567 | break; | ||
594 | 568 | case gfxBlendDifference: | ||
595 | 569 | cairo_set_operator (cairo, CAIRO_OPERATOR_DIFFERENCE); | ||
596 | 570 | break; | ||
597 | 571 | case gfxBlendExclusion: | ||
598 | 572 | cairo_set_operator (cairo, CAIRO_OPERATOR_EXCLUSION); | ||
599 | 573 | break; | ||
600 | 574 | case gfxBlendHue: | ||
601 | 575 | cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_HUE); | ||
602 | 576 | break; | ||
603 | 577 | case gfxBlendSaturation: | ||
604 | 578 | cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_SATURATION); | ||
605 | 579 | break; | ||
606 | 580 | case gfxBlendColor: | ||
607 | 581 | cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_COLOR); | ||
608 | 582 | break; | ||
609 | 583 | case gfxBlendLuminosity: | ||
610 | 584 | cairo_set_operator (cairo, CAIRO_OPERATOR_HSL_LUMINOSITY); | ||
611 | 585 | break; | ||
612 | 586 | } | ||
613 | 587 | LOG(printf ("blend mode: %d\n", (int)state->getBlendMode())); | ||
614 | 588 | } | ||
615 | 589 | |||
616 | 590 | void CairoOutputDev::updateFont(GfxState *state) { | ||
617 | 591 | cairo_font_face_t *font_face; | ||
618 | 592 | cairo_matrix_t matrix, invert_matrix; | ||
619 | 593 | |||
620 | 594 | LOG(printf ("updateFont() font=%s\n", state->getFont()->getName()->getCString())); | ||
621 | 595 | |||
622 | 596 | needFontUpdate = gFalse; | ||
623 | 597 | |||
624 | 598 | //FIXME: use cairo font engine? | ||
625 | 599 | if (text) | ||
626 | 600 | text->updateFont(state); | ||
627 | 601 | |||
628 | 602 | currentFont = fontEngine->getFont (state->getFont(), doc, printing); | ||
629 | 603 | |||
630 | 604 | if (!currentFont) | ||
631 | 605 | return; | ||
632 | 606 | |||
633 | 607 | font_face = currentFont->getFontFace(); | ||
634 | 608 | cairo_set_font_face (cairo, font_face); | ||
635 | 609 | |||
636 | 610 | use_show_text_glyphs = state->getFont()->hasToUnicodeCMap() && | ||
637 | 611 | cairo_surface_has_show_text_glyphs (cairo_get_target (cairo)); | ||
638 | 612 | |||
639 | 613 | double fontSize = state->getFontSize(); | ||
640 | 614 | double *m = state->getTextMat(); | ||
641 | 615 | /* NOTE: adjusting by a constant is hack. The correct solution | ||
642 | 616 | * is probably to use user-fonts and compute the scale on a per | ||
643 | 617 | * glyph basis instead of for the entire font */ | ||
644 | 618 | double w = currentFont->getSubstitutionCorrection(state->getFont()); | ||
645 | 619 | matrix.xx = m[0] * fontSize * state->getHorizScaling() * w; | ||
646 | 620 | matrix.yx = m[1] * fontSize * state->getHorizScaling() * w; | ||
647 | 621 | matrix.xy = -m[2] * fontSize; | ||
648 | 622 | matrix.yy = -m[3] * fontSize; | ||
649 | 623 | matrix.x0 = 0; | ||
650 | 624 | matrix.y0 = 0; | ||
651 | 625 | |||
652 | 626 | LOG(printf ("font matrix: %f %f %f %f\n", matrix.xx, matrix.yx, matrix.xy, matrix.yy)); | ||
653 | 627 | |||
654 | 628 | /* Make sure the font matrix is invertible before setting it. cairo | ||
655 | 629 | * will blow up if we give it a matrix that's not invertible, so we | ||
656 | 630 | * need to check before passing it to cairo_set_font_matrix. Ignoring it | ||
657 | 631 | * is likely to give better results than not rendering anything at | ||
658 | 632 | * all. See #18254. | ||
659 | 633 | */ | ||
660 | 634 | invert_matrix = matrix; | ||
661 | 635 | if (cairo_matrix_invert(&invert_matrix)) { | ||
662 | 636 | error(errSyntaxWarning, -1, "font matrix not invertible\n"); | ||
663 | 637 | return; | ||
664 | 638 | } | ||
665 | 639 | |||
666 | 640 | cairo_set_font_matrix (cairo, &matrix); | ||
667 | 641 | } | ||
668 | 642 | |||
669 | 643 | /* Tolerance in pixels for checking if strokes are horizontal or vertical | ||
670 | 644 | * lines in device space */ | ||
671 | 645 | #define STROKE_COORD_TOLERANCE 0.5 | ||
672 | 646 | |||
673 | 647 | /* Align stroke coordinate i if the point is the start or end of a | ||
674 | 648 | * horizontal or vertical line */ | ||
675 | 649 | void CairoOutputDev::alignStrokeCoords(GfxSubpath *subpath, int i, double *x, double *y) | ||
676 | 650 | { | ||
677 | 651 | double x1, y1, x2, y2; | ||
678 | 652 | GBool align = gFalse; | ||
679 | 653 | |||
680 | 654 | x1 = subpath->getX(i); | ||
681 | 655 | y1 = subpath->getY(i); | ||
682 | 656 | cairo_user_to_device (cairo, &x1, &y1); | ||
683 | 657 | |||
684 | 658 | // Does the current coord and prev coord form a horiz or vert line? | ||
685 | 659 | if (i > 0 && !subpath->getCurve(i - 1)) { | ||
686 | 660 | x2 = subpath->getX(i - 1); | ||
687 | 661 | y2 = subpath->getY(i - 1); | ||
688 | 662 | cairo_user_to_device (cairo, &x2, &y2); | ||
689 | 663 | if (fabs(x2 - x1) < STROKE_COORD_TOLERANCE || fabs(y2 - y1) < STROKE_COORD_TOLERANCE) | ||
690 | 664 | align = gTrue; | ||
691 | 665 | } | ||
692 | 666 | |||
693 | 667 | // Does the current coord and next coord form a horiz or vert line? | ||
694 | 668 | if (i < subpath->getNumPoints() - 1 && !subpath->getCurve(i + 1)) { | ||
695 | 669 | x2 = subpath->getX(i + 1); | ||
696 | 670 | y2 = subpath->getY(i + 1); | ||
697 | 671 | cairo_user_to_device (cairo, &x2, &y2); | ||
698 | 672 | if (fabs(x2 - x1) < STROKE_COORD_TOLERANCE || fabs(y2 - y1) < STROKE_COORD_TOLERANCE) | ||
699 | 673 | align = gTrue; | ||
700 | 674 | } | ||
701 | 675 | |||
702 | 676 | *x = subpath->getX(i); | ||
703 | 677 | *y = subpath->getY(i); | ||
704 | 678 | if (align) { | ||
705 | 679 | /* see http://www.cairographics.org/FAQ/#sharp_lines */ | ||
706 | 680 | cairo_user_to_device (cairo, x, y); | ||
707 | 681 | *x = floor(*x) + 0.5; | ||
708 | 682 | *y = floor(*y) + 0.5; | ||
709 | 683 | cairo_device_to_user (cairo, x, y); | ||
710 | 684 | } | ||
711 | 685 | } | ||
712 | 686 | |||
713 | 687 | #undef STROKE_COORD_TOLERANCE | ||
714 | 688 | |||
715 | 689 | void CairoOutputDev::doPath(cairo_t *cairo, GfxState *state, GfxPath *path) { | ||
716 | 690 | GfxSubpath *subpath; | ||
717 | 691 | int i, j; | ||
718 | 692 | double x, y; | ||
719 | 693 | cairo_new_path (cairo); | ||
720 | 694 | for (i = 0; i < path->getNumSubpaths(); ++i) { | ||
721 | 695 | subpath = path->getSubpath(i); | ||
722 | 696 | if (subpath->getNumPoints() > 0) { | ||
723 | 697 | if (align_stroke_coords) { | ||
724 | 698 | alignStrokeCoords(subpath, 0, &x, &y); | ||
725 | 699 | } else { | ||
726 | 700 | x = subpath->getX(0); | ||
727 | 701 | y = subpath->getY(0); | ||
728 | 702 | } | ||
729 | 703 | cairo_move_to (cairo, x, y); | ||
730 | 704 | j = 1; | ||
731 | 705 | while (j < subpath->getNumPoints()) { | ||
732 | 706 | if (subpath->getCurve(j)) { | ||
733 | 707 | if (align_stroke_coords) { | ||
734 | 708 | alignStrokeCoords(subpath, j + 2, &x, &y); | ||
735 | 709 | } else { | ||
736 | 710 | x = subpath->getX(j+2); | ||
737 | 711 | y = subpath->getY(j+2); | ||
738 | 712 | } | ||
739 | 713 | cairo_curve_to( cairo, | ||
740 | 714 | subpath->getX(j), subpath->getY(j), | ||
741 | 715 | subpath->getX(j+1), subpath->getY(j+1), | ||
742 | 716 | x, y); | ||
743 | 717 | |||
744 | 718 | j += 3; | ||
745 | 719 | } else { | ||
746 | 720 | if (align_stroke_coords) { | ||
747 | 721 | alignStrokeCoords(subpath, j, &x, &y); | ||
748 | 722 | } else { | ||
749 | 723 | x = subpath->getX(j); | ||
750 | 724 | y = subpath->getY(j); | ||
751 | 725 | } | ||
752 | 726 | cairo_line_to (cairo, x, y); | ||
753 | 727 | ++j; | ||
754 | 728 | } | ||
755 | 729 | } | ||
756 | 730 | if (subpath->isClosed()) { | ||
757 | 731 | LOG (printf ("close\n")); | ||
758 | 732 | cairo_close_path (cairo); | ||
759 | 733 | } | ||
760 | 734 | } | ||
761 | 735 | } | ||
762 | 736 | } | ||
763 | 737 | |||
764 | 738 | void CairoOutputDev::stroke(GfxState *state) { | ||
765 | 739 | if (inType3Char) { | ||
766 | 740 | GfxGray gray; | ||
767 | 741 | state->getFillGray(&gray); | ||
768 | 742 | if (colToDbl(gray) > 0.5) | ||
769 | 743 | return; | ||
770 | 744 | } | ||
771 | 745 | |||
772 | 746 | if (adjusted_stroke_width) | ||
773 | 747 | align_stroke_coords = gTrue; | ||
774 | 748 | doPath (cairo, state, state->getPath()); | ||
775 | 749 | align_stroke_coords = gFalse; | ||
776 | 750 | cairo_set_source (cairo, stroke_pattern); | ||
777 | 751 | LOG(printf ("stroke\n")); | ||
778 | 752 | cairo_stroke (cairo); | ||
779 | 753 | if (cairo_shape) { | ||
780 | 754 | doPath (cairo_shape, state, state->getPath()); | ||
781 | 755 | cairo_stroke (cairo_shape); | ||
782 | 756 | } | ||
783 | 757 | } | ||
784 | 758 | |||
785 | 759 | void CairoOutputDev::fill(GfxState *state) { | ||
786 | 760 | if (inType3Char) { | ||
787 | 761 | GfxGray gray; | ||
788 | 762 | state->getFillGray(&gray); | ||
789 | 763 | if (colToDbl(gray) > 0.5) | ||
790 | 764 | return; | ||
791 | 765 | } | ||
792 | 766 | |||
793 | 767 | doPath (cairo, state, state->getPath()); | ||
794 | 768 | cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_WINDING); | ||
795 | 769 | cairo_set_source (cairo, fill_pattern); | ||
796 | 770 | LOG(printf ("fill\n")); | ||
797 | 771 | //XXX: how do we get the path | ||
798 | 772 | if (mask) { | ||
799 | 773 | cairo_save (cairo); | ||
800 | 774 | cairo_clip (cairo); | ||
801 | 775 | cairo_set_matrix (cairo, &mask_matrix); | ||
802 | 776 | cairo_mask (cairo, mask); | ||
803 | 777 | cairo_restore (cairo); | ||
804 | 778 | } else if (strokePathClip) { | ||
805 | 779 | fillToStrokePathClip(state); | ||
806 | 780 | } else { | ||
807 | 781 | cairo_fill (cairo); | ||
808 | 782 | } | ||
809 | 783 | if (cairo_shape) { | ||
810 | 784 | cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_WINDING); | ||
811 | 785 | doPath (cairo_shape, state, state->getPath()); | ||
812 | 786 | cairo_fill (cairo_shape); | ||
813 | 787 | } | ||
814 | 788 | } | ||
815 | 789 | |||
816 | 790 | void CairoOutputDev::eoFill(GfxState *state) { | ||
817 | 791 | doPath (cairo, state, state->getPath()); | ||
818 | 792 | cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_EVEN_ODD); | ||
819 | 793 | cairo_set_source (cairo, fill_pattern); | ||
820 | 794 | LOG(printf ("fill-eo\n")); | ||
821 | 795 | cairo_fill (cairo); | ||
822 | 796 | |||
823 | 797 | if (cairo_shape) { | ||
824 | 798 | cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_EVEN_ODD); | ||
825 | 799 | doPath (cairo_shape, state, state->getPath()); | ||
826 | 800 | cairo_fill (cairo_shape); | ||
827 | 801 | } | ||
828 | 802 | |||
829 | 803 | } | ||
830 | 804 | |||
831 | 805 | GBool CairoOutputDev::tilingPatternFill(GfxState *state, Gfx *gfx1, Catalog *cat, Object *str, | ||
832 | 806 | double *pmat, int paintType, int /*tilingType*/, Dict *resDict, | ||
833 | 807 | double *mat, double *bbox, | ||
834 | 808 | int x0, int y0, int x1, int y1, | ||
835 | 809 | double xStep, double yStep) | ||
836 | 810 | { | ||
837 | 811 | PDFRectangle box; | ||
838 | 812 | Gfx *gfx; | ||
839 | 813 | cairo_pattern_t *pattern; | ||
840 | 814 | cairo_surface_t *surface; | ||
841 | 815 | cairo_matrix_t matrix; | ||
842 | 816 | cairo_t *old_cairo; | ||
843 | 817 | double xMin, yMin, xMax, yMax; | ||
844 | 818 | double width, height; | ||
845 | 819 | int surface_width, surface_height; | ||
846 | 820 | StrokePathClip *strokePathTmp; | ||
847 | 821 | |||
848 | 822 | width = bbox[2] - bbox[0]; | ||
849 | 823 | height = bbox[3] - bbox[1]; | ||
850 | 824 | |||
851 | 825 | if (xStep != width || yStep != height) | ||
852 | 826 | return gFalse; | ||
853 | 827 | /* TODO: implement the other cases here too */ | ||
854 | 828 | |||
855 | 829 | surface_width = (int) ceil (width); | ||
856 | 830 | surface_height = (int) ceil (height); | ||
857 | 831 | |||
858 | 832 | surface = cairo_surface_create_similar (cairo_get_target (cairo), | ||
859 | 833 | CAIRO_CONTENT_COLOR_ALPHA, | ||
860 | 834 | surface_width, surface_height); | ||
861 | 835 | if (cairo_surface_status (surface)) | ||
862 | 836 | return gFalse; | ||
863 | 837 | |||
864 | 838 | old_cairo = cairo; | ||
865 | 839 | cairo = cairo_create (surface); | ||
866 | 840 | cairo_surface_destroy (surface); | ||
867 | 841 | |||
868 | 842 | box.x1 = bbox[0]; box.y1 = bbox[1]; | ||
869 | 843 | box.x2 = bbox[2]; box.y2 = bbox[3]; | ||
870 | 844 | strokePathTmp = strokePathClip; | ||
871 | 845 | strokePathClip = NULL; | ||
872 | 846 | gfx = new Gfx(doc, this, resDict, &box, NULL); | ||
873 | 847 | gfx->display(str); | ||
874 | 848 | delete gfx; | ||
875 | 849 | strokePathClip = strokePathTmp; | ||
876 | 850 | |||
877 | 851 | pattern = cairo_pattern_create_for_surface (cairo_get_target (cairo)); | ||
878 | 852 | cairo_destroy (cairo); | ||
879 | 853 | cairo = old_cairo; | ||
880 | 854 | if (cairo_pattern_status (pattern)) | ||
881 | 855 | return gFalse; | ||
882 | 856 | |||
883 | 857 | state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax); | ||
884 | 858 | cairo_rectangle (cairo, xMin, yMin, xMax - xMin, yMax - yMin); | ||
885 | 859 | |||
886 | 860 | cairo_matrix_init_scale (&matrix, surface_width / width, surface_height / height); | ||
887 | 861 | cairo_pattern_set_matrix (pattern, &matrix); | ||
888 | 862 | |||
889 | 863 | cairo_matrix_init (&matrix, mat[0], mat[1], mat[2], mat[3], mat[4], mat[5]); | ||
890 | 864 | cairo_transform (cairo, &matrix); | ||
891 | 865 | cairo_set_source (cairo, pattern); | ||
892 | 866 | cairo_pattern_set_extend (pattern, CAIRO_EXTEND_REPEAT); | ||
893 | 867 | if (strokePathClip) { | ||
894 | 868 | fillToStrokePathClip(state); | ||
895 | 869 | } else { | ||
896 | 870 | cairo_fill (cairo); | ||
897 | 871 | } | ||
898 | 872 | |||
899 | 873 | cairo_pattern_destroy (pattern); | ||
900 | 874 | |||
901 | 875 | return gTrue; | ||
902 | 876 | } | ||
903 | 877 | |||
904 | 878 | GBool CairoOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax) { | ||
905 | 879 | double x0, y0, x1, y1; | ||
906 | 880 | double dx, dy; | ||
907 | 881 | |||
908 | 882 | shading->getCoords(&x0, &y0, &x1, &y1); | ||
909 | 883 | dx = x1 - x0; | ||
910 | 884 | dy = y1 - y0; | ||
911 | 885 | |||
912 | 886 | cairo_pattern_destroy(fill_pattern); | ||
913 | 887 | fill_pattern = cairo_pattern_create_linear (x0 + tMin * dx, y0 + tMin * dy, | ||
914 | 888 | x0 + tMax * dx, y0 + tMax * dy); | ||
915 | 889 | if (!shading->getExtend0() && !shading->getExtend1()) | ||
916 | 890 | cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_NONE); | ||
917 | 891 | else | ||
918 | 892 | cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_PAD); | ||
919 | 893 | |||
920 | 894 | LOG (printf ("axial-sh\n")); | ||
921 | 895 | |||
922 | 896 | // TODO: use the actual stops in the shading in the case | ||
923 | 897 | // of linear interpolation (Type 2 Exponential functions with N=1) | ||
924 | 898 | return gFalse; | ||
925 | 899 | } | ||
926 | 900 | |||
927 | 901 | GBool CairoOutputDev::axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading) | ||
928 | 902 | { | ||
929 | 903 | return (shading->getExtend0() == shading->getExtend1()); | ||
930 | 904 | } | ||
931 | 905 | |||
932 | 906 | GBool CairoOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax) { | ||
933 | 907 | double x0, y0, r0, x1, y1, r1; | ||
934 | 908 | double dx, dy, dr; | ||
935 | 909 | |||
936 | 910 | shading->getCoords(&x0, &y0, &r0, &x1, &y1, &r1); | ||
937 | 911 | dx = x1 - x0; | ||
938 | 912 | dy = y1 - y0; | ||
939 | 913 | dr = r1 - r0; | ||
940 | 914 | cairo_pattern_destroy(fill_pattern); | ||
941 | 915 | fill_pattern = cairo_pattern_create_radial (x0 + sMin * dx, | ||
942 | 916 | y0 + sMin * dy, | ||
943 | 917 | r0 + sMin * dr, | ||
944 | 918 | x0 + sMax * dx, | ||
945 | 919 | y0 + sMax * dy, | ||
946 | 920 | r0 + sMax * dr); | ||
947 | 921 | if (shading->getExtend0() && shading->getExtend1()) | ||
948 | 922 | cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_PAD); | ||
949 | 923 | else | ||
950 | 924 | cairo_pattern_set_extend (fill_pattern, CAIRO_EXTEND_NONE); | ||
951 | 925 | |||
952 | 926 | LOG (printf ("radial-sh\n")); | ||
953 | 927 | |||
954 | 928 | return gFalse; | ||
955 | 929 | } | ||
956 | 930 | |||
957 | 931 | GBool CairoOutputDev::radialShadedSupportExtend(GfxState *state, GfxRadialShading *shading) | ||
958 | 932 | { | ||
959 | 933 | return (shading->getExtend0() == shading->getExtend1()); | ||
960 | 934 | } | ||
961 | 935 | |||
962 | 936 | #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0) | ||
963 | 937 | GBool CairoOutputDev::gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading) | ||
964 | 938 | { | ||
965 | 939 | double x0, y0, x1, y1, x2, y2; | ||
966 | 940 | GfxColor color[3]; | ||
967 | 941 | int i, j; | ||
968 | 942 | GfxRGB rgb; | ||
969 | 943 | |||
970 | 944 | cairo_pattern_destroy(fill_pattern); | ||
971 | 945 | fill_pattern = cairo_pattern_create_mesh (); | ||
972 | 946 | |||
973 | 947 | for (i = 0; i < shading->getNTriangles(); i++) { | ||
974 | 948 | shading->getTriangle(i, | ||
975 | 949 | &x0, &y0, &color[0], | ||
976 | 950 | &x1, &y1, &color[1], | ||
977 | 951 | &x2, &y2, &color[2]); | ||
978 | 952 | |||
979 | 953 | cairo_mesh_pattern_begin_patch (fill_pattern); | ||
980 | 954 | |||
981 | 955 | cairo_mesh_pattern_move_to (fill_pattern, x0, y0); | ||
982 | 956 | cairo_mesh_pattern_line_to (fill_pattern, x1, y1); | ||
983 | 957 | cairo_mesh_pattern_line_to (fill_pattern, x2, y2); | ||
984 | 958 | |||
985 | 959 | for (j = 0; j < 3; j++) { | ||
986 | 960 | shading->getColorSpace()->getRGB(&color[j], &rgb); | ||
987 | 961 | cairo_mesh_pattern_set_corner_color_rgb (fill_pattern, j, | ||
988 | 962 | colToDbl(rgb.r), | ||
989 | 963 | colToDbl(rgb.g), | ||
990 | 964 | colToDbl(rgb.b)); | ||
991 | 965 | } | ||
992 | 966 | |||
993 | 967 | cairo_mesh_pattern_end_patch (fill_pattern); | ||
994 | 968 | } | ||
995 | 969 | |||
996 | 970 | double xMin, yMin, xMax, yMax; | ||
997 | 971 | // get the clip region bbox | ||
998 | 972 | state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax); | ||
999 | 973 | state->moveTo(xMin, yMin); | ||
1000 | 974 | state->lineTo(xMin, yMax); | ||
1001 | 975 | state->lineTo(xMax, yMax); | ||
1002 | 976 | state->lineTo(xMax, yMin); | ||
1003 | 977 | state->closePath(); | ||
1004 | 978 | fill(state); | ||
1005 | 979 | state->clearPath(); | ||
1006 | 980 | |||
1007 | 981 | return gTrue; | ||
1008 | 982 | } | ||
1009 | 983 | |||
1010 | 984 | GBool CairoOutputDev::patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading) | ||
1011 | 985 | { | ||
1012 | 986 | int i, j, k; | ||
1013 | 987 | |||
1014 | 988 | cairo_pattern_destroy(fill_pattern); | ||
1015 | 989 | fill_pattern = cairo_pattern_create_mesh (); | ||
1016 | 990 | |||
1017 | 991 | for (i = 0; i < shading->getNPatches(); i++) { | ||
1018 | 992 | GfxPatch *patch = shading->getPatch(i); | ||
1019 | 993 | GfxColor color; | ||
1020 | 994 | GfxRGB rgb; | ||
1021 | 995 | |||
1022 | 996 | cairo_mesh_pattern_begin_patch (fill_pattern); | ||
1023 | 997 | |||
1024 | 998 | cairo_mesh_pattern_move_to (fill_pattern, patch->x[0][0], patch->y[0][0]); | ||
1025 | 999 | cairo_mesh_pattern_curve_to (fill_pattern, | ||
1026 | 1000 | patch->x[0][1], patch->y[0][1], | ||
1027 | 1001 | patch->x[0][2], patch->y[0][2], | ||
1028 | 1002 | patch->x[0][3], patch->y[0][3]); | ||
1029 | 1003 | |||
1030 | 1004 | cairo_mesh_pattern_curve_to (fill_pattern, | ||
1031 | 1005 | patch->x[1][3], patch->y[1][3], | ||
1032 | 1006 | patch->x[2][3], patch->y[2][3], | ||
1033 | 1007 | patch->x[3][3], patch->y[3][3]); | ||
1034 | 1008 | |||
1035 | 1009 | cairo_mesh_pattern_curve_to (fill_pattern, | ||
1036 | 1010 | patch->x[3][2], patch->y[3][2], | ||
1037 | 1011 | patch->x[3][1], patch->y[3][1], | ||
1038 | 1012 | patch->x[3][0], patch->y[3][0]); | ||
1039 | 1013 | |||
1040 | 1014 | cairo_mesh_pattern_curve_to (fill_pattern, | ||
1041 | 1015 | patch->x[2][0], patch->y[2][0], | ||
1042 | 1016 | patch->x[1][0], patch->y[1][0], | ||
1043 | 1017 | patch->x[0][0], patch->y[0][0]); | ||
1044 | 1018 | |||
1045 | 1019 | cairo_mesh_pattern_set_control_point (fill_pattern, 0, patch->x[1][1], patch->y[1][1]); | ||
1046 | 1020 | cairo_mesh_pattern_set_control_point (fill_pattern, 1, patch->x[1][2], patch->y[1][2]); | ||
1047 | 1021 | cairo_mesh_pattern_set_control_point (fill_pattern, 2, patch->x[2][2], patch->y[2][2]); | ||
1048 | 1022 | cairo_mesh_pattern_set_control_point (fill_pattern, 3, patch->x[2][1], patch->y[2][1]); | ||
1049 | 1023 | |||
1050 | 1024 | for (j = 0; j < 4; j++) { | ||
1051 | 1025 | int u, v; | ||
1052 | 1026 | |||
1053 | 1027 | switch (j) { | ||
1054 | 1028 | case 0: | ||
1055 | 1029 | u = 0; v = 0; | ||
1056 | 1030 | break; | ||
1057 | 1031 | case 1: | ||
1058 | 1032 | u = 0; v = 1; | ||
1059 | 1033 | break; | ||
1060 | 1034 | case 2: | ||
1061 | 1035 | u = 1; v = 1; | ||
1062 | 1036 | break; | ||
1063 | 1037 | case 3: | ||
1064 | 1038 | u = 1; v = 0; | ||
1065 | 1039 | break; | ||
1066 | 1040 | } | ||
1067 | 1041 | |||
1068 | 1042 | if (shading->isParameterized()) { | ||
1069 | 1043 | shading->getParameterizedColor (patch->color[u][v].c[0], &color); | ||
1070 | 1044 | } else { | ||
1071 | 1045 | for (k = 0; k < shading->getColorSpace()->getNComps(); k++) { | ||
1072 | 1046 | // simply cast to the desired type; that's all what is needed. | ||
1073 | 1047 | color.c[k] = GfxColorComp (patch->color[u][v].c[k]); | ||
1074 | 1048 | } | ||
1075 | 1049 | } | ||
1076 | 1050 | |||
1077 | 1051 | shading->getColorSpace()->getRGB(&color, &rgb); | ||
1078 | 1052 | cairo_mesh_pattern_set_corner_color_rgb (fill_pattern, j, | ||
1079 | 1053 | colToDbl(rgb.r), | ||
1080 | 1054 | colToDbl(rgb.g), | ||
1081 | 1055 | colToDbl(rgb.b)); | ||
1082 | 1056 | } | ||
1083 | 1057 | cairo_mesh_pattern_end_patch (fill_pattern); | ||
1084 | 1058 | } | ||
1085 | 1059 | |||
1086 | 1060 | double xMin, yMin, xMax, yMax; | ||
1087 | 1061 | // get the clip region bbox | ||
1088 | 1062 | state->getUserClipBBox(&xMin, &yMin, &xMax, &yMax); | ||
1089 | 1063 | state->moveTo(xMin, yMin); | ||
1090 | 1064 | state->lineTo(xMin, yMax); | ||
1091 | 1065 | state->lineTo(xMax, yMax); | ||
1092 | 1066 | state->lineTo(xMax, yMin); | ||
1093 | 1067 | state->closePath(); | ||
1094 | 1068 | fill(state); | ||
1095 | 1069 | state->clearPath(); | ||
1096 | 1070 | |||
1097 | 1071 | return gTrue; | ||
1098 | 1072 | } | ||
1099 | 1073 | #endif /* CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 12, 0) */ | ||
1100 | 1074 | |||
1101 | 1075 | void CairoOutputDev::clip(GfxState *state) { | ||
1102 | 1076 | doPath (cairo, state, state->getPath()); | ||
1103 | 1077 | cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_WINDING); | ||
1104 | 1078 | cairo_clip (cairo); | ||
1105 | 1079 | LOG (printf ("clip\n")); | ||
1106 | 1080 | if (cairo_shape) { | ||
1107 | 1081 | doPath (cairo_shape, state, state->getPath()); | ||
1108 | 1082 | cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_WINDING); | ||
1109 | 1083 | cairo_clip (cairo_shape); | ||
1110 | 1084 | } | ||
1111 | 1085 | } | ||
1112 | 1086 | |||
1113 | 1087 | void CairoOutputDev::eoClip(GfxState *state) { | ||
1114 | 1088 | doPath (cairo, state, state->getPath()); | ||
1115 | 1089 | cairo_set_fill_rule (cairo, CAIRO_FILL_RULE_EVEN_ODD); | ||
1116 | 1090 | cairo_clip (cairo); | ||
1117 | 1091 | LOG (printf ("clip-eo\n")); | ||
1118 | 1092 | if (cairo_shape) { | ||
1119 | 1093 | doPath (cairo_shape, state, state->getPath()); | ||
1120 | 1094 | cairo_set_fill_rule (cairo_shape, CAIRO_FILL_RULE_EVEN_ODD); | ||
1121 | 1095 | cairo_clip (cairo_shape); | ||
1122 | 1096 | } | ||
1123 | 1097 | |||
1124 | 1098 | } | ||
1125 | 1099 | |||
1126 | 1100 | void CairoOutputDev::clipToStrokePath(GfxState *state) { | ||
1127 | 1101 | LOG(printf("clip-to-stroke-path\n")); | ||
1128 | 1102 | strokePathClip = (StrokePathClip*)gmalloc (sizeof(*strokePathClip)); | ||
1129 | 1103 | strokePathClip->path = state->getPath()->copy(); | ||
1130 | 1104 | cairo_get_matrix (cairo, &strokePathClip->ctm); | ||
1131 | 1105 | strokePathClip->line_width = cairo_get_line_width (cairo); | ||
1132 | 1106 | strokePathClip->dash_count = cairo_get_dash_count (cairo); | ||
1133 | 1107 | if (strokePathClip->dash_count) { | ||
1134 | 1108 | strokePathClip->dashes = (double*) gmallocn (sizeof(double), strokePathClip->dash_count); | ||
1135 | 1109 | cairo_get_dash (cairo, strokePathClip->dashes, &strokePathClip->dash_offset); | ||
1136 | 1110 | } else { | ||
1137 | 1111 | strokePathClip->dashes = NULL; | ||
1138 | 1112 | } | ||
1139 | 1113 | strokePathClip->cap = cairo_get_line_cap (cairo); | ||
1140 | 1114 | strokePathClip->join = cairo_get_line_join (cairo); | ||
1141 | 1115 | strokePathClip->miter = cairo_get_miter_limit (cairo); | ||
1142 | 1116 | } | ||
1143 | 1117 | |||
1144 | 1118 | void CairoOutputDev::fillToStrokePathClip(GfxState *state) { | ||
1145 | 1119 | cairo_save (cairo); | ||
1146 | 1120 | |||
1147 | 1121 | cairo_set_matrix (cairo, &strokePathClip->ctm); | ||
1148 | 1122 | cairo_set_line_width (cairo, strokePathClip->line_width); | ||
1149 | 1123 | strokePathClip->dash_count = cairo_get_dash_count (cairo); | ||
1150 | 1124 | cairo_set_dash (cairo, strokePathClip->dashes, strokePathClip->dash_count, strokePathClip->dash_offset); | ||
1151 | 1125 | cairo_set_line_cap (cairo, strokePathClip->cap); | ||
1152 | 1126 | cairo_set_line_join (cairo, strokePathClip->join); | ||
1153 | 1127 | cairo_set_miter_limit (cairo, strokePathClip->miter); | ||
1154 | 1128 | doPath (cairo, state, strokePathClip->path); | ||
1155 | 1129 | cairo_stroke (cairo); | ||
1156 | 1130 | |||
1157 | 1131 | cairo_restore (cairo); | ||
1158 | 1132 | |||
1159 | 1133 | delete strokePathClip->path; | ||
1160 | 1134 | if (strokePathClip->dashes) | ||
1161 | 1135 | gfree (strokePathClip->dashes); | ||
1162 | 1136 | gfree (strokePathClip); | ||
1163 | 1137 | strokePathClip = NULL; | ||
1164 | 1138 | } | ||
1165 | 1139 | |||
1166 | 1140 | void CairoOutputDev::beginString(GfxState *state, GooString *s) | ||
1167 | 1141 | { | ||
1168 | 1142 | int len = s->getLength(); | ||
1169 | 1143 | |||
1170 | 1144 | if (needFontUpdate) | ||
1171 | 1145 | updateFont(state); | ||
1172 | 1146 | |||
1173 | 1147 | if (!currentFont) | ||
1174 | 1148 | return; | ||
1175 | 1149 | |||
1176 | 1150 | glyphs = (cairo_glyph_t *) gmallocn (len, sizeof (cairo_glyph_t)); | ||
1177 | 1151 | glyphCount = 0; | ||
1178 | 1152 | if (use_show_text_glyphs) { | ||
1179 | 1153 | clusters = (cairo_text_cluster_t *) gmallocn (len, sizeof (cairo_text_cluster_t)); | ||
1180 | 1154 | clusterCount = 0; | ||
1181 | 1155 | utf8Max = len*2; // start with twice the number of glyphs. we will realloc if we need more. | ||
1182 | 1156 | utf8 = (char *) gmalloc (utf8Max); | ||
1183 | 1157 | utf8Count = 0; | ||
1184 | 1158 | } | ||
1185 | 1159 | } | ||
1186 | 1160 | |||
1187 | 1161 | void CairoOutputDev::drawChar(GfxState *state, double x, double y, | ||
1188 | 1162 | double dx, double dy, | ||
1189 | 1163 | double originX, double originY, | ||
1190 | 1164 | CharCode code, int nBytes, Unicode *u, int uLen) | ||
1191 | 1165 | { | ||
1192 | 1166 | if (currentFont) { | ||
1193 | 1167 | glyphs[glyphCount].index = currentFont->getGlyph (code, u, uLen); | ||
1194 | 1168 | glyphs[glyphCount].x = x - originX; | ||
1195 | 1169 | glyphs[glyphCount].y = y - originY; | ||
1196 | 1170 | glyphCount++; | ||
1197 | 1171 | if (use_show_text_glyphs) { | ||
1198 | 1172 | if (utf8Max - utf8Count < uLen*6) { | ||
1199 | 1173 | // utf8 encoded characters can be up to 6 bytes | ||
1200 | 1174 | if (utf8Max > uLen*6) | ||
1201 | 1175 | utf8Max *= 2; | ||
1202 | 1176 | else | ||
1203 | 1177 | utf8Max += 2*uLen*6; | ||
1204 | 1178 | utf8 = (char *) grealloc (utf8, utf8Max); | ||
1205 | 1179 | } | ||
1206 | 1180 | clusters[clusterCount].num_bytes = 0; | ||
1207 | 1181 | for (int i = 0; i < uLen; i++) { | ||
1208 | 1182 | int size = mapUTF8 (u[i], utf8 + utf8Count, utf8Max - utf8Count); | ||
1209 | 1183 | utf8Count += size; | ||
1210 | 1184 | clusters[clusterCount].num_bytes += size; | ||
1211 | 1185 | } | ||
1212 | 1186 | clusters[clusterCount].num_glyphs = 1; | ||
1213 | 1187 | clusterCount++; | ||
1214 | 1188 | } | ||
1215 | 1189 | } | ||
1216 | 1190 | |||
1217 | 1191 | if (!text) | ||
1218 | 1192 | return; | ||
1219 | 1193 | actualText->addChar (state, x, y, dx, dy, code, nBytes, u, uLen); | ||
1220 | 1194 | } | ||
1221 | 1195 | |||
1222 | 1196 | void CairoOutputDev::endString(GfxState *state) | ||
1223 | 1197 | { | ||
1224 | 1198 | int render; | ||
1225 | 1199 | |||
1226 | 1200 | if (!currentFont) | ||
1227 | 1201 | return; | ||
1228 | 1202 | |||
1229 | 1203 | // endString can be called without a corresponding beginString. If this | ||
1230 | 1204 | // happens glyphs will be null so don't draw anything, just return. | ||
1231 | 1205 | // XXX: OutputDevs should probably not have to deal with this... | ||
1232 | 1206 | if (!glyphs) | ||
1233 | 1207 | return; | ||
1234 | 1208 | |||
1235 | 1209 | // ignore empty strings and invisible text -- this is used by | ||
1236 | 1210 | // Acrobat Capture | ||
1237 | 1211 | render = state->getRender(); | ||
1238 | 1212 | if (render == 3 || glyphCount == 0) { | ||
1239 | 1213 | gfree(glyphs); | ||
1240 | 1214 | glyphs = NULL; | ||
1241 | 1215 | return; | ||
1242 | 1216 | } | ||
1243 | 1217 | |||
1244 | 1218 | if (!(render & 1)) { | ||
1245 | 1219 | LOG (printf ("fill string\n")); | ||
1246 | 1220 | cairo_set_source (cairo, fill_pattern); | ||
1247 | 1221 | if (use_show_text_glyphs) | ||
1248 | 1222 | cairo_show_text_glyphs (cairo, utf8, utf8Count, glyphs, glyphCount, clusters, clusterCount, (cairo_text_cluster_flags_t)0); | ||
1249 | 1223 | else | ||
1250 | 1224 | cairo_show_glyphs (cairo, glyphs, glyphCount); | ||
1251 | 1225 | if (cairo_shape) | ||
1252 | 1226 | cairo_show_glyphs (cairo_shape, glyphs, glyphCount); | ||
1253 | 1227 | } | ||
1254 | 1228 | |||
1255 | 1229 | // stroke | ||
1256 | 1230 | if ((render & 3) == 1 || (render & 3) == 2) { | ||
1257 | 1231 | LOG (printf ("stroke string\n")); | ||
1258 | 1232 | cairo_set_source (cairo, stroke_pattern); | ||
1259 | 1233 | cairo_glyph_path (cairo, glyphs, glyphCount); | ||
1260 | 1234 | cairo_stroke (cairo); | ||
1261 | 1235 | if (cairo_shape) { | ||
1262 | 1236 | cairo_glyph_path (cairo_shape, glyphs, glyphCount); | ||
1263 | 1237 | cairo_stroke (cairo_shape); | ||
1264 | 1238 | } | ||
1265 | 1239 | } | ||
1266 | 1240 | |||
1267 | 1241 | // clip | ||
1268 | 1242 | if ((render & 4)) { | ||
1269 | 1243 | LOG (printf ("clip string\n")); | ||
1270 | 1244 | // append the glyph path to textClipPath. | ||
1271 | 1245 | |||
1272 | 1246 | // set textClipPath as the currentPath | ||
1273 | 1247 | if (textClipPath) { | ||
1274 | 1248 | cairo_append_path (cairo, textClipPath); | ||
1275 | 1249 | if (cairo_shape) { | ||
1276 | 1250 | cairo_append_path (cairo_shape, textClipPath); | ||
1277 | 1251 | } | ||
1278 | 1252 | cairo_path_destroy (textClipPath); | ||
1279 | 1253 | } | ||
1280 | 1254 | |||
1281 | 1255 | // append the glyph path | ||
1282 | 1256 | cairo_glyph_path (cairo, glyphs, glyphCount); | ||
1283 | 1257 | |||
1284 | 1258 | // move the path back into textClipPath | ||
1285 | 1259 | // and clear the current path | ||
1286 | 1260 | textClipPath = cairo_copy_path (cairo); | ||
1287 | 1261 | cairo_new_path (cairo); | ||
1288 | 1262 | if (cairo_shape) { | ||
1289 | 1263 | cairo_new_path (cairo_shape); | ||
1290 | 1264 | } | ||
1291 | 1265 | } | ||
1292 | 1266 | |||
1293 | 1267 | gfree (glyphs); | ||
1294 | 1268 | glyphs = NULL; | ||
1295 | 1269 | if (use_show_text_glyphs) { | ||
1296 | 1270 | gfree (clusters); | ||
1297 | 1271 | clusters = NULL; | ||
1298 | 1272 | gfree (utf8); | ||
1299 | 1273 | utf8 = NULL; | ||
1300 | 1274 | } | ||
1301 | 1275 | } | ||
1302 | 1276 | |||
1303 | 1277 | |||
1304 | 1278 | GBool CairoOutputDev::beginType3Char(GfxState *state, double x, double y, | ||
1305 | 1279 | double dx, double dy, | ||
1306 | 1280 | CharCode code, Unicode *u, int uLen) { | ||
1307 | 1281 | |||
1308 | 1282 | cairo_save (cairo); | ||
1309 | 1283 | double *ctm; | ||
1310 | 1284 | cairo_matrix_t matrix; | ||
1311 | 1285 | |||
1312 | 1286 | ctm = state->getCTM(); | ||
1313 | 1287 | matrix.xx = ctm[0]; | ||
1314 | 1288 | matrix.yx = ctm[1]; | ||
1315 | 1289 | matrix.xy = ctm[2]; | ||
1316 | 1290 | matrix.yy = ctm[3]; | ||
1317 | 1291 | matrix.x0 = ctm[4]; | ||
1318 | 1292 | matrix.y0 = ctm[5]; | ||
1319 | 1293 | /* Restore the original matrix and then transform to matrix needed for the | ||
1320 | 1294 | * type3 font. This is ugly but seems to work. Perhaps there is a better way to do it?*/ | ||
1321 | 1295 | cairo_set_matrix(cairo, &orig_matrix); | ||
1322 | 1296 | cairo_transform(cairo, &matrix); | ||
1323 | 1297 | if (cairo_shape) { | ||
1324 | 1298 | cairo_save (cairo_shape); | ||
1325 | 1299 | cairo_set_matrix(cairo_shape, &orig_matrix); | ||
1326 | 1300 | cairo_transform(cairo_shape, &matrix); | ||
1327 | 1301 | } | ||
1328 | 1302 | cairo_pattern_destroy(stroke_pattern); | ||
1329 | 1303 | cairo_pattern_reference(fill_pattern); | ||
1330 | 1304 | stroke_pattern = fill_pattern; | ||
1331 | 1305 | return gFalse; | ||
1332 | 1306 | } | ||
1333 | 1307 | |||
1334 | 1308 | void CairoOutputDev::endType3Char(GfxState *state) { | ||
1335 | 1309 | cairo_restore (cairo); | ||
1336 | 1310 | if (cairo_shape) { | ||
1337 | 1311 | cairo_restore (cairo_shape); | ||
1338 | 1312 | } | ||
1339 | 1313 | } | ||
1340 | 1314 | |||
1341 | 1315 | void CairoOutputDev::type3D0(GfxState *state, double wx, double wy) { | ||
1342 | 1316 | t3_glyph_wx = wx; | ||
1343 | 1317 | t3_glyph_wy = wy; | ||
1344 | 1318 | } | ||
1345 | 1319 | |||
1346 | 1320 | void CairoOutputDev::type3D1(GfxState *state, double wx, double wy, | ||
1347 | 1321 | double llx, double lly, double urx, double ury) { | ||
1348 | 1322 | t3_glyph_wx = wx; | ||
1349 | 1323 | t3_glyph_wy = wy; | ||
1350 | 1324 | t3_glyph_bbox[0] = llx; | ||
1351 | 1325 | t3_glyph_bbox[1] = lly; | ||
1352 | 1326 | t3_glyph_bbox[2] = urx; | ||
1353 | 1327 | t3_glyph_bbox[3] = ury; | ||
1354 | 1328 | t3_glyph_has_bbox = gTrue; | ||
1355 | 1329 | } | ||
1356 | 1330 | |||
1357 | 1331 | void CairoOutputDev::beginTextObject(GfxState *state) { | ||
1358 | 1332 | } | ||
1359 | 1333 | |||
1360 | 1334 | void CairoOutputDev::endTextObject(GfxState *state) { | ||
1361 | 1335 | if (textClipPath) { | ||
1362 | 1336 | // clip the accumulated text path | ||
1363 | 1337 | cairo_append_path (cairo, textClipPath); | ||
1364 | 1338 | cairo_clip (cairo); | ||
1365 | 1339 | if (cairo_shape) { | ||
1366 | 1340 | cairo_append_path (cairo_shape, textClipPath); | ||
1367 | 1341 | cairo_clip (cairo_shape); | ||
1368 | 1342 | } | ||
1369 | 1343 | cairo_path_destroy (textClipPath); | ||
1370 | 1344 | textClipPath = NULL; | ||
1371 | 1345 | } | ||
1372 | 1346 | } | ||
1373 | 1347 | |||
1374 | 1348 | void CairoOutputDev::beginActualText(GfxState *state, GooString *text) | ||
1375 | 1349 | { | ||
1376 | 1350 | if (this->text) | ||
1377 | 1351 | actualText->begin(state, text); | ||
1378 | 1352 | } | ||
1379 | 1353 | |||
1380 | 1354 | void CairoOutputDev::endActualText(GfxState *state) | ||
1381 | 1355 | { | ||
1382 | 1356 | if (text) | ||
1383 | 1357 | actualText->end(state); | ||
1384 | 1358 | } | ||
1385 | 1359 | |||
1386 | 1360 | static inline int splashRound(SplashCoord x) { | ||
1387 | 1361 | return (int)floor(x + 0.5); | ||
1388 | 1362 | } | ||
1389 | 1363 | |||
1390 | 1364 | static inline int splashCeil(SplashCoord x) { | ||
1391 | 1365 | return (int)ceil(x); | ||
1392 | 1366 | } | ||
1393 | 1367 | |||
1394 | 1368 | static inline int splashFloor(SplashCoord x) { | ||
1395 | 1369 | return (int)floor(x); | ||
1396 | 1370 | } | ||
1397 | 1371 | |||
1398 | 1372 | static | ||
1399 | 1373 | cairo_surface_t *cairo_surface_create_similar_clip (cairo_t *cairo, cairo_content_t content) | ||
1400 | 1374 | { | ||
1401 | 1375 | double x1, y1, x2, y2; | ||
1402 | 1376 | int width, height; | ||
1403 | 1377 | cairo_clip_extents (cairo, &x1, &y1, &x2, &y2); | ||
1404 | 1378 | cairo_matrix_t matrix; | ||
1405 | 1379 | cairo_get_matrix (cairo, &matrix); | ||
1406 | 1380 | //cairo_matrix_transform_point(&matrix, &x1, &y1); | ||
1407 | 1381 | //cairo_matrix_transform_point(&matrix, &x2, &y2);*/ | ||
1408 | 1382 | cairo_user_to_device(cairo, &x1, &y1); | ||
1409 | 1383 | cairo_user_to_device(cairo, &x2, &y2); | ||
1410 | 1384 | width = splashCeil(x2) - splashFloor(x1); | ||
1411 | 1385 | //XXX: negative matrix | ||
1412 | 1386 | ////height = splashCeil(y2) - splashFloor(y1); | ||
1413 | 1387 | height = splashFloor(y1) - splashCeil(y2); | ||
1414 | 1388 | cairo_surface_t *target = cairo_get_target (cairo); | ||
1415 | 1389 | cairo_surface_t *result; | ||
1416 | 1390 | |||
1417 | 1391 | result = cairo_surface_create_similar (target, content, width, height); | ||
1418 | 1392 | double x_offset, y_offset; | ||
1419 | 1393 | cairo_surface_get_device_offset(target, &x_offset, &y_offset); | ||
1420 | 1394 | cairo_surface_set_device_offset(result, x_offset, y_offset); | ||
1421 | 1395 | |||
1422 | 1396 | |||
1423 | 1397 | return result; | ||
1424 | 1398 | } | ||
1425 | 1399 | |||
1426 | 1400 | |||
1427 | 1401 | |||
1428 | 1402 | void CairoOutputDev::beginTransparencyGroup(GfxState * /*state*/, double * /*bbox*/, | ||
1429 | 1403 | GfxColorSpace * blendingColorSpace, | ||
1430 | 1404 | GBool /*isolated*/, GBool knockout, | ||
1431 | 1405 | GBool forSoftMask) { | ||
1432 | 1406 | /* push color space */ | ||
1433 | 1407 | ColorSpaceStack* css = new ColorSpaceStack; | ||
1434 | 1408 | css->cs = blendingColorSpace; | ||
1435 | 1409 | css->knockout = knockout; | ||
1436 | 1410 | cairo_get_matrix(cairo, &css->group_matrix); | ||
1437 | 1411 | css->next = groupColorSpaceStack; | ||
1438 | 1412 | groupColorSpaceStack = css; | ||
1439 | 1413 | |||
1440 | 1414 | LOG(printf ("begin transparency group. knockout: %s\n", knockout ? "yes":"no")); | ||
1441 | 1415 | |||
1442 | 1416 | if (knockout) { | ||
1443 | 1417 | knockoutCount++; | ||
1444 | 1418 | if (!cairo_shape) { | ||
1445 | 1419 | /* create a surface for tracking the shape */ | ||
1446 | 1420 | cairo_surface_t *cairo_shape_surface = cairo_surface_create_similar_clip (cairo, CAIRO_CONTENT_ALPHA); | ||
1447 | 1421 | cairo_shape = cairo_create (cairo_shape_surface); | ||
1448 | 1422 | cairo_surface_destroy (cairo_shape_surface); | ||
1449 | 1423 | |||
1450 | 1424 | /* the color doesn't matter as long as it is opaque */ | ||
1451 | 1425 | cairo_set_source_rgb (cairo_shape, 0, 0, 0); | ||
1452 | 1426 | cairo_matrix_t matrix; | ||
1453 | 1427 | cairo_get_matrix (cairo, &matrix); | ||
1454 | 1428 | //printMatrix(&matrix); | ||
1455 | 1429 | cairo_set_matrix (cairo_shape, &matrix); | ||
1456 | 1430 | } else { | ||
1457 | 1431 | cairo_reference (cairo_shape); | ||
1458 | 1432 | } | ||
1459 | 1433 | } | ||
1460 | 1434 | if (groupColorSpaceStack->next && groupColorSpaceStack->next->knockout) { | ||
1461 | 1435 | /* we need to track the shape */ | ||
1462 | 1436 | cairo_push_group (cairo_shape); | ||
1463 | 1437 | } | ||
1464 | 1438 | if (0 && forSoftMask) | ||
1465 | 1439 | cairo_push_group_with_content (cairo, CAIRO_CONTENT_ALPHA); | ||
1466 | 1440 | else | ||
1467 | 1441 | cairo_push_group (cairo); | ||
1468 | 1442 | |||
1469 | 1443 | /* push_group has an implicit cairo_save() */ | ||
1470 | 1444 | if (knockout) { | ||
1471 | 1445 | /*XXX: let's hope this matches the semantics needed */ | ||
1472 | 1446 | cairo_set_operator(cairo, CAIRO_OPERATOR_SOURCE); | ||
1473 | 1447 | } else { | ||
1474 | 1448 | cairo_set_operator(cairo, CAIRO_OPERATOR_OVER); | ||
1475 | 1449 | } | ||
1476 | 1450 | } | ||
1477 | 1451 | |||
1478 | 1452 | void CairoOutputDev::endTransparencyGroup(GfxState * /*state*/) { | ||
1479 | 1453 | if (group) | ||
1480 | 1454 | cairo_pattern_destroy(group); | ||
1481 | 1455 | group = cairo_pop_group (cairo); | ||
1482 | 1456 | |||
1483 | 1457 | LOG(printf ("end transparency group\n")); | ||
1484 | 1458 | |||
1485 | 1459 | if (groupColorSpaceStack->next && groupColorSpaceStack->next->knockout) { | ||
1486 | 1460 | if (shape) | ||
1487 | 1461 | cairo_pattern_destroy(shape); | ||
1488 | 1462 | shape = cairo_pop_group (cairo_shape); | ||
1489 | 1463 | } | ||
1490 | 1464 | } | ||
1491 | 1465 | |||
1492 | 1466 | void CairoOutputDev::paintTransparencyGroup(GfxState * /*state*/, double * /*bbox*/) { | ||
1493 | 1467 | LOG(printf ("paint transparency group\n")); | ||
1494 | 1468 | |||
1495 | 1469 | cairo_save (cairo); | ||
1496 | 1470 | cairo_set_matrix (cairo, &groupColorSpaceStack->group_matrix); | ||
1497 | 1471 | cairo_set_source (cairo, group); | ||
1498 | 1472 | |||
1499 | 1473 | if (!mask) { | ||
1500 | 1474 | //XXX: deal with mask && shape case | ||
1501 | 1475 | if (shape) { | ||
1502 | 1476 | cairo_save (cairo); | ||
1503 | 1477 | |||
1504 | 1478 | /* OPERATOR_SOURCE w/ a mask is defined as (src IN mask) ADD (dest OUT mask) | ||
1505 | 1479 | * however our source has already been clipped to mask so we only need to | ||
1506 | 1480 | * do ADD and OUT */ | ||
1507 | 1481 | |||
1508 | 1482 | /* clear the shape mask */ | ||
1509 | 1483 | cairo_set_source (cairo, shape); | ||
1510 | 1484 | cairo_set_operator (cairo, CAIRO_OPERATOR_DEST_OUT); | ||
1511 | 1485 | cairo_paint (cairo); | ||
1512 | 1486 | |||
1513 | 1487 | cairo_set_operator (cairo, CAIRO_OPERATOR_ADD); | ||
1514 | 1488 | cairo_set_source (cairo, group); | ||
1515 | 1489 | cairo_paint (cairo); | ||
1516 | 1490 | |||
1517 | 1491 | cairo_restore (cairo); | ||
1518 | 1492 | |||
1519 | 1493 | cairo_pattern_destroy (shape); | ||
1520 | 1494 | shape = NULL; | ||
1521 | 1495 | } else { | ||
1522 | 1496 | cairo_paint_with_alpha (cairo, fill_opacity); | ||
1523 | 1497 | } | ||
1524 | 1498 | cairo_status_t status = cairo_status(cairo); | ||
1525 | 1499 | if (status) | ||
1526 | 1500 | printf("BAD status: %s\n", cairo_status_to_string(status)); | ||
1527 | 1501 | } else { | ||
1528 | 1502 | if (fill_opacity < 1.0) { | ||
1529 | 1503 | cairo_push_group(cairo); | ||
1530 | 1504 | } | ||
1531 | 1505 | cairo_save(cairo); | ||
1532 | 1506 | cairo_set_matrix(cairo, &mask_matrix); | ||
1533 | 1507 | cairo_mask(cairo, mask); | ||
1534 | 1508 | cairo_restore(cairo); | ||
1535 | 1509 | if (fill_opacity < 1.0) { | ||
1536 | 1510 | cairo_pop_group_to_source(cairo); | ||
1537 | 1511 | cairo_paint_with_alpha (cairo, fill_opacity); | ||
1538 | 1512 | } | ||
1539 | 1513 | cairo_pattern_destroy(mask); | ||
1540 | 1514 | mask = NULL; | ||
1541 | 1515 | } | ||
1542 | 1516 | |||
1543 | 1517 | popTransparencyGroup(); | ||
1544 | 1518 | cairo_restore(cairo); | ||
1545 | 1519 | } | ||
1546 | 1520 | |||
1547 | 1521 | static int luminocity(uint32_t x) | ||
1548 | 1522 | { | ||
1549 | 1523 | int r = (x >> 16) & 0xff; | ||
1550 | 1524 | int g = (x >> 8) & 0xff; | ||
1551 | 1525 | int b = (x >> 0) & 0xff; | ||
1552 | 1526 | // an arbitrary integer approximation of .3*r + .59*g + .11*b | ||
1553 | 1527 | int y = (r*19661+g*38666+b*7209 + 32829)>>16; | ||
1554 | 1528 | return y; | ||
1555 | 1529 | } | ||
1556 | 1530 | |||
1557 | 1531 | |||
1558 | 1532 | /* XXX: do we need to deal with shape here? */ | ||
1559 | 1533 | void CairoOutputDev::setSoftMask(GfxState * state, double * bbox, GBool alpha, | ||
1560 | 1534 | Function * transferFunc, GfxColor * backdropColor) { | ||
1561 | 1535 | cairo_pattern_destroy(mask); | ||
1562 | 1536 | |||
1563 | 1537 | LOG(printf ("set softMask\n")); | ||
1564 | 1538 | |||
1565 | 1539 | if (alpha == false) { | ||
1566 | 1540 | /* We need to mask according to the luminocity of the group. | ||
1567 | 1541 | * So we paint the group to an image surface convert it to a luminocity map | ||
1568 | 1542 | * and then use that as the mask. */ | ||
1569 | 1543 | |||
1570 | 1544 | /* Get clip extents in device space */ | ||
1571 | 1545 | double x1, y1, x2, y2, x_min, y_min, x_max, y_max; | ||
1572 | 1546 | cairo_clip_extents(cairo, &x1, &y1, &x2, &y2); | ||
1573 | 1547 | cairo_user_to_device(cairo, &x1, &y1); | ||
1574 | 1548 | cairo_user_to_device(cairo, &x2, &y2); | ||
1575 | 1549 | x_min = MIN(x1, x2); | ||
1576 | 1550 | y_min = MIN(y1, y2); | ||
1577 | 1551 | x_max = MAX(x1, x2); | ||
1578 | 1552 | y_max = MAX(y1, y2); | ||
1579 | 1553 | cairo_clip_extents(cairo, &x1, &y1, &x2, &y2); | ||
1580 | 1554 | cairo_user_to_device(cairo, &x1, &y2); | ||
1581 | 1555 | cairo_user_to_device(cairo, &x2, &y1); | ||
1582 | 1556 | x_min = MIN(x_min,MIN(x1, x2)); | ||
1583 | 1557 | y_min = MIN(y_min,MIN(y1, y2)); | ||
1584 | 1558 | x_max = MAX(x_max,MAX(x1, x2)); | ||
1585 | 1559 | y_max = MAX(y_max,MAX(y1, y2)); | ||
1586 | 1560 | |||
1587 | 1561 | int width = (int)(ceil(x_max) - floor(x_min)); | ||
1588 | 1562 | int height = (int)(ceil(y_max) - floor(y_min)); | ||
1589 | 1563 | |||
1590 | 1564 | /* Get group device offset */ | ||
1591 | 1565 | double x_offset, y_offset; | ||
1592 | 1566 | if (cairo_get_group_target(cairo) == cairo_get_target(cairo)) { | ||
1593 | 1567 | cairo_surface_get_device_offset(cairo_get_group_target(cairo), &x_offset, &y_offset); | ||
1594 | 1568 | } else { | ||
1595 | 1569 | cairo_surface_t *pats; | ||
1596 | 1570 | cairo_pattern_get_surface(group, &pats); | ||
1597 | 1571 | cairo_surface_get_device_offset(pats, &x_offset, &y_offset); | ||
1598 | 1572 | } | ||
1599 | 1573 | |||
1600 | 1574 | /* Adjust extents by group offset */ | ||
1601 | 1575 | x_min += x_offset; | ||
1602 | 1576 | y_min += y_offset; | ||
1603 | 1577 | |||
1604 | 1578 | cairo_surface_t *source = cairo_image_surface_create(CAIRO_FORMAT_ARGB32, width, height); | ||
1605 | 1579 | cairo_t *maskCtx = cairo_create(source); | ||
1606 | 1580 | |||
1607 | 1581 | //XXX: hopefully this uses the correct color space */ | ||
1608 | 1582 | GfxRGB backdropColorRGB; | ||
1609 | 1583 | groupColorSpaceStack->cs->getRGB(backdropColor, &backdropColorRGB); | ||
1610 | 1584 | /* paint the backdrop */ | ||
1611 | 1585 | cairo_set_source_rgb(maskCtx, | ||
1612 | 1586 | colToDbl(backdropColorRGB.r), | ||
1613 | 1587 | colToDbl(backdropColorRGB.g), | ||
1614 | 1588 | colToDbl(backdropColorRGB.b)); | ||
1615 | 1589 | cairo_paint(maskCtx); | ||
1616 | 1590 | |||
1617 | 1591 | /* Copy source ctm to mask ctm and translate origin so that the | ||
1618 | 1592 | * mask appears it the same location on the source surface. */ | ||
1619 | 1593 | cairo_matrix_t mat, tmat; | ||
1620 | 1594 | cairo_matrix_init_translate(&tmat, -x_min, -y_min); | ||
1621 | 1595 | cairo_get_matrix(cairo, &mat); | ||
1622 | 1596 | cairo_matrix_multiply(&mat, &mat, &tmat); | ||
1623 | 1597 | cairo_set_matrix(maskCtx, &mat); | ||
1624 | 1598 | |||
1625 | 1599 | /* make the device offset of the new mask match that of the group */ | ||
1626 | 1600 | cairo_surface_set_device_offset(source, x_offset, y_offset); | ||
1627 | 1601 | |||
1628 | 1602 | /* paint the group */ | ||
1629 | 1603 | cairo_set_source(maskCtx, group); | ||
1630 | 1604 | cairo_paint(maskCtx); | ||
1631 | 1605 | |||
1632 | 1606 | /* XXX status = cairo_status(maskCtx); */ | ||
1633 | 1607 | cairo_destroy(maskCtx); | ||
1634 | 1608 | |||
1635 | 1609 | /* convert to a luminocity map */ | ||
1636 | 1610 | uint32_t *source_data = (uint32_t*)cairo_image_surface_get_data(source); | ||
1637 | 1611 | /* get stride in units of 32 bits */ | ||
1638 | 1612 | int stride = cairo_image_surface_get_stride(source)/4; | ||
1639 | 1613 | for (int y=0; y<height; y++) { | ||
1640 | 1614 | for (int x=0; x<width; x++) { | ||
1641 | 1615 | int lum; | ||
1642 | 1616 | lum = luminocity(source_data[y*stride + x]); | ||
1643 | 1617 | if (transferFunc) { | ||
1644 | 1618 | double lum_in, lum_out; | ||
1645 | 1619 | lum_in = lum/256.0; | ||
1646 | 1620 | transferFunc->transform(&lum_in, &lum_out); | ||
1647 | 1621 | lum = (int)(lum_out * 255.0 + 0.5); | ||
1648 | 1622 | } | ||
1649 | 1623 | source_data[y*stride + x] = lum << 24; | ||
1650 | 1624 | } | ||
1651 | 1625 | } | ||
1652 | 1626 | cairo_surface_mark_dirty (source); | ||
1653 | 1627 | |||
1654 | 1628 | /* setup the new mask pattern */ | ||
1655 | 1629 | mask = cairo_pattern_create_for_surface(source); | ||
1656 | 1630 | cairo_get_matrix(cairo, &mask_matrix); | ||
1657 | 1631 | |||
1658 | 1632 | if (cairo_get_group_target(cairo) == cairo_get_target(cairo)) { | ||
1659 | 1633 | cairo_pattern_set_matrix(mask, &mat); | ||
1660 | 1634 | } else { | ||
1661 | 1635 | cairo_matrix_t patMatrix; | ||
1662 | 1636 | cairo_pattern_get_matrix(group, &patMatrix); | ||
1663 | 1637 | /* Apply x_min, y_min offset to it appears in the same location as source. */ | ||
1664 | 1638 | cairo_matrix_multiply(&patMatrix, &patMatrix, &tmat); | ||
1665 | 1639 | cairo_pattern_set_matrix(mask, &patMatrix); | ||
1666 | 1640 | } | ||
1667 | 1641 | |||
1668 | 1642 | cairo_surface_destroy(source); | ||
1669 | 1643 | } else { | ||
1670 | 1644 | mask = cairo_pattern_reference(group); | ||
1671 | 1645 | cairo_get_matrix(cairo, &mask_matrix); | ||
1672 | 1646 | } | ||
1673 | 1647 | |||
1674 | 1648 | popTransparencyGroup(); | ||
1675 | 1649 | } | ||
1676 | 1650 | |||
1677 | 1651 | void CairoOutputDev::popTransparencyGroup() { | ||
1678 | 1652 | /* pop color space */ | ||
1679 | 1653 | ColorSpaceStack *css = groupColorSpaceStack; | ||
1680 | 1654 | if (css->knockout) { | ||
1681 | 1655 | knockoutCount--; | ||
1682 | 1656 | if (!knockoutCount) { | ||
1683 | 1657 | /* we don't need to track the shape anymore because | ||
1684 | 1658 | * we are not above any knockout groups */ | ||
1685 | 1659 | cairo_destroy(cairo_shape); | ||
1686 | 1660 | cairo_shape = NULL; | ||
1687 | 1661 | } | ||
1688 | 1662 | } | ||
1689 | 1663 | groupColorSpaceStack = css->next; | ||
1690 | 1664 | delete css; | ||
1691 | 1665 | } | ||
1692 | 1666 | |||
1693 | 1667 | |||
1694 | 1668 | void CairoOutputDev::clearSoftMask(GfxState * /*state*/) { | ||
1695 | 1669 | if (mask) | ||
1696 | 1670 | cairo_pattern_destroy(mask); | ||
1697 | 1671 | mask = NULL; | ||
1698 | 1672 | } | ||
1699 | 1673 | |||
1700 | 1674 | /* Taken from cairo/doc/tutorial/src/singular.c */ | ||
1701 | 1675 | static void | ||
1702 | 1676 | get_singular_values (const cairo_matrix_t *matrix, | ||
1703 | 1677 | double *major, | ||
1704 | 1678 | double *minor) | ||
1705 | 1679 | { | ||
1706 | 1680 | double xx = matrix->xx, xy = matrix->xy; | ||
1707 | 1681 | double yx = matrix->yx, yy = matrix->yy; | ||
1708 | 1682 | |||
1709 | 1683 | double a = xx*xx+yx*yx; | ||
1710 | 1684 | double b = xy*xy+yy*yy; | ||
1711 | 1685 | double k = xx*xy+yx*yy; | ||
1712 | 1686 | |||
1713 | 1687 | double f = (a+b) * .5; | ||
1714 | 1688 | double g = (a-b) * .5; | ||
1715 | 1689 | double delta = sqrt (g*g + k*k); | ||
1716 | 1690 | |||
1717 | 1691 | if (major) | ||
1718 | 1692 | *major = sqrt (f + delta); | ||
1719 | 1693 | if (minor) | ||
1720 | 1694 | *minor = sqrt (f - delta); | ||
1721 | 1695 | } | ||
1722 | 1696 | |||
1723 | 1697 | void CairoOutputDev::getScaledSize(int orig_width, | ||
1724 | 1698 | int orig_height, | ||
1725 | 1699 | int *scaledWidth, | ||
1726 | 1700 | int *scaledHeight) { | ||
1727 | 1701 | cairo_matrix_t matrix; | ||
1728 | 1702 | cairo_get_matrix(cairo, &matrix); | ||
1729 | 1703 | |||
1730 | 1704 | double xScale; | ||
1731 | 1705 | double yScale; | ||
1732 | 1706 | if (orig_width > orig_height) | ||
1733 | 1707 | get_singular_values (&matrix, &xScale, &yScale); | ||
1734 | 1708 | else | ||
1735 | 1709 | get_singular_values (&matrix, &yScale, &xScale); | ||
1736 | 1710 | |||
1737 | 1711 | int tx, tx2, ty, ty2; /* the integer co-oridinates of the resulting image */ | ||
1738 | 1712 | if (xScale >= 0) { | ||
1739 | 1713 | tx = splashRound(matrix.x0 - 0.01); | ||
1740 | 1714 | tx2 = splashRound(matrix.x0 + xScale + 0.01) - 1; | ||
1741 | 1715 | } else { | ||
1742 | 1716 | tx = splashRound(matrix.x0 + 0.01) - 1; | ||
1743 | 1717 | tx2 = splashRound(matrix.x0 + xScale - 0.01); | ||
1744 | 1718 | } | ||
1745 | 1719 | *scaledWidth = abs(tx2 - tx) + 1; | ||
1746 | 1720 | //scaledWidth = splashRound(fabs(xScale)); | ||
1747 | 1721 | if (*scaledWidth == 0) { | ||
1748 | 1722 | // technically, this should draw nothing, but it generally seems | ||
1749 | 1723 | // better to draw a one-pixel-wide stripe rather than throwing it | ||
1750 | 1724 | // away | ||
1751 | 1725 | *scaledWidth = 1; | ||
1752 | 1726 | } | ||
1753 | 1727 | if (yScale >= 0) { | ||
1754 | 1728 | ty = splashFloor(matrix.y0 + 0.01); | ||
1755 | 1729 | ty2 = splashCeil(matrix.y0 + yScale - 0.01); | ||
1756 | 1730 | } else { | ||
1757 | 1731 | ty = splashCeil(matrix.y0 - 0.01); | ||
1758 | 1732 | ty2 = splashFloor(matrix.y0 + yScale + 0.01); | ||
1759 | 1733 | } | ||
1760 | 1734 | *scaledHeight = abs(ty2 - ty); | ||
1761 | 1735 | if (*scaledHeight == 0) { | ||
1762 | 1736 | *scaledHeight = 1; | ||
1763 | 1737 | } | ||
1764 | 1738 | } | ||
1765 | 1739 | |||
1766 | 1740 | cairo_surface_t *CairoOutputDev::downscaleSurface(cairo_surface_t *orig_surface) { | ||
1767 | 1741 | cairo_surface_t *dest_surface; | ||
1768 | 1742 | unsigned char *dest_buffer; | ||
1769 | 1743 | int dest_stride; | ||
1770 | 1744 | unsigned char *orig_buffer; | ||
1771 | 1745 | int orig_width, orig_height; | ||
1772 | 1746 | int orig_stride; | ||
1773 | 1747 | int scaledHeight; | ||
1774 | 1748 | int scaledWidth; | ||
1775 | 1749 | GBool res; | ||
1776 | 1750 | |||
1777 | 1751 | if (printing) | ||
1778 | 1752 | return NULL; | ||
1779 | 1753 | |||
1780 | 1754 | orig_width = cairo_image_surface_get_width (orig_surface); | ||
1781 | 1755 | orig_height = cairo_image_surface_get_height (orig_surface); | ||
1782 | 1756 | getScaledSize (orig_width, orig_height, &scaledWidth, &scaledHeight); | ||
1783 | 1757 | if (scaledWidth >= orig_width || scaledHeight >= orig_height) | ||
1784 | 1758 | return NULL; | ||
1785 | 1759 | |||
1786 | 1760 | dest_surface = cairo_surface_create_similar (orig_surface, | ||
1787 | 1761 | cairo_surface_get_content (orig_surface), | ||
1788 | 1762 | scaledWidth, scaledHeight); | ||
1789 | 1763 | dest_buffer = cairo_image_surface_get_data (dest_surface); | ||
1790 | 1764 | dest_stride = cairo_image_surface_get_stride (dest_surface); | ||
1791 | 1765 | |||
1792 | 1766 | orig_buffer = cairo_image_surface_get_data (orig_surface); | ||
1793 | 1767 | orig_stride = cairo_image_surface_get_stride (orig_surface); | ||
1794 | 1768 | |||
1795 | 1769 | res = downscale_box_filter((uint32_t *)orig_buffer, | ||
1796 | 1770 | orig_stride, orig_width, orig_height, | ||
1797 | 1771 | scaledWidth, scaledHeight, 0, 0, | ||
1798 | 1772 | scaledWidth, scaledHeight, | ||
1799 | 1773 | (uint32_t *)dest_buffer, dest_stride); | ||
1800 | 1774 | if (!res) { | ||
1801 | 1775 | cairo_surface_destroy (dest_surface); | ||
1802 | 1776 | return NULL; | ||
1803 | 1777 | } | ||
1804 | 1778 | |||
1805 | 1779 | return dest_surface; | ||
1806 | 1780 | |||
1807 | 1781 | } | ||
1808 | 1782 | |||
1809 | 1783 | cairo_filter_t | ||
1810 | 1784 | CairoOutputDev::getFilterForSurface(cairo_surface_t *image, | ||
1811 | 1785 | GBool interpolate) | ||
1812 | 1786 | { | ||
1813 | 1787 | if (interpolate) | ||
1814 | 1788 | return CAIRO_FILTER_BILINEAR; | ||
1815 | 1789 | |||
1816 | 1790 | int orig_width = cairo_image_surface_get_width (image); | ||
1817 | 1791 | int orig_height = cairo_image_surface_get_height (image); | ||
1818 | 1792 | if (orig_width == 0 || orig_height == 0) | ||
1819 | 1793 | return CAIRO_FILTER_NEAREST; | ||
1820 | 1794 | |||
1821 | 1795 | int scaled_width, scaled_height; | ||
1822 | 1796 | getScaledSize (orig_width, orig_height, &scaled_width, &scaled_height); | ||
1823 | 1797 | |||
1824 | 1798 | /* When scale factor is >= 400% we don't interpolate. See bugs #25268, #9860 */ | ||
1825 | 1799 | if (scaled_width / orig_width >= 4 || scaled_height / orig_height >= 4) | ||
1826 | 1800 | return CAIRO_FILTER_NEAREST; | ||
1827 | 1801 | |||
1828 | 1802 | return CAIRO_FILTER_BILINEAR; | ||
1829 | 1803 | } | ||
1830 | 1804 | |||
1831 | 1805 | void CairoOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, | ||
1832 | 1806 | int width, int height, GBool invert, | ||
1833 | 1807 | GBool interpolate, GBool inlineImg) { | ||
1834 | 1808 | |||
1835 | 1809 | /* FIXME: Doesn't the image mask support any colorspace? */ | ||
1836 | 1810 | cairo_set_source (cairo, fill_pattern); | ||
1837 | 1811 | |||
1838 | 1812 | /* work around a cairo bug when scaling 1x1 surfaces */ | ||
1839 | 1813 | if (width == 1 && height == 1) { | ||
1840 | 1814 | ImageStream *imgStr; | ||
1841 | 1815 | Guchar pix; | ||
1842 | 1816 | int invert_bit; | ||
1843 | 1817 | |||
1844 | 1818 | imgStr = new ImageStream(str, width, 1, 1); | ||
1845 | 1819 | imgStr->reset(); | ||
1846 | 1820 | imgStr->getPixel(&pix); | ||
1847 | 1821 | imgStr->close(); | ||
1848 | 1822 | delete imgStr; | ||
1849 | 1823 | |||
1850 | 1824 | invert_bit = invert ? 1 : 0; | ||
1851 | 1825 | if (pix ^ invert_bit) | ||
1852 | 1826 | return; | ||
1853 | 1827 | |||
1854 | 1828 | cairo_save (cairo); | ||
1855 | 1829 | cairo_rectangle (cairo, 0., 0., width, height); | ||
1856 | 1830 | cairo_fill (cairo); | ||
1857 | 1831 | cairo_restore (cairo); | ||
1858 | 1832 | if (cairo_shape) { | ||
1859 | 1833 | cairo_save (cairo_shape); | ||
1860 | 1834 | cairo_rectangle (cairo_shape, 0., 0., width, height); | ||
1861 | 1835 | cairo_fill (cairo_shape); | ||
1862 | 1836 | cairo_restore (cairo_shape); | ||
1863 | 1837 | } | ||
1864 | 1838 | return; | ||
1865 | 1839 | } | ||
1866 | 1840 | |||
1867 | 1841 | /* shape is 1.0 for painted areas, 0.0 for unpainted ones */ | ||
1868 | 1842 | |||
1869 | 1843 | cairo_matrix_t matrix; | ||
1870 | 1844 | cairo_get_matrix (cairo, &matrix); | ||
1871 | 1845 | //XXX: it is possible that we should only do sub pixel positioning if | ||
1872 | 1846 | // we are rendering fonts */ | ||
1873 | 1847 | if (!printing && prescaleImages | ||
1874 | 1848 | /* not rotated */ | ||
1875 | 1849 | && matrix.xy == 0 && matrix.yx == 0 | ||
1876 | 1850 | /* axes not flipped / not 180 deg rotated */ | ||
1877 | 1851 | && matrix.xx > 0 && (upsideDown() ? -1 : 1) * matrix.yy > 0) { | ||
1878 | 1852 | drawImageMaskPrescaled(state, ref, str, width, height, invert, interpolate, inlineImg); | ||
1879 | 1853 | } else { | ||
1880 | 1854 | drawImageMaskRegular(state, ref, str, width, height, invert, interpolate, inlineImg); | ||
1881 | 1855 | } | ||
1882 | 1856 | |||
1883 | 1857 | } | ||
1884 | 1858 | |||
1885 | 1859 | void CairoOutputDev::setSoftMaskFromImageMask(GfxState *state, Object *ref, Stream *str, | ||
1886 | 1860 | int width, int height, GBool invert, | ||
1887 | 1861 | GBool inlineImg, double *baseMatrix) { | ||
1888 | 1862 | |||
1889 | 1863 | /* FIXME: Doesn't the image mask support any colorspace? */ | ||
1890 | 1864 | cairo_set_source (cairo, fill_pattern); | ||
1891 | 1865 | |||
1892 | 1866 | /* work around a cairo bug when scaling 1x1 surfaces */ | ||
1893 | 1867 | if (width == 1 && height == 1) { | ||
1894 | 1868 | ImageStream *imgStr; | ||
1895 | 1869 | Guchar pix; | ||
1896 | 1870 | int invert_bit; | ||
1897 | 1871 | |||
1898 | 1872 | imgStr = new ImageStream(str, width, 1, 1); | ||
1899 | 1873 | imgStr->reset(); | ||
1900 | 1874 | imgStr->getPixel(&pix); | ||
1901 | 1875 | imgStr->close(); | ||
1902 | 1876 | delete imgStr; | ||
1903 | 1877 | |||
1904 | 1878 | invert_bit = invert ? 1 : 0; | ||
1905 | 1879 | if (pix ^ invert_bit) | ||
1906 | 1880 | return; | ||
1907 | 1881 | |||
1908 | 1882 | cairo_save (cairo); | ||
1909 | 1883 | cairo_rectangle (cairo, 0., 0., width, height); | ||
1910 | 1884 | cairo_fill (cairo); | ||
1911 | 1885 | cairo_restore (cairo); | ||
1912 | 1886 | if (cairo_shape) { | ||
1913 | 1887 | cairo_save (cairo_shape); | ||
1914 | 1888 | cairo_rectangle (cairo_shape, 0., 0., width, height); | ||
1915 | 1889 | cairo_fill (cairo_shape); | ||
1916 | 1890 | cairo_restore (cairo_shape); | ||
1917 | 1891 | } | ||
1918 | 1892 | return; | ||
1919 | 1893 | } | ||
1920 | 1894 | |||
1921 | 1895 | cairo_push_group_with_content (cairo, CAIRO_CONTENT_ALPHA); | ||
1922 | 1896 | |||
1923 | 1897 | /* shape is 1.0 for painted areas, 0.0 for unpainted ones */ | ||
1924 | 1898 | |||
1925 | 1899 | cairo_matrix_t matrix; | ||
1926 | 1900 | cairo_get_matrix (cairo, &matrix); | ||
1927 | 1901 | //XXX: it is possible that we should only do sub pixel positioning if | ||
1928 | 1902 | // we are rendering fonts */ | ||
1929 | 1903 | if (!printing && prescaleImages && matrix.xy == 0.0 && matrix.yx == 0.0) { | ||
1930 | 1904 | drawImageMaskPrescaled(state, ref, str, width, height, invert, gFalse, inlineImg); | ||
1931 | 1905 | } else { | ||
1932 | 1906 | drawImageMaskRegular(state, ref, str, width, height, invert, gFalse, inlineImg); | ||
1933 | 1907 | } | ||
1934 | 1908 | |||
1935 | 1909 | if (state->getFillColorSpace()->getMode() == csPattern) { | ||
1936 | 1910 | cairo_set_source_rgb (cairo, 1, 1, 1); | ||
1937 | 1911 | cairo_set_matrix (cairo, &mask_matrix); | ||
1938 | 1912 | cairo_mask (cairo, mask); | ||
1939 | 1913 | } | ||
1940 | 1914 | |||
1941 | 1915 | if (mask) | ||
1942 | 1916 | cairo_pattern_destroy (mask); | ||
1943 | 1917 | mask = cairo_pop_group (cairo); | ||
1944 | 1918 | |||
1945 | 1919 | saveState(state); | ||
1946 | 1920 | double bbox[4] = {0,0,1,1}; // dummy | ||
1947 | 1921 | beginTransparencyGroup(state, bbox, state->getFillColorSpace(), | ||
1948 | 1922 | gTrue, gFalse, gFalse); | ||
1949 | 1923 | } | ||
1950 | 1924 | |||
1951 | 1925 | void CairoOutputDev::unsetSoftMaskFromImageMask(GfxState *state, double *baseMatrix) { | ||
1952 | 1926 | double bbox[4] = {0,0,1,1}; // dummy | ||
1953 | 1927 | |||
1954 | 1928 | endTransparencyGroup(state); | ||
1955 | 1929 | restoreState(state); | ||
1956 | 1930 | paintTransparencyGroup(state, bbox); | ||
1957 | 1931 | clearSoftMask(state); | ||
1958 | 1932 | } | ||
1959 | 1933 | |||
1960 | 1934 | void CairoOutputDev::drawImageMaskRegular(GfxState *state, Object *ref, Stream *str, | ||
1961 | 1935 | int width, int height, GBool invert, | ||
1962 | 1936 | GBool interpolate, GBool inlineImg) { | ||
1963 | 1937 | unsigned char *buffer; | ||
1964 | 1938 | unsigned char *dest; | ||
1965 | 1939 | cairo_surface_t *image; | ||
1966 | 1940 | cairo_pattern_t *pattern; | ||
1967 | 1941 | int x, y, i, bit; | ||
1968 | 1942 | ImageStream *imgStr; | ||
1969 | 1943 | Guchar *pix; | ||
1970 | 1944 | cairo_matrix_t matrix; | ||
1971 | 1945 | int invert_bit; | ||
1972 | 1946 | int row_stride; | ||
1973 | 1947 | cairo_filter_t filter; | ||
1974 | 1948 | |||
1975 | 1949 | /* TODO: Do we want to cache these? */ | ||
1976 | 1950 | imgStr = new ImageStream(str, width, 1, 1); | ||
1977 | 1951 | imgStr->reset(); | ||
1978 | 1952 | |||
1979 | 1953 | image = cairo_image_surface_create (CAIRO_FORMAT_A1, width, height); | ||
1980 | 1954 | if (cairo_surface_status (image)) | ||
1981 | 1955 | goto cleanup; | ||
1982 | 1956 | |||
1983 | 1957 | buffer = cairo_image_surface_get_data (image); | ||
1984 | 1958 | row_stride = cairo_image_surface_get_stride (image); | ||
1985 | 1959 | |||
1986 | 1960 | invert_bit = invert ? 1 : 0; | ||
1987 | 1961 | |||
1988 | 1962 | for (y = 0; y < height; y++) { | ||
1989 | 1963 | pix = imgStr->getLine(); | ||
1990 | 1964 | dest = buffer + y * row_stride; | ||
1991 | 1965 | i = 0; | ||
1992 | 1966 | bit = 0; | ||
1993 | 1967 | for (x = 0; x < width; x++) { | ||
1994 | 1968 | if (bit == 0) | ||
1995 | 1969 | dest[i] = 0; | ||
1996 | 1970 | if (!(pix[x] ^ invert_bit)) { | ||
1997 | 1971 | #ifdef WORDS_BIGENDIAN | ||
1998 | 1972 | dest[i] |= (1 << (7 - bit)); | ||
1999 | 1973 | #else | ||
2000 | 1974 | dest[i] |= (1 << bit); | ||
2001 | 1975 | #endif | ||
2002 | 1976 | } | ||
2003 | 1977 | bit++; | ||
2004 | 1978 | if (bit > 7) { | ||
2005 | 1979 | bit = 0; | ||
2006 | 1980 | i++; | ||
2007 | 1981 | } | ||
2008 | 1982 | } | ||
2009 | 1983 | } | ||
2010 | 1984 | |||
2011 | 1985 | filter = getFilterForSurface (image, interpolate); | ||
2012 | 1986 | |||
2013 | 1987 | cairo_surface_mark_dirty (image); | ||
2014 | 1988 | pattern = cairo_pattern_create_for_surface (image); | ||
2015 | 1989 | cairo_surface_destroy (image); | ||
2016 | 1990 | if (cairo_pattern_status (pattern)) | ||
2017 | 1991 | goto cleanup; | ||
2018 | 1992 | |||
2019 | 1993 | LOG (printf ("drawImageMask %dx%d\n", width, height)); | ||
2020 | 1994 | |||
2021 | 1995 | cairo_pattern_set_filter (pattern, filter); | ||
2022 | 1996 | |||
2023 | 1997 | if (!printing) | ||
2024 | 1998 | cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD); | ||
2025 | 1999 | |||
2026 | 2000 | cairo_matrix_init_translate (&matrix, 0, height); | ||
2027 | 2001 | cairo_matrix_scale (&matrix, width, -height); | ||
2028 | 2002 | cairo_pattern_set_matrix (pattern, &matrix); | ||
2029 | 2003 | if (cairo_pattern_status (pattern)) { | ||
2030 | 2004 | cairo_pattern_destroy (pattern); | ||
2031 | 2005 | goto cleanup; | ||
2032 | 2006 | } | ||
2033 | 2007 | |||
2034 | 2008 | if (state->getFillColorSpace()->getMode() == csPattern) { | ||
2035 | 2009 | mask = cairo_pattern_reference (pattern); | ||
2036 | 2010 | cairo_get_matrix (cairo, &mask_matrix); | ||
2037 | 2011 | } else if (!printing) { | ||
2038 | 2012 | cairo_save (cairo); | ||
2039 | 2013 | cairo_rectangle (cairo, 0., 0., 1., 1.); | ||
2040 | 2014 | cairo_clip (cairo); | ||
2041 | 2015 | cairo_mask (cairo, pattern); | ||
2042 | 2016 | cairo_restore (cairo); | ||
2043 | 2017 | } else { | ||
2044 | 2018 | cairo_mask (cairo, pattern); | ||
2045 | 2019 | } | ||
2046 | 2020 | |||
2047 | 2021 | if (cairo_shape) { | ||
2048 | 2022 | cairo_save (cairo_shape); | ||
2049 | 2023 | cairo_set_source (cairo_shape, pattern); | ||
2050 | 2024 | if (!printing) { | ||
2051 | 2025 | cairo_rectangle (cairo_shape, 0., 0., 1., 1.); | ||
2052 | 2026 | cairo_fill (cairo_shape); | ||
2053 | 2027 | } else { | ||
2054 | 2028 | cairo_mask (cairo_shape, pattern); | ||
2055 | 2029 | } | ||
2056 | 2030 | cairo_restore (cairo_shape); | ||
2057 | 2031 | } | ||
2058 | 2032 | |||
2059 | 2033 | cairo_pattern_destroy (pattern); | ||
2060 | 2034 | |||
2061 | 2035 | cleanup: | ||
2062 | 2036 | imgStr->close(); | ||
2063 | 2037 | delete imgStr; | ||
2064 | 2038 | } | ||
2065 | 2039 | |||
2066 | 2040 | |||
2067 | 2041 | void CairoOutputDev::drawImageMaskPrescaled(GfxState *state, Object *ref, Stream *str, | ||
2068 | 2042 | int width, int height, GBool invert, | ||
2069 | 2043 | GBool interpolate, GBool inlineImg) { | ||
2070 | 2044 | unsigned char *buffer; | ||
2071 | 2045 | cairo_surface_t *image; | ||
2072 | 2046 | cairo_pattern_t *pattern; | ||
2073 | 2047 | ImageStream *imgStr; | ||
2074 | 2048 | Guchar *pix; | ||
2075 | 2049 | cairo_matrix_t matrix; | ||
2076 | 2050 | int invert_bit; | ||
2077 | 2051 | int row_stride; | ||
2078 | 2052 | |||
2079 | 2053 | /* cairo does a very poor job of scaling down images so we scale them ourselves */ | ||
2080 | 2054 | |||
2081 | 2055 | LOG (printf ("drawImageMaskPrescaled %dx%d\n", width, height)); | ||
2082 | 2056 | |||
2083 | 2057 | /* this scaling code is adopted from the splash image scaling code */ | ||
2084 | 2058 | cairo_get_matrix(cairo, &matrix); | ||
2085 | 2059 | #if 0 | ||
2086 | 2060 | printf("[%f %f], [%f %f], %f %f\n", matrix.xx, matrix.xy, matrix.yx, matrix.yy, matrix.x0, matrix.y0); | ||
2087 | 2061 | #endif | ||
2088 | 2062 | /* this whole computation should be factored out */ | ||
2089 | 2063 | double xScale = matrix.xx; | ||
2090 | 2064 | double yScale = matrix.yy; | ||
2091 | 2065 | int tx, tx2, ty, ty2; /* the integer co-oridinates of the resulting image */ | ||
2092 | 2066 | int scaledHeight; | ||
2093 | 2067 | int scaledWidth; | ||
2094 | 2068 | if (xScale >= 0) { | ||
2095 | 2069 | tx = splashRound(matrix.x0 - 0.01); | ||
2096 | 2070 | tx2 = splashRound(matrix.x0 + xScale + 0.01) - 1; | ||
2097 | 2071 | } else { | ||
2098 | 2072 | tx = splashRound(matrix.x0 + 0.01) - 1; | ||
2099 | 2073 | tx2 = splashRound(matrix.x0 + xScale - 0.01); | ||
2100 | 2074 | } | ||
2101 | 2075 | scaledWidth = abs(tx2 - tx) + 1; | ||
2102 | 2076 | //scaledWidth = splashRound(fabs(xScale)); | ||
2103 | 2077 | if (scaledWidth == 0) { | ||
2104 | 2078 | // technically, this should draw nothing, but it generally seems | ||
2105 | 2079 | // better to draw a one-pixel-wide stripe rather than throwing it | ||
2106 | 2080 | // away | ||
2107 | 2081 | scaledWidth = 1; | ||
2108 | 2082 | } | ||
2109 | 2083 | if (yScale >= 0) { | ||
2110 | 2084 | ty = splashFloor(matrix.y0 + 0.01); | ||
2111 | 2085 | ty2 = splashCeil(matrix.y0 + yScale - 0.01); | ||
2112 | 2086 | } else { | ||
2113 | 2087 | ty = splashCeil(matrix.y0 - 0.01); | ||
2114 | 2088 | ty2 = splashFloor(matrix.y0 + yScale + 0.01); | ||
2115 | 2089 | } | ||
2116 | 2090 | scaledHeight = abs(ty2 - ty); | ||
2117 | 2091 | if (scaledHeight == 0) { | ||
2118 | 2092 | scaledHeight = 1; | ||
2119 | 2093 | } | ||
2120 | 2094 | #if 0 | ||
2121 | 2095 | printf("xscale: %g, yscale: %g\n", xScale, yScale); | ||
2122 | 2096 | printf("width: %d, height: %d\n", width, height); | ||
2123 | 2097 | printf("scaledWidth: %d, scaledHeight: %d\n", scaledWidth, scaledHeight); | ||
2124 | 2098 | #endif | ||
2125 | 2099 | |||
2126 | 2100 | /* compute the required padding */ | ||
2127 | 2101 | /* Padding is used to preserve the aspect ratio. | ||
2128 | 2102 | We compute total_pad to make (height+total_pad)/scaledHeight as close to height/yScale as possible */ | ||
2129 | 2103 | int head_pad = 0; | ||
2130 | 2104 | int tail_pad = 0; | ||
2131 | 2105 | int total_pad = splashRound(height*(scaledHeight/fabs(yScale)) - height); | ||
2132 | 2106 | |||
2133 | 2107 | /* compute the two pieces of padding */ | ||
2134 | 2108 | if (total_pad > 0) { | ||
2135 | 2109 | //XXX: i'm not positive fabs() is correct | ||
2136 | 2110 | float tail_error = fabs(matrix.y0 - ty); | ||
2137 | 2111 | float head_error = fabs(ty2 - (matrix.y0 + yScale)); | ||
2138 | 2112 | float tail_fraction = tail_error/(tail_error + head_error); | ||
2139 | 2113 | tail_pad = splashRound(total_pad*tail_fraction); | ||
2140 | 2114 | head_pad = total_pad - tail_pad; | ||
2141 | 2115 | } else { | ||
2142 | 2116 | tail_pad = 0; | ||
2143 | 2117 | head_pad = 0; | ||
2144 | 2118 | } | ||
2145 | 2119 | int origHeight = height; | ||
2146 | 2120 | height += tail_pad; | ||
2147 | 2121 | height += head_pad; | ||
2148 | 2122 | #if 0 | ||
2149 | 2123 | printf("head_pad: %d tail_pad: %d\n", head_pad, tail_pad); | ||
2150 | 2124 | printf("origHeight: %d height: %d\n", origHeight, height); | ||
2151 | 2125 | printf("ty: %d, ty2: %d\n", ty, ty2); | ||
2152 | 2126 | #endif | ||
2153 | 2127 | |||
2154 | 2128 | /* TODO: Do we want to cache these? */ | ||
2155 | 2129 | imgStr = new ImageStream(str, width, 1, 1); | ||
2156 | 2130 | imgStr->reset(); | ||
2157 | 2131 | |||
2158 | 2132 | invert_bit = invert ? 1 : 0; | ||
2159 | 2133 | |||
2160 | 2134 | image = cairo_image_surface_create (CAIRO_FORMAT_A8, scaledWidth, scaledHeight); | ||
2161 | 2135 | if (cairo_surface_status (image)) { | ||
2162 | 2136 | imgStr->close(); | ||
2163 | 2137 | delete imgStr; | ||
2164 | 2138 | return; | ||
2165 | 2139 | } | ||
2166 | 2140 | |||
2167 | 2141 | buffer = cairo_image_surface_get_data (image); | ||
2168 | 2142 | row_stride = cairo_image_surface_get_stride (image); | ||
2169 | 2143 | |||
2170 | 2144 | int yp = height / scaledHeight; | ||
2171 | 2145 | int yq = height % scaledHeight; | ||
2172 | 2146 | int xp = width / scaledWidth; | ||
2173 | 2147 | int xq = width % scaledWidth; | ||
2174 | 2148 | int yt = 0; | ||
2175 | 2149 | int origHeight_c = origHeight; | ||
2176 | 2150 | /* use MIN() because yp might be > origHeight because of padding */ | ||
2177 | 2151 | unsigned char *pixBuf = (unsigned char *)malloc(MIN(yp+1, origHeight)*width); | ||
2178 | 2152 | int lastYStep = 1; | ||
2179 | 2153 | int total = 0; | ||
2180 | 2154 | for (int y = 0; y < scaledHeight; y++) { | ||
2181 | 2155 | // y scale Bresenham | ||
2182 | 2156 | int yStep = yp; | ||
2183 | 2157 | yt += yq; | ||
2184 | 2158 | |||
2185 | 2159 | if (yt >= scaledHeight) { | ||
2186 | 2160 | yt -= scaledHeight; | ||
2187 | 2161 | ++yStep; | ||
2188 | 2162 | } | ||
2189 | 2163 | |||
2190 | 2164 | // read row (s) from image ignoring the padding as appropriate | ||
2191 | 2165 | { | ||
2192 | 2166 | int n = (yp > 0) ? yStep : lastYStep; | ||
2193 | 2167 | total += n; | ||
2194 | 2168 | if (n > 0) { | ||
2195 | 2169 | unsigned char *p = pixBuf; | ||
2196 | 2170 | int head_pad_count = head_pad; | ||
2197 | 2171 | int origHeight_count = origHeight; | ||
2198 | 2172 | int tail_pad_count = tail_pad; | ||
2199 | 2173 | for (int i=0; i<n; i++) { | ||
2200 | 2174 | // get row | ||
2201 | 2175 | if (head_pad_count) { | ||
2202 | 2176 | head_pad_count--; | ||
2203 | 2177 | } else if (origHeight_count) { | ||
2204 | 2178 | pix = imgStr->getLine(); | ||
2205 | 2179 | for (int j=0; j<width; j++) { | ||
2206 | 2180 | if (pix[j] ^ invert_bit) | ||
2207 | 2181 | p[j] = 0; | ||
2208 | 2182 | else | ||
2209 | 2183 | p[j] = 255; | ||
2210 | 2184 | } | ||
2211 | 2185 | origHeight_count--; | ||
2212 | 2186 | p += width; | ||
2213 | 2187 | } else if (tail_pad_count) { | ||
2214 | 2188 | tail_pad_count--; | ||
2215 | 2189 | } else { | ||
2216 | 2190 | printf("%d %d\n", n, total); | ||
2217 | 2191 | assert(0 && "over run\n"); | ||
2218 | 2192 | } | ||
2219 | 2193 | } | ||
2220 | 2194 | } | ||
2221 | 2195 | } | ||
2222 | 2196 | |||
2223 | 2197 | lastYStep = yStep; | ||
2224 | 2198 | int k1 = y; | ||
2225 | 2199 | |||
2226 | 2200 | int xt = 0; | ||
2227 | 2201 | int xSrc = 0; | ||
2228 | 2202 | int x1 = k1; | ||
2229 | 2203 | int n = yStep > 0 ? yStep : 1; | ||
2230 | 2204 | int origN = n; | ||
2231 | 2205 | |||
2232 | 2206 | /* compute the size of padding and pixels that will be used for this row */ | ||
2233 | 2207 | int head_pad_size = MIN(n, head_pad); | ||
2234 | 2208 | n -= head_pad_size; | ||
2235 | 2209 | head_pad -= MIN(head_pad_size, yStep); | ||
2236 | 2210 | |||
2237 | 2211 | int pix_size = MIN(n, origHeight); | ||
2238 | 2212 | n -= pix_size; | ||
2239 | 2213 | origHeight -= MIN(pix_size, yStep); | ||
2240 | 2214 | |||
2241 | 2215 | int tail_pad_size = MIN(n, tail_pad); | ||
2242 | 2216 | n -= tail_pad_size; | ||
2243 | 2217 | tail_pad -= MIN(tail_pad_size, yStep); | ||
2244 | 2218 | if (n != 0) { | ||
2245 | 2219 | printf("n = %d (%d %d %d)\n", n, head_pad_size, pix_size, tail_pad_size); | ||
2246 | 2220 | assert(n == 0); | ||
2247 | 2221 | } | ||
2248 | 2222 | |||
2249 | 2223 | for (int x = 0; x < scaledWidth; ++x) { | ||
2250 | 2224 | int xStep = xp; | ||
2251 | 2225 | xt += xq; | ||
2252 | 2226 | if (xt >= scaledWidth) { | ||
2253 | 2227 | xt -= scaledWidth; | ||
2254 | 2228 | ++xStep; | ||
2255 | 2229 | } | ||
2256 | 2230 | int m = xStep > 0 ? xStep : 1; | ||
2257 | 2231 | float pixAcc0 = 0; | ||
2258 | 2232 | /* could m * head_pad_size * tail_pad_size overflow? */ | ||
2259 | 2233 | if (invert_bit) { | ||
2260 | 2234 | pixAcc0 += m * head_pad_size * tail_pad_size * 255; | ||
2261 | 2235 | } else { | ||
2262 | 2236 | pixAcc0 += m * head_pad_size * tail_pad_size * 0; | ||
2263 | 2237 | } | ||
2264 | 2238 | /* Accumulate all of the source pixels for the destination pixel */ | ||
2265 | 2239 | for (int i = 0; i < pix_size; ++i) { | ||
2266 | 2240 | for (int j = 0; j< m; ++j) { | ||
2267 | 2241 | if (xSrc + i*width + j > MIN(yp + 1, origHeight_c)*width) { | ||
2268 | 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); | ||
2269 | 2243 | printf("%d %d %d\n", head_pad_size, pix_size, tail_pad_size); | ||
2270 | 2244 | assert(0 && "bad access\n"); | ||
2271 | 2245 | } | ||
2272 | 2246 | pixAcc0 += pixBuf[xSrc + i*width + j]; | ||
2273 | 2247 | } | ||
2274 | 2248 | } | ||
2275 | 2249 | buffer[y * row_stride + x] = splashFloor(pixAcc0 / (origN*m)); | ||
2276 | 2250 | xSrc += xStep; | ||
2277 | 2251 | x1 += 1; | ||
2278 | 2252 | } | ||
2279 | 2253 | |||
2280 | 2254 | } | ||
2281 | 2255 | free(pixBuf); | ||
2282 | 2256 | |||
2283 | 2257 | cairo_surface_mark_dirty (image); | ||
2284 | 2258 | pattern = cairo_pattern_create_for_surface (image); | ||
2285 | 2259 | cairo_surface_destroy (image); | ||
2286 | 2260 | if (cairo_pattern_status (pattern)) { | ||
2287 | 2261 | imgStr->close(); | ||
2288 | 2262 | delete imgStr; | ||
2289 | 2263 | return; | ||
2290 | 2264 | } | ||
2291 | 2265 | |||
2292 | 2266 | /* we should actually be using CAIRO_FILTER_NEAREST here. However, | ||
2293 | 2267 | * cairo doesn't yet do minifaction filtering causing scaled down | ||
2294 | 2268 | * images with CAIRO_FILTER_NEAREST to look really bad */ | ||
2295 | 2269 | cairo_pattern_set_filter (pattern, | ||
2296 | 2270 | interpolate ? CAIRO_FILTER_BEST : CAIRO_FILTER_FAST); | ||
2297 | 2271 | cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD); | ||
2298 | 2272 | |||
2299 | 2273 | if (state->getFillColorSpace()->getMode() == csPattern) { | ||
2300 | 2274 | cairo_matrix_init_translate (&matrix, 0, scaledHeight); | ||
2301 | 2275 | cairo_matrix_scale (&matrix, scaledWidth, -scaledHeight); | ||
2302 | 2276 | cairo_pattern_set_matrix (pattern, &matrix); | ||
2303 | 2277 | if (cairo_pattern_status (pattern)) { | ||
2304 | 2278 | cairo_pattern_destroy (pattern); | ||
2305 | 2279 | imgStr->close(); | ||
2306 | 2280 | delete imgStr; | ||
2307 | 2281 | return; | ||
2308 | 2282 | } | ||
2309 | 2283 | |||
2310 | 2284 | mask = cairo_pattern_reference (pattern); | ||
2311 | 2285 | cairo_get_matrix (cairo, &mask_matrix); | ||
2312 | 2286 | } else { | ||
2313 | 2287 | cairo_save (cairo); | ||
2314 | 2288 | |||
2315 | 2289 | /* modify our current transformation so that the prescaled image | ||
2316 | 2290 | * goes where it is supposed to */ | ||
2317 | 2291 | cairo_get_matrix(cairo, &matrix); | ||
2318 | 2292 | cairo_scale(cairo, 1.0/matrix.xx, 1.0/matrix.yy); | ||
2319 | 2293 | // get integer co-ords | ||
2320 | 2294 | cairo_translate (cairo, tx - matrix.x0, ty2 - matrix.y0); | ||
2321 | 2295 | if (yScale > 0) | ||
2322 | 2296 | cairo_scale(cairo, 1, -1); | ||
2323 | 2297 | |||
2324 | 2298 | cairo_rectangle (cairo, 0., 0., scaledWidth, scaledHeight); | ||
2325 | 2299 | cairo_clip (cairo); | ||
2326 | 2300 | cairo_mask (cairo, pattern); | ||
2327 | 2301 | |||
2328 | 2302 | //cairo_get_matrix(cairo, &matrix); | ||
2329 | 2303 | //printf("mask at: [%f %f], [%f %f], %f %f\n\n", matrix.xx, matrix.xy, matrix.yx, matrix.yy, matrix.x0, matrix.y0); | ||
2330 | 2304 | cairo_restore(cairo); | ||
2331 | 2305 | } | ||
2332 | 2306 | |||
2333 | 2307 | if (cairo_shape) { | ||
2334 | 2308 | cairo_save (cairo_shape); | ||
2335 | 2309 | |||
2336 | 2310 | /* modify our current transformation so that the prescaled image | ||
2337 | 2311 | * goes where it is supposed to */ | ||
2338 | 2312 | cairo_get_matrix(cairo_shape, &matrix); | ||
2339 | 2313 | cairo_scale(cairo_shape, 1.0/matrix.xx, 1.0/matrix.yy); | ||
2340 | 2314 | // get integer co-ords | ||
2341 | 2315 | cairo_translate (cairo_shape, tx - matrix.x0, ty2 - matrix.y0); | ||
2342 | 2316 | if (yScale > 0) | ||
2343 | 2317 | cairo_scale(cairo_shape, 1, -1); | ||
2344 | 2318 | |||
2345 | 2319 | cairo_rectangle (cairo_shape, 0., 0., scaledWidth, scaledHeight); | ||
2346 | 2320 | cairo_fill (cairo_shape); | ||
2347 | 2321 | |||
2348 | 2322 | cairo_restore(cairo_shape); | ||
2349 | 2323 | } | ||
2350 | 2324 | |||
2351 | 2325 | cairo_pattern_destroy (pattern); | ||
2352 | 2326 | |||
2353 | 2327 | imgStr->close(); | ||
2354 | 2328 | delete imgStr; | ||
2355 | 2329 | } | ||
2356 | 2330 | |||
2357 | 2331 | void CairoOutputDev::drawMaskedImage(GfxState *state, Object *ref, | ||
2358 | 2332 | Stream *str, int width, int height, | ||
2359 | 2333 | GfxImageColorMap *colorMap, | ||
2360 | 2334 | GBool interpolate, | ||
2361 | 2335 | Stream *maskStr, int maskWidth, | ||
2362 | 2336 | int maskHeight, GBool maskInvert, | ||
2363 | 2337 | GBool maskInterpolate) | ||
2364 | 2338 | { | ||
2365 | 2339 | ImageStream *maskImgStr, *imgStr; | ||
2366 | 2340 | int row_stride; | ||
2367 | 2341 | unsigned char *maskBuffer, *buffer; | ||
2368 | 2342 | unsigned char *maskDest; | ||
2369 | 2343 | unsigned int *dest; | ||
2370 | 2344 | cairo_surface_t *maskImage, *image; | ||
2371 | 2345 | cairo_pattern_t *maskPattern, *pattern; | ||
2372 | 2346 | cairo_matrix_t matrix; | ||
2373 | 2347 | cairo_matrix_t maskMatrix; | ||
2374 | 2348 | Guchar *pix; | ||
2375 | 2349 | int x, y; | ||
2376 | 2350 | int invert_bit; | ||
2377 | 2351 | cairo_filter_t filter; | ||
2378 | 2352 | cairo_filter_t maskFilter; | ||
2379 | 2353 | |||
2380 | 2354 | maskImgStr = new ImageStream(maskStr, maskWidth, 1, 1); | ||
2381 | 2355 | maskImgStr->reset(); | ||
2382 | 2356 | |||
2383 | 2357 | maskImage = cairo_image_surface_create (CAIRO_FORMAT_A8, maskWidth, maskHeight); | ||
2384 | 2358 | if (cairo_surface_status (maskImage)) { | ||
2385 | 2359 | maskImgStr->close(); | ||
2386 | 2360 | delete maskImgStr; | ||
2387 | 2361 | return; | ||
2388 | 2362 | } | ||
2389 | 2363 | |||
2390 | 2364 | maskBuffer = cairo_image_surface_get_data (maskImage); | ||
2391 | 2365 | row_stride = cairo_image_surface_get_stride (maskImage); | ||
2392 | 2366 | |||
2393 | 2367 | invert_bit = maskInvert ? 1 : 0; | ||
2394 | 2368 | |||
2395 | 2369 | for (y = 0; y < maskHeight; y++) { | ||
2396 | 2370 | pix = maskImgStr->getLine(); | ||
2397 | 2371 | maskDest = maskBuffer + y * row_stride; | ||
2398 | 2372 | for (x = 0; x < maskWidth; x++) { | ||
2399 | 2373 | if (pix[x] ^ invert_bit) | ||
2400 | 2374 | *maskDest++ = 0; | ||
2401 | 2375 | else | ||
2402 | 2376 | *maskDest++ = 255; | ||
2403 | 2377 | } | ||
2404 | 2378 | } | ||
2405 | 2379 | |||
2406 | 2380 | maskImgStr->close(); | ||
2407 | 2381 | delete maskImgStr; | ||
2408 | 2382 | |||
2409 | 2383 | maskFilter = getFilterForSurface (maskImage, maskInterpolate); | ||
2410 | 2384 | |||
2411 | 2385 | cairo_surface_mark_dirty (maskImage); | ||
2412 | 2386 | maskPattern = cairo_pattern_create_for_surface (maskImage); | ||
2413 | 2387 | cairo_surface_destroy (maskImage); | ||
2414 | 2388 | if (cairo_pattern_status (maskPattern)) | ||
2415 | 2389 | return; | ||
2416 | 2390 | |||
2417 | 2391 | #if 0 | ||
2418 | 2392 | /* ICCBased color space doesn't do any color correction | ||
2419 | 2393 | * so check its underlying color space as well */ | ||
2420 | 2394 | int is_identity_transform; | ||
2421 | 2395 | is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB || | ||
2422 | 2396 | (colorMap->getColorSpace()->getMode() == csICCBased && | ||
2423 | 2397 | ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB); | ||
2424 | 2398 | #endif | ||
2425 | 2399 | |||
2426 | 2400 | /* TODO: Do we want to cache these? */ | ||
2427 | 2401 | imgStr = new ImageStream(str, width, | ||
2428 | 2402 | colorMap->getNumPixelComps(), | ||
2429 | 2403 | colorMap->getBits()); | ||
2430 | 2404 | imgStr->reset(); | ||
2431 | 2405 | |||
2432 | 2406 | image = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, height); | ||
2433 | 2407 | if (cairo_surface_status (image)) | ||
2434 | 2408 | goto cleanup; | ||
2435 | 2409 | |||
2436 | 2410 | buffer = cairo_image_surface_get_data (image); | ||
2437 | 2411 | row_stride = cairo_image_surface_get_stride (image); | ||
2438 | 2412 | for (y = 0; y < height; y++) { | ||
2439 | 2413 | dest = (unsigned int *) (buffer + y * row_stride); | ||
2440 | 2414 | pix = imgStr->getLine(); | ||
2441 | 2415 | colorMap->getRGBLine (pix, dest, width); | ||
2442 | 2416 | } | ||
2443 | 2417 | |||
2444 | 2418 | filter = getFilterForSurface (image, interpolate); | ||
2445 | 2419 | |||
2446 | 2420 | cairo_surface_mark_dirty (image); | ||
2447 | 2421 | pattern = cairo_pattern_create_for_surface (image); | ||
2448 | 2422 | cairo_surface_destroy (image); | ||
2449 | 2423 | if (cairo_pattern_status (pattern)) | ||
2450 | 2424 | goto cleanup; | ||
2451 | 2425 | |||
2452 | 2426 | LOG (printf ("drawMaskedImage %dx%d\n", width, height)); | ||
2453 | 2427 | |||
2454 | 2428 | cairo_pattern_set_filter (pattern, filter); | ||
2455 | 2429 | cairo_pattern_set_filter (maskPattern, maskFilter); | ||
2456 | 2430 | |||
2457 | 2431 | if (!printing) { | ||
2458 | 2432 | cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD); | ||
2459 | 2433 | cairo_pattern_set_extend (maskPattern, CAIRO_EXTEND_PAD); | ||
2460 | 2434 | } | ||
2461 | 2435 | |||
2462 | 2436 | cairo_matrix_init_translate (&matrix, 0, height); | ||
2463 | 2437 | cairo_matrix_scale (&matrix, width, -height); | ||
2464 | 2438 | cairo_pattern_set_matrix (pattern, &matrix); | ||
2465 | 2439 | if (cairo_pattern_status (pattern)) { | ||
2466 | 2440 | cairo_pattern_destroy (pattern); | ||
2467 | 2441 | cairo_pattern_destroy (maskPattern); | ||
2468 | 2442 | goto cleanup; | ||
2469 | 2443 | } | ||
2470 | 2444 | |||
2471 | 2445 | cairo_matrix_init_translate (&maskMatrix, 0, maskHeight); | ||
2472 | 2446 | cairo_matrix_scale (&maskMatrix, maskWidth, -maskHeight); | ||
2473 | 2447 | cairo_pattern_set_matrix (maskPattern, &maskMatrix); | ||
2474 | 2448 | if (cairo_pattern_status (maskPattern)) { | ||
2475 | 2449 | cairo_pattern_destroy (maskPattern); | ||
2476 | 2450 | cairo_pattern_destroy (pattern); | ||
2477 | 2451 | goto cleanup; | ||
2478 | 2452 | } | ||
2479 | 2453 | |||
2480 | 2454 | if (!printing) { | ||
2481 | 2455 | cairo_save (cairo); | ||
2482 | 2456 | cairo_set_source (cairo, pattern); | ||
2483 | 2457 | cairo_rectangle (cairo, 0., 0., 1., 1.); | ||
2484 | 2458 | cairo_clip (cairo); | ||
2485 | 2459 | cairo_mask (cairo, maskPattern); | ||
2486 | 2460 | cairo_restore (cairo); | ||
2487 | 2461 | } else { | ||
2488 | 2462 | cairo_set_source (cairo, pattern); | ||
2489 | 2463 | cairo_mask (cairo, maskPattern); | ||
2490 | 2464 | } | ||
2491 | 2465 | |||
2492 | 2466 | if (cairo_shape) { | ||
2493 | 2467 | cairo_save (cairo_shape); | ||
2494 | 2468 | cairo_set_source (cairo_shape, pattern); | ||
2495 | 2469 | if (!printing) { | ||
2496 | 2470 | cairo_rectangle (cairo_shape, 0., 0., 1., 1.); | ||
2497 | 2471 | cairo_fill (cairo_shape); | ||
2498 | 2472 | } else { | ||
2499 | 2473 | cairo_mask (cairo_shape, pattern); | ||
2500 | 2474 | } | ||
2501 | 2475 | cairo_restore (cairo_shape); | ||
2502 | 2476 | } | ||
2503 | 2477 | |||
2504 | 2478 | cairo_pattern_destroy (maskPattern); | ||
2505 | 2479 | cairo_pattern_destroy (pattern); | ||
2506 | 2480 | |||
2507 | 2481 | cleanup: | ||
2508 | 2482 | imgStr->close(); | ||
2509 | 2483 | delete imgStr; | ||
2510 | 2484 | } | ||
2511 | 2485 | |||
2512 | 2486 | |||
2513 | 2487 | //XXX: is this affect by AIS(alpha is shape)? | ||
2514 | 2488 | void CairoOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, | ||
2515 | 2489 | int width, int height, | ||
2516 | 2490 | GfxImageColorMap *colorMap, | ||
2517 | 2491 | GBool interpolate, | ||
2518 | 2492 | Stream *maskStr, | ||
2519 | 2493 | int maskWidth, int maskHeight, | ||
2520 | 2494 | GfxImageColorMap *maskColorMap, | ||
2521 | 2495 | GBool maskInterpolate) | ||
2522 | 2496 | { | ||
2523 | 2497 | ImageStream *maskImgStr, *imgStr; | ||
2524 | 2498 | int row_stride; | ||
2525 | 2499 | unsigned char *maskBuffer, *buffer; | ||
2526 | 2500 | unsigned char *maskDest; | ||
2527 | 2501 | unsigned int *dest; | ||
2528 | 2502 | cairo_surface_t *maskImage, *image; | ||
2529 | 2503 | cairo_pattern_t *maskPattern, *pattern; | ||
2530 | 2504 | cairo_matrix_t maskMatrix, matrix; | ||
2531 | 2505 | Guchar *pix; | ||
2532 | 2506 | int y; | ||
2533 | 2507 | cairo_filter_t filter; | ||
2534 | 2508 | cairo_filter_t maskFilter; | ||
2535 | 2509 | |||
2536 | 2510 | maskImgStr = new ImageStream(maskStr, maskWidth, | ||
2537 | 2511 | maskColorMap->getNumPixelComps(), | ||
2538 | 2512 | maskColorMap->getBits()); | ||
2539 | 2513 | maskImgStr->reset(); | ||
2540 | 2514 | |||
2541 | 2515 | maskImage = cairo_image_surface_create (CAIRO_FORMAT_A8, maskWidth, maskHeight); | ||
2542 | 2516 | if (cairo_surface_status (maskImage)) { | ||
2543 | 2517 | maskImgStr->close(); | ||
2544 | 2518 | delete maskImgStr; | ||
2545 | 2519 | return; | ||
2546 | 2520 | } | ||
2547 | 2521 | |||
2548 | 2522 | maskBuffer = cairo_image_surface_get_data (maskImage); | ||
2549 | 2523 | row_stride = cairo_image_surface_get_stride (maskImage); | ||
2550 | 2524 | for (y = 0; y < maskHeight; y++) { | ||
2551 | 2525 | maskDest = (unsigned char *) (maskBuffer + y * row_stride); | ||
2552 | 2526 | pix = maskImgStr->getLine(); | ||
2553 | 2527 | maskColorMap->getGrayLine (pix, maskDest, maskWidth); | ||
2554 | 2528 | } | ||
2555 | 2529 | |||
2556 | 2530 | maskImgStr->close(); | ||
2557 | 2531 | delete maskImgStr; | ||
2558 | 2532 | |||
2559 | 2533 | maskFilter = getFilterForSurface (maskImage, maskInterpolate); | ||
2560 | 2534 | |||
2561 | 2535 | cairo_surface_mark_dirty (maskImage); | ||
2562 | 2536 | maskPattern = cairo_pattern_create_for_surface (maskImage); | ||
2563 | 2537 | cairo_surface_destroy (maskImage); | ||
2564 | 2538 | if (cairo_pattern_status (maskPattern)) | ||
2565 | 2539 | return; | ||
2566 | 2540 | |||
2567 | 2541 | #if 0 | ||
2568 | 2542 | /* ICCBased color space doesn't do any color correction | ||
2569 | 2543 | * so check its underlying color space as well */ | ||
2570 | 2544 | int is_identity_transform; | ||
2571 | 2545 | is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB || | ||
2572 | 2546 | (colorMap->getColorSpace()->getMode() == csICCBased && | ||
2573 | 2547 | ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB); | ||
2574 | 2548 | #endif | ||
2575 | 2549 | |||
2576 | 2550 | /* TODO: Do we want to cache these? */ | ||
2577 | 2551 | imgStr = new ImageStream(str, width, | ||
2578 | 2552 | colorMap->getNumPixelComps(), | ||
2579 | 2553 | colorMap->getBits()); | ||
2580 | 2554 | imgStr->reset(); | ||
2581 | 2555 | |||
2582 | 2556 | image = cairo_image_surface_create (CAIRO_FORMAT_RGB24, width, height); | ||
2583 | 2557 | if (cairo_surface_status (image)) | ||
2584 | 2558 | goto cleanup; | ||
2585 | 2559 | |||
2586 | 2560 | buffer = cairo_image_surface_get_data (image); | ||
2587 | 2561 | row_stride = cairo_image_surface_get_stride (image); | ||
2588 | 2562 | for (y = 0; y < height; y++) { | ||
2589 | 2563 | dest = (unsigned int *) (buffer + y * row_stride); | ||
2590 | 2564 | pix = imgStr->getLine(); | ||
2591 | 2565 | colorMap->getRGBLine (pix, dest, width); | ||
2592 | 2566 | } | ||
2593 | 2567 | |||
2594 | 2568 | filter = getFilterForSurface (image, interpolate); | ||
2595 | 2569 | |||
2596 | 2570 | cairo_surface_mark_dirty (image); | ||
2597 | 2571 | |||
2598 | 2572 | setMimeData(str, ref, image); | ||
2599 | 2573 | |||
2600 | 2574 | pattern = cairo_pattern_create_for_surface (image); | ||
2601 | 2575 | cairo_surface_destroy (image); | ||
2602 | 2576 | if (cairo_pattern_status (pattern)) | ||
2603 | 2577 | goto cleanup; | ||
2604 | 2578 | |||
2605 | 2579 | LOG (printf ("drawSoftMaskedImage %dx%d\n", width, height)); | ||
2606 | 2580 | |||
2607 | 2581 | cairo_pattern_set_filter (pattern, filter); | ||
2608 | 2582 | cairo_pattern_set_filter (maskPattern, maskFilter); | ||
2609 | 2583 | |||
2610 | 2584 | if (!printing) { | ||
2611 | 2585 | cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD); | ||
2612 | 2586 | cairo_pattern_set_extend (maskPattern, CAIRO_EXTEND_PAD); | ||
2613 | 2587 | } | ||
2614 | 2588 | |||
2615 | 2589 | cairo_matrix_init_translate (&matrix, 0, height); | ||
2616 | 2590 | cairo_matrix_scale (&matrix, width, -height); | ||
2617 | 2591 | cairo_pattern_set_matrix (pattern, &matrix); | ||
2618 | 2592 | if (cairo_pattern_status (pattern)) { | ||
2619 | 2593 | cairo_pattern_destroy (pattern); | ||
2620 | 2594 | cairo_pattern_destroy (maskPattern); | ||
2621 | 2595 | goto cleanup; | ||
2622 | 2596 | } | ||
2623 | 2597 | |||
2624 | 2598 | cairo_matrix_init_translate (&maskMatrix, 0, maskHeight); | ||
2625 | 2599 | cairo_matrix_scale (&maskMatrix, maskWidth, -maskHeight); | ||
2626 | 2600 | cairo_pattern_set_matrix (maskPattern, &maskMatrix); | ||
2627 | 2601 | if (cairo_pattern_status (maskPattern)) { | ||
2628 | 2602 | cairo_pattern_destroy (maskPattern); | ||
2629 | 2603 | cairo_pattern_destroy (pattern); | ||
2630 | 2604 | goto cleanup; | ||
2631 | 2605 | } | ||
2632 | 2606 | |||
2633 | 2607 | if (fill_opacity != 1.0) | ||
2634 | 2608 | cairo_push_group (cairo); | ||
2635 | 2609 | else | ||
2636 | 2610 | cairo_save (cairo); | ||
2637 | 2611 | |||
2638 | 2612 | cairo_set_source (cairo, pattern); | ||
2639 | 2613 | if (!printing) { | ||
2640 | 2614 | cairo_rectangle (cairo, 0., 0., | ||
2641 | 2615 | MIN (width, maskWidth) / (double)width, | ||
2642 | 2616 | MIN (height, maskHeight) / (double)height); | ||
2643 | 2617 | cairo_clip (cairo); | ||
2644 | 2618 | } | ||
2645 | 2619 | cairo_mask (cairo, maskPattern); | ||
2646 | 2620 | |||
2647 | 2621 | if (fill_opacity != 1.0) { | ||
2648 | 2622 | cairo_pop_group_to_source (cairo); | ||
2649 | 2623 | cairo_save (cairo); | ||
2650 | 2624 | if (!printing) { | ||
2651 | 2625 | cairo_rectangle (cairo, 0., 0., | ||
2652 | 2626 | MIN (width, maskWidth) / (double)width, | ||
2653 | 2627 | MIN (height, maskHeight) / (double)height); | ||
2654 | 2628 | cairo_clip (cairo); | ||
2655 | 2629 | } | ||
2656 | 2630 | cairo_paint_with_alpha (cairo, fill_opacity); | ||
2657 | 2631 | } | ||
2658 | 2632 | cairo_restore (cairo); | ||
2659 | 2633 | |||
2660 | 2634 | if (cairo_shape) { | ||
2661 | 2635 | cairo_save (cairo_shape); | ||
2662 | 2636 | cairo_set_source (cairo_shape, pattern); | ||
2663 | 2637 | if (!printing) { | ||
2664 | 2638 | cairo_rectangle (cairo_shape, 0., 0., | ||
2665 | 2639 | MIN (width, maskWidth) / (double)width, | ||
2666 | 2640 | MIN (height, maskHeight) / (double)height); | ||
2667 | 2641 | cairo_fill (cairo_shape); | ||
2668 | 2642 | } else { | ||
2669 | 2643 | cairo_mask (cairo_shape, pattern); | ||
2670 | 2644 | } | ||
2671 | 2645 | cairo_restore (cairo_shape); | ||
2672 | 2646 | } | ||
2673 | 2647 | |||
2674 | 2648 | cairo_pattern_destroy (maskPattern); | ||
2675 | 2649 | cairo_pattern_destroy (pattern); | ||
2676 | 2650 | |||
2677 | 2651 | cleanup: | ||
2678 | 2652 | imgStr->close(); | ||
2679 | 2653 | delete imgStr; | ||
2680 | 2654 | } | ||
2681 | 2655 | |||
2682 | 2656 | GBool CairoOutputDev::getStreamData (Stream *str, char **buffer, int *length) | ||
2683 | 2657 | { | ||
2684 | 2658 | int len, i; | ||
2685 | 2659 | char *strBuffer; | ||
2686 | 2660 | |||
2687 | 2661 | len = 0; | ||
2688 | 2662 | str->close(); | ||
2689 | 2663 | str->reset(); | ||
2690 | 2664 | while (str->getChar() != EOF) len++; | ||
2691 | 2665 | if (len == 0) | ||
2692 | 2666 | return gFalse; | ||
2693 | 2667 | |||
2694 | 2668 | strBuffer = (char *)gmalloc (len); | ||
2695 | 2669 | |||
2696 | 2670 | str->close(); | ||
2697 | 2671 | str->reset(); | ||
2698 | 2672 | for (i = 0; i < len; ++i) | ||
2699 | 2673 | strBuffer[i] = str->getChar(); | ||
2700 | 2674 | |||
2701 | 2675 | *buffer = strBuffer; | ||
2702 | 2676 | *length = len; | ||
2703 | 2677 | |||
2704 | 2678 | return gTrue; | ||
2705 | 2679 | } | ||
2706 | 2680 | |||
2707 | 2681 | void CairoOutputDev::setMimeData(Stream *str, Object *ref, cairo_surface_t *image) | ||
2708 | 2682 | { | ||
2709 | 2683 | char *strBuffer; | ||
2710 | 2684 | int len; | ||
2711 | 2685 | Object obj; | ||
2712 | 2686 | |||
2713 | 2687 | if (!printing || !(str->getKind() == strDCT || str->getKind() == strJPX)) | ||
2714 | 2688 | return; | ||
2715 | 2689 | |||
2716 | 2690 | // colorspace in stream dict may be different from colorspace in jpx | ||
2717 | 2691 | // data | ||
2718 | 2692 | if (str->getKind() == strJPX) { | ||
2719 | 2693 | GBool hasColorSpace = !str->getDict()->lookup("ColorSpace", &obj)->isNull(); | ||
2720 | 2694 | obj.free(); | ||
2721 | 2695 | if (hasColorSpace) | ||
2722 | 2696 | return; | ||
2723 | 2697 | } | ||
2724 | 2698 | |||
2725 | 2699 | if (getStreamData (str->getNextStream(), &strBuffer, &len)) { | ||
2726 | 2700 | cairo_status_t st; | ||
2727 | 2701 | |||
2728 | 2702 | #if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2) | ||
2729 | 2703 | if (ref && ref->isRef()) { | ||
2730 | 2704 | Ref imgRef = ref->getRef(); | ||
2731 | 2705 | GooString *surfaceId = new GooString("poppler-surface-"); | ||
2732 | 2706 | surfaceId->appendf("{0:d}-{1:d}", imgRef.gen, imgRef.num); | ||
2733 | 2707 | char *idBuffer = copyString(surfaceId->getCString()); | ||
2734 | 2708 | st = cairo_surface_set_mime_data (image, CAIRO_MIME_TYPE_UNIQUE_ID, | ||
2735 | 2709 | (const unsigned char *)idBuffer, | ||
2736 | 2710 | surfaceId->getLength(), | ||
2737 | 2711 | gfree, idBuffer); | ||
2738 | 2712 | if (st) | ||
2739 | 2713 | gfree(idBuffer); | ||
2740 | 2714 | delete surfaceId; | ||
2741 | 2715 | } | ||
2742 | 2716 | #endif | ||
2743 | 2717 | |||
2744 | 2718 | st = cairo_surface_set_mime_data (image, | ||
2745 | 2719 | str->getKind() == strDCT ? | ||
2746 | 2720 | CAIRO_MIME_TYPE_JPEG : CAIRO_MIME_TYPE_JP2, | ||
2747 | 2721 | (const unsigned char *)strBuffer, len, | ||
2748 | 2722 | gfree, strBuffer); | ||
2749 | 2723 | if (st) | ||
2750 | 2724 | gfree (strBuffer); | ||
2751 | 2725 | } | ||
2752 | 2726 | } | ||
2753 | 2727 | |||
2754 | 2728 | void CairoOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, | ||
2755 | 2729 | int width, int height, | ||
2756 | 2730 | GfxImageColorMap *colorMap, | ||
2757 | 2731 | GBool interpolate, | ||
2758 | 2732 | int *maskColors, GBool inlineImg) | ||
2759 | 2733 | { | ||
2760 | 2734 | cairo_surface_t *image; | ||
2761 | 2735 | cairo_pattern_t *pattern, *maskPattern; | ||
2762 | 2736 | ImageStream *imgStr; | ||
2763 | 2737 | cairo_matrix_t matrix; | ||
2764 | 2738 | unsigned char *buffer; | ||
2765 | 2739 | int stride, i; | ||
2766 | 2740 | GfxRGB *lookup = NULL; | ||
2767 | 2741 | cairo_filter_t filter = CAIRO_FILTER_BILINEAR; | ||
2768 | 2742 | |||
2769 | 2743 | /* TODO: Do we want to cache these? */ | ||
2770 | 2744 | imgStr = new ImageStream(str, width, | ||
2771 | 2745 | colorMap->getNumPixelComps(), | ||
2772 | 2746 | colorMap->getBits()); | ||
2773 | 2747 | imgStr->reset(); | ||
2774 | 2748 | |||
2775 | 2749 | #if 0 | ||
2776 | 2750 | /* ICCBased color space doesn't do any color correction | ||
2777 | 2751 | * so check its underlying color space as well */ | ||
2778 | 2752 | int is_identity_transform; | ||
2779 | 2753 | is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB || | ||
2780 | 2754 | (colorMap->getColorSpace()->getMode() == csICCBased && | ||
2781 | 2755 | ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB); | ||
2782 | 2756 | #endif | ||
2783 | 2757 | |||
2784 | 2758 | image = cairo_image_surface_create (maskColors ? | ||
2785 | 2759 | CAIRO_FORMAT_ARGB32 : | ||
2786 | 2760 | CAIRO_FORMAT_RGB24, | ||
2787 | 2761 | width, height); | ||
2788 | 2762 | if (cairo_surface_status (image)) | ||
2789 | 2763 | goto cleanup; | ||
2790 | 2764 | |||
2791 | 2765 | // special case for one-channel (monochrome/gray/separation) images: | ||
2792 | 2766 | // build a lookup table here | ||
2793 | 2767 | if (colorMap->getNumPixelComps() == 1) { | ||
2794 | 2768 | int n; | ||
2795 | 2769 | Guchar pix; | ||
2796 | 2770 | |||
2797 | 2771 | n = 1 << colorMap->getBits(); | ||
2798 | 2772 | lookup = (GfxRGB *)gmallocn(n, sizeof(GfxRGB)); | ||
2799 | 2773 | for (i = 0; i < n; ++i) { | ||
2800 | 2774 | pix = (Guchar)i; | ||
2801 | 2775 | |||
2802 | 2776 | colorMap->getRGB(&pix, &lookup[i]); | ||
2803 | 2777 | } | ||
2804 | 2778 | } | ||
2805 | 2779 | |||
2806 | 2780 | buffer = cairo_image_surface_get_data (image); | ||
2807 | 2781 | stride = cairo_image_surface_get_stride (image); | ||
2808 | 2782 | for (int y = 0; y < height; y++) { | ||
2809 | 2783 | uint32_t *dest = (uint32_t *) (buffer + y * stride); | ||
2810 | 2784 | Guchar *pix = imgStr->getLine(); | ||
2811 | 2785 | |||
2812 | 2786 | if (lookup) { | ||
2813 | 2787 | Guchar *p = pix; | ||
2814 | 2788 | GfxRGB rgb; | ||
2815 | 2789 | |||
2816 | 2790 | for (i = 0; i < width; i++) { | ||
2817 | 2791 | rgb = lookup[*p]; | ||
2818 | 2792 | dest[i] = | ||
2819 | 2793 | ((int) colToByte(rgb.r) << 16) | | ||
2820 | 2794 | ((int) colToByte(rgb.g) << 8) | | ||
2821 | 2795 | ((int) colToByte(rgb.b) << 0); | ||
2822 | 2796 | p++; | ||
2823 | 2797 | } | ||
2824 | 2798 | } else { | ||
2825 | 2799 | colorMap->getRGBLine (pix, dest, width); | ||
2826 | 2800 | } | ||
2827 | 2801 | |||
2828 | 2802 | if (maskColors) { | ||
2829 | 2803 | for (int x = 0; x < width; x++) { | ||
2830 | 2804 | bool is_opaque = false; | ||
2831 | 2805 | for (int i = 0; i < colorMap->getNumPixelComps(); ++i) { | ||
2832 | 2806 | if (pix[i] < maskColors[2*i] || | ||
2833 | 2807 | pix[i] > maskColors[2*i+1]) { | ||
2834 | 2808 | is_opaque = true; | ||
2835 | 2809 | break; | ||
2836 | 2810 | } | ||
2837 | 2811 | } | ||
2838 | 2812 | if (is_opaque) | ||
2839 | 2813 | *dest |= 0xff000000; | ||
2840 | 2814 | else | ||
2841 | 2815 | *dest = 0; | ||
2842 | 2816 | dest++; | ||
2843 | 2817 | pix += colorMap->getNumPixelComps(); | ||
2844 | 2818 | } | ||
2845 | 2819 | } | ||
2846 | 2820 | } | ||
2847 | 2821 | gfree(lookup); | ||
2848 | 2822 | |||
2849 | 2823 | LOG (printf ("drawImage %dx%d\n", width, height)); | ||
2850 | 2824 | |||
2851 | 2825 | cairo_surface_t *scaled_surface; | ||
2852 | 2826 | |||
2853 | 2827 | scaled_surface = downscaleSurface (image); | ||
2854 | 2828 | if (scaled_surface) { | ||
2855 | 2829 | if (cairo_surface_status (scaled_surface)) | ||
2856 | 2830 | goto cleanup; | ||
2857 | 2831 | cairo_surface_destroy (image); | ||
2858 | 2832 | image = scaled_surface; | ||
2859 | 2833 | width = cairo_image_surface_get_width (image); | ||
2860 | 2834 | height = cairo_image_surface_get_height (image); | ||
2861 | 2835 | } else { | ||
2862 | 2836 | filter = getFilterForSurface (image, interpolate); | ||
2863 | 2837 | } | ||
2864 | 2838 | |||
2865 | 2839 | cairo_surface_mark_dirty (image); | ||
2866 | 2840 | |||
2867 | 2841 | if (!inlineImg) /* don't read stream twice if it is an inline image */ | ||
2868 | 2842 | setMimeData(str, ref, image); | ||
2869 | 2843 | |||
2870 | 2844 | pattern = cairo_pattern_create_for_surface (image); | ||
2871 | 2845 | cairo_surface_destroy (image); | ||
2872 | 2846 | if (cairo_pattern_status (pattern)) | ||
2873 | 2847 | goto cleanup; | ||
2874 | 2848 | |||
2875 | 2849 | cairo_pattern_set_filter (pattern, filter); | ||
2876 | 2850 | |||
2877 | 2851 | if (!printing) | ||
2878 | 2852 | cairo_pattern_set_extend (pattern, CAIRO_EXTEND_PAD); | ||
2879 | 2853 | |||
2880 | 2854 | cairo_matrix_init_translate (&matrix, 0, height); | ||
2881 | 2855 | cairo_matrix_scale (&matrix, width, -height); | ||
2882 | 2856 | cairo_pattern_set_matrix (pattern, &matrix); | ||
2883 | 2857 | if (cairo_pattern_status (pattern)) { | ||
2884 | 2858 | cairo_pattern_destroy (pattern); | ||
2885 | 2859 | goto cleanup; | ||
2886 | 2860 | } | ||
2887 | 2861 | |||
2888 | 2862 | if (!mask && fill_opacity != 1.0) { | ||
2889 | 2863 | maskPattern = cairo_pattern_create_rgba (1., 1., 1., fill_opacity); | ||
2890 | 2864 | } else if (mask) { | ||
2891 | 2865 | maskPattern = cairo_pattern_reference (mask); | ||
2892 | 2866 | } else { | ||
2893 | 2867 | maskPattern = NULL; | ||
2894 | 2868 | } | ||
2895 | 2869 | |||
2896 | 2870 | cairo_save (cairo); | ||
2897 | 2871 | cairo_set_source (cairo, pattern); | ||
2898 | 2872 | if (!printing) | ||
2899 | 2873 | cairo_rectangle (cairo, 0., 0., 1., 1.); | ||
2900 | 2874 | if (maskPattern) { | ||
2901 | 2875 | if (!printing) | ||
2902 | 2876 | cairo_clip (cairo); | ||
2903 | 2877 | cairo_set_matrix (cairo, &mask_matrix); | ||
2904 | 2878 | cairo_mask (cairo, maskPattern); | ||
2905 | 2879 | } else { | ||
2906 | 2880 | if (printing) | ||
2907 | 2881 | cairo_paint (cairo); | ||
2908 | 2882 | else | ||
2909 | 2883 | cairo_fill (cairo); | ||
2910 | 2884 | } | ||
2911 | 2885 | cairo_restore (cairo); | ||
2912 | 2886 | |||
2913 | 2887 | cairo_pattern_destroy (maskPattern); | ||
2914 | 2888 | |||
2915 | 2889 | if (cairo_shape) { | ||
2916 | 2890 | cairo_save (cairo_shape); | ||
2917 | 2891 | cairo_set_source (cairo_shape, pattern); | ||
2918 | 2892 | if (printing) { | ||
2919 | 2893 | cairo_paint (cairo_shape); | ||
2920 | 2894 | } else { | ||
2921 | 2895 | cairo_rectangle (cairo_shape, 0., 0., 1., 1.); | ||
2922 | 2896 | cairo_fill (cairo_shape); | ||
2923 | 2897 | } | ||
2924 | 2898 | cairo_restore (cairo_shape); | ||
2925 | 2899 | } | ||
2926 | 2900 | |||
2927 | 2901 | cairo_pattern_destroy (pattern); | ||
2928 | 2902 | |||
2929 | 2903 | cleanup: | ||
2930 | 2904 | imgStr->close(); | ||
2931 | 2905 | delete imgStr; | ||
2932 | 2906 | } | ||
2933 | 2907 | |||
2934 | 2908 | |||
2935 | 2909 | //------------------------------------------------------------------------ | ||
2936 | 2910 | // ImageOutputDev | ||
2937 | 2911 | //------------------------------------------------------------------------ | ||
2938 | 2912 | |||
2939 | 2913 | CairoImageOutputDev::CairoImageOutputDev() | ||
2940 | 2914 | { | ||
2941 | 2915 | images = NULL; | ||
2942 | 2916 | numImages = 0; | ||
2943 | 2917 | size = 0; | ||
2944 | 2918 | imgDrawCbk = NULL; | ||
2945 | 2919 | imgDrawCbkData = NULL; | ||
2946 | 2920 | } | ||
2947 | 2921 | |||
2948 | 2922 | CairoImageOutputDev::~CairoImageOutputDev() | ||
2949 | 2923 | { | ||
2950 | 2924 | int i; | ||
2951 | 2925 | |||
2952 | 2926 | for (i = 0; i < numImages; i++) | ||
2953 | 2927 | delete images[i]; | ||
2954 | 2928 | gfree (images); | ||
2955 | 2929 | } | ||
2956 | 2930 | |||
2957 | 2931 | void CairoImageOutputDev::saveImage(CairoImage *image) | ||
2958 | 2932 | { | ||
2959 | 2933 | if (numImages >= size) { | ||
2960 | 2934 | size += 16; | ||
2961 | 2935 | images = (CairoImage **) greallocn (images, size, sizeof (CairoImage *)); | ||
2962 | 2936 | } | ||
2963 | 2937 | images[numImages++] = image; | ||
2964 | 2938 | } | ||
2965 | 2939 | |||
2966 | 2940 | void CairoImageOutputDev::drawImageMask(GfxState *state, Object *ref, Stream *str, | ||
2967 | 2941 | int width, int height, GBool invert, | ||
2968 | 2942 | GBool interpolate, GBool inlineImg) | ||
2969 | 2943 | { | ||
2970 | 2944 | cairo_t *cr; | ||
2971 | 2945 | cairo_surface_t *surface; | ||
2972 | 2946 | double x1, y1, x2, y2; | ||
2973 | 2947 | double *ctm; | ||
2974 | 2948 | double mat[6]; | ||
2975 | 2949 | CairoImage *image; | ||
2976 | 2950 | |||
2977 | 2951 | ctm = state->getCTM(); | ||
2978 | 2952 | |||
2979 | 2953 | mat[0] = ctm[0]; | ||
2980 | 2954 | mat[1] = ctm[1]; | ||
2981 | 2955 | mat[2] = -ctm[2]; | ||
2982 | 2956 | mat[3] = -ctm[3]; | ||
2983 | 2957 | mat[4] = ctm[2] + ctm[4]; | ||
2984 | 2958 | mat[5] = ctm[3] + ctm[5]; | ||
2985 | 2959 | x1 = mat[4]; | ||
2986 | 2960 | y1 = mat[5]; | ||
2987 | 2961 | x2 = x1 + width; | ||
2988 | 2962 | y2 = y1 + height; | ||
2989 | 2963 | |||
2990 | 2964 | image = new CairoImage (x1, y1, x2, y2); | ||
2991 | 2965 | saveImage (image); | ||
2992 | 2966 | |||
2993 | 2967 | if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) { | ||
2994 | 2968 | surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); | ||
2995 | 2969 | cr = cairo_create (surface); | ||
2996 | 2970 | setCairo (cr); | ||
2997 | 2971 | cairo_translate (cr, 0, height); | ||
2998 | 2972 | cairo_scale (cr, width, -height); | ||
2999 | 2973 | |||
3000 | 2974 | CairoOutputDev::drawImageMask(state, ref, str, width, height, invert, interpolate, inlineImg); | ||
3001 | 2975 | image->setImage (surface); | ||
3002 | 2976 | |||
3003 | 2977 | setCairo (NULL); | ||
3004 | 2978 | cairo_surface_destroy (surface); | ||
3005 | 2979 | cairo_destroy (cr); | ||
3006 | 2980 | } | ||
3007 | 2981 | } | ||
3008 | 2982 | |||
3009 | 2983 | void CairoImageOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, | ||
3010 | 2984 | int width, int height, GfxImageColorMap *colorMap, | ||
3011 | 2985 | GBool interpolate, int *maskColors, GBool inlineImg) | ||
3012 | 2986 | { | ||
3013 | 2987 | cairo_t *cr; | ||
3014 | 2988 | cairo_surface_t *surface; | ||
3015 | 2989 | double x1, y1, x2, y2; | ||
3016 | 2990 | double *ctm; | ||
3017 | 2991 | double mat[6]; | ||
3018 | 2992 | CairoImage *image; | ||
3019 | 2993 | |||
3020 | 2994 | ctm = state->getCTM(); | ||
3021 | 2995 | |||
3022 | 2996 | mat[0] = ctm[0]; | ||
3023 | 2997 | mat[1] = ctm[1]; | ||
3024 | 2998 | mat[2] = -ctm[2]; | ||
3025 | 2999 | mat[3] = -ctm[3]; | ||
3026 | 3000 | mat[4] = ctm[2] + ctm[4]; | ||
3027 | 3001 | mat[5] = ctm[3] + ctm[5]; | ||
3028 | 3002 | x1 = mat[4]; | ||
3029 | 3003 | y1 = mat[5]; | ||
3030 | 3004 | x2 = x1 + width; | ||
3031 | 3005 | y2 = y1 + height; | ||
3032 | 3006 | |||
3033 | 3007 | image = new CairoImage (x1, y1, x2, y2); | ||
3034 | 3008 | saveImage (image); | ||
3035 | 3009 | |||
3036 | 3010 | if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) { | ||
3037 | 3011 | surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); | ||
3038 | 3012 | cr = cairo_create (surface); | ||
3039 | 3013 | setCairo (cr); | ||
3040 | 3014 | cairo_translate (cr, 0, height); | ||
3041 | 3015 | cairo_scale (cr, width, -height); | ||
3042 | 3016 | |||
3043 | 3017 | CairoOutputDev::drawImage(state, ref, str, width, height, colorMap, interpolate, maskColors, inlineImg); | ||
3044 | 3018 | image->setImage (surface); | ||
3045 | 3019 | |||
3046 | 3020 | setCairo (NULL); | ||
3047 | 3021 | cairo_surface_destroy (surface); | ||
3048 | 3022 | cairo_destroy (cr); | ||
3049 | 3023 | } | ||
3050 | 3024 | } | ||
3051 | 3025 | |||
3052 | 3026 | void CairoImageOutputDev::drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str, | ||
3053 | 3027 | int width, int height, | ||
3054 | 3028 | GfxImageColorMap *colorMap, | ||
3055 | 3029 | GBool interpolate, | ||
3056 | 3030 | Stream *maskStr, | ||
3057 | 3031 | int maskWidth, int maskHeight, | ||
3058 | 3032 | GfxImageColorMap *maskColorMap, | ||
3059 | 3033 | GBool maskInterpolate) | ||
3060 | 3034 | { | ||
3061 | 3035 | cairo_t *cr; | ||
3062 | 3036 | cairo_surface_t *surface; | ||
3063 | 3037 | double x1, y1, x2, y2; | ||
3064 | 3038 | double *ctm; | ||
3065 | 3039 | double mat[6]; | ||
3066 | 3040 | CairoImage *image; | ||
3067 | 3041 | |||
3068 | 3042 | ctm = state->getCTM(); | ||
3069 | 3043 | |||
3070 | 3044 | mat[0] = ctm[0]; | ||
3071 | 3045 | mat[1] = ctm[1]; | ||
3072 | 3046 | mat[2] = -ctm[2]; | ||
3073 | 3047 | mat[3] = -ctm[3]; | ||
3074 | 3048 | mat[4] = ctm[2] + ctm[4]; | ||
3075 | 3049 | mat[5] = ctm[3] + ctm[5]; | ||
3076 | 3050 | x1 = mat[4]; | ||
3077 | 3051 | y1 = mat[5]; | ||
3078 | 3052 | x2 = x1 + width; | ||
3079 | 3053 | y2 = y1 + height; | ||
3080 | 3054 | |||
3081 | 3055 | image = new CairoImage (x1, y1, x2, y2); | ||
3082 | 3056 | saveImage (image); | ||
3083 | 3057 | |||
3084 | 3058 | if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) { | ||
3085 | 3059 | surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); | ||
3086 | 3060 | cr = cairo_create (surface); | ||
3087 | 3061 | setCairo (cr); | ||
3088 | 3062 | cairo_translate (cr, 0, height); | ||
3089 | 3063 | cairo_scale (cr, width, -height); | ||
3090 | 3064 | |||
3091 | 3065 | CairoOutputDev::drawSoftMaskedImage(state, ref, str, width, height, colorMap, interpolate, | ||
3092 | 3066 | maskStr, maskWidth, maskHeight, maskColorMap, maskInterpolate); | ||
3093 | 3067 | image->setImage (surface); | ||
3094 | 3068 | |||
3095 | 3069 | setCairo (NULL); | ||
3096 | 3070 | cairo_surface_destroy (surface); | ||
3097 | 3071 | cairo_destroy (cr); | ||
3098 | 3072 | } | ||
3099 | 3073 | } | ||
3100 | 3074 | |||
3101 | 3075 | void CairoImageOutputDev::drawMaskedImage(GfxState *state, Object *ref, Stream *str, | ||
3102 | 3076 | int width, int height, | ||
3103 | 3077 | GfxImageColorMap *colorMap, | ||
3104 | 3078 | GBool interpolate, | ||
3105 | 3079 | Stream *maskStr, | ||
3106 | 3080 | int maskWidth, int maskHeight, | ||
3107 | 3081 | GBool maskInvert, GBool maskInterpolate) | ||
3108 | 3082 | { | ||
3109 | 3083 | cairo_t *cr; | ||
3110 | 3084 | cairo_surface_t *surface; | ||
3111 | 3085 | double x1, y1, x2, y2; | ||
3112 | 3086 | double *ctm; | ||
3113 | 3087 | double mat[6]; | ||
3114 | 3088 | CairoImage *image; | ||
3115 | 3089 | |||
3116 | 3090 | ctm = state->getCTM(); | ||
3117 | 3091 | |||
3118 | 3092 | mat[0] = ctm[0]; | ||
3119 | 3093 | mat[1] = ctm[1]; | ||
3120 | 3094 | mat[2] = -ctm[2]; | ||
3121 | 3095 | mat[3] = -ctm[3]; | ||
3122 | 3096 | mat[4] = ctm[2] + ctm[4]; | ||
3123 | 3097 | mat[5] = ctm[3] + ctm[5]; | ||
3124 | 3098 | x1 = mat[4]; | ||
3125 | 3099 | y1 = mat[5]; | ||
3126 | 3100 | x2 = x1 + width; | ||
3127 | 3101 | y2 = y1 + height; | ||
3128 | 3102 | |||
3129 | 3103 | image = new CairoImage (x1, y1, x2, y2); | ||
3130 | 3104 | saveImage (image); | ||
3131 | 3105 | |||
3132 | 3106 | if (imgDrawCbk && imgDrawCbk (numImages - 1, imgDrawCbkData)) { | ||
3133 | 3107 | surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height); | ||
3134 | 3108 | cr = cairo_create (surface); | ||
3135 | 3109 | setCairo (cr); | ||
3136 | 3110 | cairo_translate (cr, 0, height); | ||
3137 | 3111 | cairo_scale (cr, width, -height); | ||
3138 | 3112 | |||
3139 | 3113 | CairoOutputDev::drawMaskedImage(state, ref, str, width, height, colorMap, interpolate, | ||
3140 | 3114 | maskStr, maskWidth, maskHeight, maskInvert, maskInterpolate); | ||
3141 | 3115 | image->setImage (surface); | ||
3142 | 3116 | |||
3143 | 3117 | setCairo (NULL); | ||
3144 | 3118 | cairo_surface_destroy (surface); | ||
3145 | 3119 | cairo_destroy (cr); | ||
3146 | 3120 | } | ||
3147 | 3121 | } | ||
3148 | 0 | 3122 | ||
3149 | === modified file '.pc/ltmain-as-needed.diff/ltmain.sh' | |||
3150 | --- .pc/ltmain-as-needed.diff/ltmain.sh 2012-02-12 22:49:35 +0000 | |||
3151 | +++ .pc/ltmain-as-needed.diff/ltmain.sh 2012-11-16 16:39:27 +0000 | |||
3152 | @@ -70,7 +70,7 @@ | |||
3153 | 70 | # compiler: $LTCC | 70 | # compiler: $LTCC |
3154 | 71 | # compiler flags: $LTCFLAGS | 71 | # compiler flags: $LTCFLAGS |
3155 | 72 | # linker: $LD (gnu? $with_gnu_ld) | 72 | # linker: $LD (gnu? $with_gnu_ld) |
3157 | 73 | # $progname: (GNU libtool) 2.4.2 | 73 | # $progname: (GNU libtool) 2.4.2 Debian-2.4.2-1ubuntu1 |
3158 | 74 | # automake: $automake_version | 74 | # automake: $automake_version |
3159 | 75 | # autoconf: $autoconf_version | 75 | # autoconf: $autoconf_version |
3160 | 76 | # | 76 | # |
3161 | @@ -80,7 +80,7 @@ | |||
3162 | 80 | 80 | ||
3163 | 81 | PROGRAM=libtool | 81 | PROGRAM=libtool |
3164 | 82 | PACKAGE=libtool | 82 | PACKAGE=libtool |
3166 | 83 | VERSION=2.4.2 | 83 | VERSION="2.4.2 Debian-2.4.2-1ubuntu1" |
3167 | 84 | TIMESTAMP="" | 84 | TIMESTAMP="" |
3168 | 85 | package_revision=1.3337 | 85 | package_revision=1.3337 |
3169 | 86 | 86 | ||
3170 | @@ -6124,7 +6124,10 @@ | |||
3171 | 6124 | case $pass in | 6124 | case $pass in |
3172 | 6125 | dlopen) libs="$dlfiles" ;; | 6125 | dlopen) libs="$dlfiles" ;; |
3173 | 6126 | dlpreopen) libs="$dlprefiles" ;; | 6126 | dlpreopen) libs="$dlprefiles" ;; |
3175 | 6127 | link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; | 6127 | link) |
3176 | 6128 | libs="$deplibs %DEPLIBS%" | ||
3177 | 6129 | test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" | ||
3178 | 6130 | ;; | ||
3179 | 6128 | esac | 6131 | esac |
3180 | 6129 | fi | 6132 | fi |
3181 | 6130 | if test "$linkmode,$pass" = "lib,dlpreopen"; then | 6133 | if test "$linkmode,$pass" = "lib,dlpreopen"; then |
3182 | @@ -6444,19 +6447,19 @@ | |||
3183 | 6444 | # It is a libtool convenience library, so add in its objects. | 6447 | # It is a libtool convenience library, so add in its objects. |
3184 | 6445 | func_append convenience " $ladir/$objdir/$old_library" | 6448 | func_append convenience " $ladir/$objdir/$old_library" |
3185 | 6446 | func_append old_convenience " $ladir/$objdir/$old_library" | 6449 | func_append old_convenience " $ladir/$objdir/$old_library" |
3186 | 6450 | tmp_libs= | ||
3187 | 6451 | for deplib in $dependency_libs; do | ||
3188 | 6452 | deplibs="$deplib $deplibs" | ||
3189 | 6453 | if $opt_preserve_dup_deps ; then | ||
3190 | 6454 | case "$tmp_libs " in | ||
3191 | 6455 | *" $deplib "*) func_append specialdeplibs " $deplib" ;; | ||
3192 | 6456 | esac | ||
3193 | 6457 | fi | ||
3194 | 6458 | func_append tmp_libs " $deplib" | ||
3195 | 6459 | done | ||
3196 | 6447 | elif test "$linkmode" != prog && test "$linkmode" != lib; then | 6460 | elif test "$linkmode" != prog && test "$linkmode" != lib; then |
3197 | 6448 | func_fatal_error "\`$lib' is not a convenience library" | 6461 | func_fatal_error "\`$lib' is not a convenience library" |
3198 | 6449 | fi | 6462 | fi |
3199 | 6450 | tmp_libs= | ||
3200 | 6451 | for deplib in $dependency_libs; do | ||
3201 | 6452 | deplibs="$deplib $deplibs" | ||
3202 | 6453 | if $opt_preserve_dup_deps ; then | ||
3203 | 6454 | case "$tmp_libs " in | ||
3204 | 6455 | *" $deplib "*) func_append specialdeplibs " $deplib" ;; | ||
3205 | 6456 | esac | ||
3206 | 6457 | fi | ||
3207 | 6458 | func_append tmp_libs " $deplib" | ||
3208 | 6459 | done | ||
3209 | 6460 | continue | 6463 | continue |
3210 | 6461 | fi # $pass = conv | 6464 | fi # $pass = conv |
3211 | 6462 | 6465 | ||
3212 | @@ -7349,6 +7352,9 @@ | |||
3213 | 7349 | revision="$number_minor" | 7352 | revision="$number_minor" |
3214 | 7350 | lt_irix_increment=no | 7353 | lt_irix_increment=no |
3215 | 7351 | ;; | 7354 | ;; |
3216 | 7355 | *) | ||
3217 | 7356 | func_fatal_configuration "$modename: unknown library version type \`$version_type'" | ||
3218 | 7357 | ;; | ||
3219 | 7352 | esac | 7358 | esac |
3220 | 7353 | ;; | 7359 | ;; |
3221 | 7354 | no) | 7360 | no) |
3222 | 7355 | 7361 | ||
3223 | === added directory '.pc/qt4-visibility.diff' | |||
3224 | === added directory '.pc/qt4-visibility.diff/qt4' | |||
3225 | === added directory '.pc/qt4-visibility.diff/qt4/src' | |||
3226 | === added file '.pc/qt4-visibility.diff/qt4/src/Makefile.am' | |||
3227 | --- .pc/qt4-visibility.diff/qt4/src/Makefile.am 1970-01-01 00:00:00 +0000 | |||
3228 | +++ .pc/qt4-visibility.diff/qt4/src/Makefile.am 2012-11-16 16:39:27 +0000 | |||
3229 | @@ -0,0 +1,74 @@ | |||
3230 | 1 | INCLUDES = \ | ||
3231 | 2 | -I$(top_srcdir) \ | ||
3232 | 3 | -I$(top_srcdir)/poppler \ | ||
3233 | 4 | $(FONTCONFIG_CFLAGS) \ | ||
3234 | 5 | $(POPPLER_QT4_CFLAGS) | ||
3235 | 6 | |||
3236 | 7 | SUFFIXES: .moc | ||
3237 | 8 | |||
3238 | 9 | poppler_includedir = $(includedir)/poppler/qt4 | ||
3239 | 10 | |||
3240 | 11 | poppler_include_HEADERS = \ | ||
3241 | 12 | poppler-qt4.h \ | ||
3242 | 13 | poppler-link.h \ | ||
3243 | 14 | poppler-annotation.h \ | ||
3244 | 15 | poppler-form.h \ | ||
3245 | 16 | poppler-optcontent.h \ | ||
3246 | 17 | poppler-export.h \ | ||
3247 | 18 | poppler-media.h \ | ||
3248 | 19 | poppler-page-transition.h | ||
3249 | 20 | |||
3250 | 21 | lib_LTLIBRARIES = libpoppler-qt4.la | ||
3251 | 22 | |||
3252 | 23 | libpoppler_qt4_la_SOURCES = \ | ||
3253 | 24 | poppler-document.cc \ | ||
3254 | 25 | poppler-page.cc \ | ||
3255 | 26 | poppler-fontinfo.cc \ | ||
3256 | 27 | poppler-embeddedfile.cc \ | ||
3257 | 28 | poppler-textbox.cc \ | ||
3258 | 29 | poppler-link.cc \ | ||
3259 | 30 | poppler-annotation.cc \ | ||
3260 | 31 | poppler-link-extractor.cc \ | ||
3261 | 32 | poppler-optcontent.cc \ | ||
3262 | 33 | poppler-optcontent.h \ | ||
3263 | 34 | poppler-page-transition.cc \ | ||
3264 | 35 | poppler-sound.cc \ | ||
3265 | 36 | poppler-form.cc \ | ||
3266 | 37 | poppler-base-converter.cc \ | ||
3267 | 38 | poppler-ps-converter.cc \ | ||
3268 | 39 | poppler-pdf-converter.cc \ | ||
3269 | 40 | poppler-qiodeviceoutstream.cc \ | ||
3270 | 41 | poppler-private.cc \ | ||
3271 | 42 | poppler-movie.cc \ | ||
3272 | 43 | poppler-media.cc \ | ||
3273 | 44 | poppler-annotation-helper.h \ | ||
3274 | 45 | poppler-page-private.h \ | ||
3275 | 46 | poppler-link-extractor-private.h \ | ||
3276 | 47 | poppler-annotation-private.h \ | ||
3277 | 48 | poppler-converter-private.h \ | ||
3278 | 49 | poppler-qiodeviceoutstream-private.h \ | ||
3279 | 50 | poppler-optcontent-private.h \ | ||
3280 | 51 | poppler-export.h \ | ||
3281 | 52 | poppler-private.h \ | ||
3282 | 53 | poppler-page-transition-private.h \ | ||
3283 | 54 | poppler-embeddedfile-private.h | ||
3284 | 55 | |||
3285 | 56 | libpoppler_qt4_la_CXXFLAGS = \ | ||
3286 | 57 | -Dpoppler_qt4_EXPORTS | ||
3287 | 58 | |||
3288 | 59 | libpoppler_qt4_la_LIBADD = \ | ||
3289 | 60 | $(top_builddir)/poppler/libpoppler.la \ | ||
3290 | 61 | $(top_builddir)/poppler/libpoppler-arthur.la \ | ||
3291 | 62 | $(FONTCONFIG_LIBS) \ | ||
3292 | 63 | $(POPPLER_QT4_LIBS) | ||
3293 | 64 | |||
3294 | 65 | libpoppler_qt4_la_LDFLAGS = -version-info 4:0:0 @create_shared_lib@ @auto_import_flags@ | ||
3295 | 66 | |||
3296 | 67 | # This rule lets GNU make create any *.moc from the equivalent *.h | ||
3297 | 68 | .h.moc: | ||
3298 | 69 | $(AM_V_GEN) $(MOCQT4) -i $< -o $@ | ||
3299 | 70 | |||
3300 | 71 | BUILT_SOURCES = poppler-optcontent.moc | ||
3301 | 72 | |||
3302 | 73 | clean-generic: | ||
3303 | 74 | rm -f *.moc | ||
3304 | 0 | 75 | ||
3305 | === added file '.pc/qt4-visibility.diff/qt4/src/Makefile.in' | |||
3306 | --- .pc/qt4-visibility.diff/qt4/src/Makefile.in 1970-01-01 00:00:00 +0000 | |||
3307 | +++ .pc/qt4-visibility.diff/qt4/src/Makefile.in 2012-11-16 16:39:27 +0000 | |||
3308 | @@ -0,0 +1,948 @@ | |||
3309 | 1 | # Makefile.in generated by automake 1.11.5 from Makefile.am. | ||
3310 | 2 | # @configure_input@ | ||
3311 | 3 | |||
3312 | 4 | # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, | ||
3313 | 5 | # 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software | ||
3314 | 6 | # Foundation, Inc. | ||
3315 | 7 | # This Makefile.in is free software; the Free Software Foundation | ||
3316 | 8 | # gives unlimited permission to copy and/or distribute it, | ||
3317 | 9 | # with or without modifications, as long as this notice is preserved. | ||
3318 | 10 | |||
3319 | 11 | # This program is distributed in the hope that it will be useful, | ||
3320 | 12 | # but WITHOUT ANY WARRANTY, to the extent permitted by law; without | ||
3321 | 13 | # even the implied warranty of MERCHANTABILITY or FITNESS FOR A | ||
3322 | 14 | # PARTICULAR PURPOSE. | ||
3323 | 15 | |||
3324 | 16 | @SET_MAKE@ | ||
3325 | 17 | |||
3326 | 18 | |||
3327 | 19 | VPATH = @srcdir@ | ||
3328 | 20 | am__make_dryrun = \ | ||
3329 | 21 | { \ | ||
3330 | 22 | am__dry=no; \ | ||
3331 | 23 | case $$MAKEFLAGS in \ | ||
3332 | 24 | *\\[\ \ ]*) \ | ||
3333 | 25 | echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ | ||
3334 | 26 | | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ | ||
3335 | 27 | *) \ | ||
3336 | 28 | for am__flg in $$MAKEFLAGS; do \ | ||
3337 | 29 | case $$am__flg in \ | ||
3338 | 30 | *=*|--*) ;; \ | ||
3339 | 31 | *n*) am__dry=yes; break;; \ | ||
3340 | 32 | esac; \ | ||
3341 | 33 | done;; \ | ||
3342 | 34 | esac; \ | ||
3343 | 35 | test $$am__dry = yes; \ | ||
3344 | 36 | } | ||
3345 | 37 | pkgdatadir = $(datadir)/@PACKAGE@ | ||
3346 | 38 | pkgincludedir = $(includedir)/@PACKAGE@ | ||
3347 | 39 | pkglibdir = $(libdir)/@PACKAGE@ | ||
3348 | 40 | pkglibexecdir = $(libexecdir)/@PACKAGE@ | ||
3349 | 41 | am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd | ||
3350 | 42 | install_sh_DATA = $(install_sh) -c -m 644 | ||
3351 | 43 | install_sh_PROGRAM = $(install_sh) -c | ||
3352 | 44 | install_sh_SCRIPT = $(install_sh) -c | ||
3353 | 45 | INSTALL_HEADER = $(INSTALL_DATA) | ||
3354 | 46 | transform = $(program_transform_name) | ||
3355 | 47 | NORMAL_INSTALL = : | ||
3356 | 48 | PRE_INSTALL = : | ||
3357 | 49 | POST_INSTALL = : | ||
3358 | 50 | NORMAL_UNINSTALL = : | ||
3359 | 51 | PRE_UNINSTALL = : | ||
3360 | 52 | POST_UNINSTALL = : | ||
3361 | 53 | build_triplet = @build@ | ||
3362 | 54 | host_triplet = @host@ | ||
3363 | 55 | subdir = qt4/src | ||
3364 | 56 | DIST_COMMON = $(poppler_include_HEADERS) $(srcdir)/Makefile.am \ | ||
3365 | 57 | $(srcdir)/Makefile.in | ||
3366 | 58 | ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 | ||
3367 | 59 | am__aclocal_m4_deps = $(top_srcdir)/m4/acx_pthread.m4 \ | ||
3368 | 60 | $(top_srcdir)/m4/define-dir.m4 $(top_srcdir)/m4/gtk-doc.m4 \ | ||
3369 | 61 | $(top_srcdir)/m4/iconv.m4 $(top_srcdir)/m4/introspection.m4 \ | ||
3370 | 62 | $(top_srcdir)/m4/libjpeg.m4 $(top_srcdir)/m4/libtool.m4 \ | ||
3371 | 63 | $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ | ||
3372 | 64 | $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ | ||
3373 | 65 | $(top_srcdir)/configure.ac | ||
3374 | 66 | am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ | ||
3375 | 67 | $(ACLOCAL_M4) | ||
3376 | 68 | mkinstalldirs = $(install_sh) -d | ||
3377 | 69 | CONFIG_HEADER = $(top_builddir)/config.h \ | ||
3378 | 70 | $(top_builddir)/poppler/poppler-config.h | ||
3379 | 71 | CONFIG_CLEAN_FILES = | ||
3380 | 72 | CONFIG_CLEAN_VPATH_FILES = | ||
3381 | 73 | am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; | ||
3382 | 74 | am__vpath_adj = case $$p in \ | ||
3383 | 75 | $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ | ||
3384 | 76 | *) f=$$p;; \ | ||
3385 | 77 | esac; | ||
3386 | 78 | am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; | ||
3387 | 79 | am__install_max = 40 | ||
3388 | 80 | am__nobase_strip_setup = \ | ||
3389 | 81 | srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` | ||
3390 | 82 | am__nobase_strip = \ | ||
3391 | 83 | for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" | ||
3392 | 84 | am__nobase_list = $(am__nobase_strip_setup); \ | ||
3393 | 85 | for p in $$list; do echo "$$p $$p"; done | \ | ||
3394 | 86 | sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ | ||
3395 | 87 | $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ | ||
3396 | 88 | if (++n[$$2] == $(am__install_max)) \ | ||
3397 | 89 | { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ | ||
3398 | 90 | END { for (dir in files) print dir, files[dir] }' | ||
3399 | 91 | am__base_list = \ | ||
3400 | 92 | sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ | ||
3401 | 93 | sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | ||
3402 | 94 | am__uninstall_files_from_dir = { \ | ||
3403 | 95 | test -z "$$files" \ | ||
3404 | 96 | || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ | ||
3405 | 97 | || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ | ||
3406 | 98 | $(am__cd) "$$dir" && rm -f $$files; }; \ | ||
3407 | 99 | } | ||
3408 | 100 | am__installdirs = "$(DESTDIR)$(libdir)" \ | ||
3409 | 101 | "$(DESTDIR)$(poppler_includedir)" | ||
3410 | 102 | LTLIBRARIES = $(lib_LTLIBRARIES) | ||
3411 | 103 | am__DEPENDENCIES_1 = | ||
3412 | 104 | libpoppler_qt4_la_DEPENDENCIES = \ | ||
3413 | 105 | $(top_builddir)/poppler/libpoppler.la \ | ||
3414 | 106 | $(top_builddir)/poppler/libpoppler-arthur.la \ | ||
3415 | 107 | $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) | ||
3416 | 108 | am_libpoppler_qt4_la_OBJECTS = libpoppler_qt4_la-poppler-document.lo \ | ||
3417 | 109 | libpoppler_qt4_la-poppler-page.lo \ | ||
3418 | 110 | libpoppler_qt4_la-poppler-fontinfo.lo \ | ||
3419 | 111 | libpoppler_qt4_la-poppler-embeddedfile.lo \ | ||
3420 | 112 | libpoppler_qt4_la-poppler-textbox.lo \ | ||
3421 | 113 | libpoppler_qt4_la-poppler-link.lo \ | ||
3422 | 114 | libpoppler_qt4_la-poppler-annotation.lo \ | ||
3423 | 115 | libpoppler_qt4_la-poppler-link-extractor.lo \ | ||
3424 | 116 | libpoppler_qt4_la-poppler-optcontent.lo \ | ||
3425 | 117 | libpoppler_qt4_la-poppler-page-transition.lo \ | ||
3426 | 118 | libpoppler_qt4_la-poppler-sound.lo \ | ||
3427 | 119 | libpoppler_qt4_la-poppler-form.lo \ | ||
3428 | 120 | libpoppler_qt4_la-poppler-base-converter.lo \ | ||
3429 | 121 | libpoppler_qt4_la-poppler-ps-converter.lo \ | ||
3430 | 122 | libpoppler_qt4_la-poppler-pdf-converter.lo \ | ||
3431 | 123 | libpoppler_qt4_la-poppler-qiodeviceoutstream.lo \ | ||
3432 | 124 | libpoppler_qt4_la-poppler-private.lo \ | ||
3433 | 125 | libpoppler_qt4_la-poppler-movie.lo \ | ||
3434 | 126 | libpoppler_qt4_la-poppler-media.lo | ||
3435 | 127 | libpoppler_qt4_la_OBJECTS = $(am_libpoppler_qt4_la_OBJECTS) | ||
3436 | 128 | AM_V_lt = $(am__v_lt_@AM_V@) | ||
3437 | 129 | am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) | ||
3438 | 130 | am__v_lt_0 = --silent | ||
3439 | 131 | libpoppler_qt4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ | ||
3440 | 132 | $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ | ||
3441 | 133 | $(libpoppler_qt4_la_CXXFLAGS) $(CXXFLAGS) \ | ||
3442 | 134 | $(libpoppler_qt4_la_LDFLAGS) $(LDFLAGS) -o $@ | ||
3443 | 135 | DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) -I$(top_builddir)/poppler | ||
3444 | 136 | depcomp = $(SHELL) $(top_srcdir)/depcomp | ||
3445 | 137 | am__depfiles_maybe = depfiles | ||
3446 | 138 | am__mv = mv -f | ||
3447 | 139 | CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ | ||
3448 | 140 | $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) | ||
3449 | 141 | LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ | ||
3450 | 142 | $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ | ||
3451 | 143 | $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ | ||
3452 | 144 | $(AM_CXXFLAGS) $(CXXFLAGS) | ||
3453 | 145 | AM_V_CXX = $(am__v_CXX_@AM_V@) | ||
3454 | 146 | am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) | ||
3455 | 147 | am__v_CXX_0 = @echo " CXX " $@; | ||
3456 | 148 | AM_V_at = $(am__v_at_@AM_V@) | ||
3457 | 149 | am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) | ||
3458 | 150 | am__v_at_0 = @ | ||
3459 | 151 | CXXLD = $(CXX) | ||
3460 | 152 | CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ | ||
3461 | 153 | $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ | ||
3462 | 154 | $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ | ||
3463 | 155 | AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) | ||
3464 | 156 | am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) | ||
3465 | 157 | am__v_CXXLD_0 = @echo " CXXLD " $@; | ||
3466 | 158 | COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ | ||
3467 | 159 | $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) | ||
3468 | 160 | LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
3469 | 161 | $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ | ||
3470 | 162 | $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ | ||
3471 | 163 | $(AM_CFLAGS) $(CFLAGS) | ||
3472 | 164 | AM_V_CC = $(am__v_CC_@AM_V@) | ||
3473 | 165 | am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) | ||
3474 | 166 | am__v_CC_0 = @echo " CC " $@; | ||
3475 | 167 | CCLD = $(CC) | ||
3476 | 168 | LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ | ||
3477 | 169 | $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ | ||
3478 | 170 | $(AM_LDFLAGS) $(LDFLAGS) -o $@ | ||
3479 | 171 | AM_V_CCLD = $(am__v_CCLD_@AM_V@) | ||
3480 | 172 | am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) | ||
3481 | 173 | am__v_CCLD_0 = @echo " CCLD " $@; | ||
3482 | 174 | AM_V_GEN = $(am__v_GEN_@AM_V@) | ||
3483 | 175 | am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) | ||
3484 | 176 | am__v_GEN_0 = @echo " GEN " $@; | ||
3485 | 177 | SOURCES = $(libpoppler_qt4_la_SOURCES) | ||
3486 | 178 | DIST_SOURCES = $(libpoppler_qt4_la_SOURCES) | ||
3487 | 179 | am__can_run_installinfo = \ | ||
3488 | 180 | case $$AM_UPDATE_INFO_DIR in \ | ||
3489 | 181 | n|no|NO) false;; \ | ||
3490 | 182 | *) (install-info --version) >/dev/null 2>&1;; \ | ||
3491 | 183 | esac | ||
3492 | 184 | HEADERS = $(poppler_include_HEADERS) | ||
3493 | 185 | ETAGS = etags | ||
3494 | 186 | CTAGS = ctags | ||
3495 | 187 | DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) | ||
3496 | 188 | ACLOCAL = @ACLOCAL@ | ||
3497 | 189 | AMTAR = @AMTAR@ | ||
3498 | 190 | AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ | ||
3499 | 191 | AR = @AR@ | ||
3500 | 192 | AS = @AS@ | ||
3501 | 193 | AUTOCONF = @AUTOCONF@ | ||
3502 | 194 | AUTOHEADER = @AUTOHEADER@ | ||
3503 | 195 | AUTOMAKE = @AUTOMAKE@ | ||
3504 | 196 | AWK = @AWK@ | ||
3505 | 197 | CAIRO_CFLAGS = @CAIRO_CFLAGS@ | ||
3506 | 198 | CAIRO_FEATURE = @CAIRO_FEATURE@ | ||
3507 | 199 | CAIRO_LIBS = @CAIRO_LIBS@ | ||
3508 | 200 | CAIRO_REQ = @CAIRO_REQ@ | ||
3509 | 201 | CAIRO_VERSION = @CAIRO_VERSION@ | ||
3510 | 202 | CC = @CC@ | ||
3511 | 203 | CCDEPMODE = @CCDEPMODE@ | ||
3512 | 204 | CFLAGS = @CFLAGS@ | ||
3513 | 205 | CPP = @CPP@ | ||
3514 | 206 | CPPFLAGS = @CPPFLAGS@ | ||
3515 | 207 | CXX = @CXX@ | ||
3516 | 208 | CXXCPP = @CXXCPP@ | ||
3517 | 209 | CXXDEPMODE = @CXXDEPMODE@ | ||
3518 | 210 | CXXFLAGS = @CXXFLAGS@ | ||
3519 | 211 | CYGPATH_W = @CYGPATH_W@ | ||
3520 | 212 | DEFS = @DEFS@ | ||
3521 | 213 | DEPDIR = @DEPDIR@ | ||
3522 | 214 | DLLTOOL = @DLLTOOL@ | ||
3523 | 215 | DSYMUTIL = @DSYMUTIL@ | ||
3524 | 216 | DUMPBIN = @DUMPBIN@ | ||
3525 | 217 | ECHO_C = @ECHO_C@ | ||
3526 | 218 | ECHO_N = @ECHO_N@ | ||
3527 | 219 | ECHO_T = @ECHO_T@ | ||
3528 | 220 | EGREP = @EGREP@ | ||
3529 | 221 | EXEEXT = @EXEEXT@ | ||
3530 | 222 | FGREP = @FGREP@ | ||
3531 | 223 | FONTCONFIG_CFLAGS = @FONTCONFIG_CFLAGS@ | ||
3532 | 224 | FONTCONFIG_LIBS = @FONTCONFIG_LIBS@ | ||
3533 | 225 | FREETYPE_CFLAGS = @FREETYPE_CFLAGS@ | ||
3534 | 226 | FREETYPE_CONFIG = @FREETYPE_CONFIG@ | ||
3535 | 227 | FREETYPE_LIBS = @FREETYPE_LIBS@ | ||
3536 | 228 | GLIB_MKENUMS = @GLIB_MKENUMS@ | ||
3537 | 229 | GLIB_REQ = @GLIB_REQ@ | ||
3538 | 230 | GLIB_REQUIRED = @GLIB_REQUIRED@ | ||
3539 | 231 | GREP = @GREP@ | ||
3540 | 232 | GTKDOC_CHECK = @GTKDOC_CHECK@ | ||
3541 | 233 | GTKDOC_DEPS_CFLAGS = @GTKDOC_DEPS_CFLAGS@ | ||
3542 | 234 | GTKDOC_DEPS_LIBS = @GTKDOC_DEPS_LIBS@ | ||
3543 | 235 | GTKDOC_MKPDF = @GTKDOC_MKPDF@ | ||
3544 | 236 | GTKDOC_REBASE = @GTKDOC_REBASE@ | ||
3545 | 237 | GTK_TEST_CFLAGS = @GTK_TEST_CFLAGS@ | ||
3546 | 238 | GTK_TEST_LIBS = @GTK_TEST_LIBS@ | ||
3547 | 239 | HTML_DIR = @HTML_DIR@ | ||
3548 | 240 | INSTALL = @INSTALL@ | ||
3549 | 241 | INSTALL_DATA = @INSTALL_DATA@ | ||
3550 | 242 | INSTALL_PROGRAM = @INSTALL_PROGRAM@ | ||
3551 | 243 | INSTALL_SCRIPT = @INSTALL_SCRIPT@ | ||
3552 | 244 | INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ | ||
3553 | 245 | INTROSPECTION_CFLAGS = @INTROSPECTION_CFLAGS@ | ||
3554 | 246 | INTROSPECTION_COMPILER = @INTROSPECTION_COMPILER@ | ||
3555 | 247 | INTROSPECTION_GENERATE = @INTROSPECTION_GENERATE@ | ||
3556 | 248 | INTROSPECTION_GIRDIR = @INTROSPECTION_GIRDIR@ | ||
3557 | 249 | INTROSPECTION_LIBS = @INTROSPECTION_LIBS@ | ||
3558 | 250 | INTROSPECTION_MAKEFILE = @INTROSPECTION_MAKEFILE@ | ||
3559 | 251 | INTROSPECTION_SCANNER = @INTROSPECTION_SCANNER@ | ||
3560 | 252 | INTROSPECTION_TYPELIBDIR = @INTROSPECTION_TYPELIBDIR@ | ||
3561 | 253 | LCMS_CFLAGS = @LCMS_CFLAGS@ | ||
3562 | 254 | LCMS_LIBS = @LCMS_LIBS@ | ||
3563 | 255 | LD = @LD@ | ||
3564 | 256 | LDFLAGS = @LDFLAGS@ | ||
3565 | 257 | LIBCURL_CFLAGS = @LIBCURL_CFLAGS@ | ||
3566 | 258 | LIBCURL_LIBS = @LIBCURL_LIBS@ | ||
3567 | 259 | LIBICONV = @LIBICONV@ | ||
3568 | 260 | LIBJPEG_CFLAGS = @LIBJPEG_CFLAGS@ | ||
3569 | 261 | LIBJPEG_LIBS = @LIBJPEG_LIBS@ | ||
3570 | 262 | LIBOBJS = @LIBOBJS@ | ||
3571 | 263 | LIBOPENJPEG_CFLAGS = @LIBOPENJPEG_CFLAGS@ | ||
3572 | 264 | LIBOPENJPEG_LIBS = @LIBOPENJPEG_LIBS@ | ||
3573 | 265 | LIBPNG_CFLAGS = @LIBPNG_CFLAGS@ | ||
3574 | 266 | LIBPNG_LIBS = @LIBPNG_LIBS@ | ||
3575 | 267 | LIBS = @LIBS@ | ||
3576 | 268 | LIBTIFF_CFLAGS = @LIBTIFF_CFLAGS@ | ||
3577 | 269 | LIBTIFF_CFLAGSS = @LIBTIFF_CFLAGSS@ | ||
3578 | 270 | LIBTIFF_LIBS = @LIBTIFF_LIBS@ | ||
3579 | 271 | LIBTOOL = @LIBTOOL@ | ||
3580 | 272 | LIPO = @LIPO@ | ||
3581 | 273 | LN_S = @LN_S@ | ||
3582 | 274 | LTLIBICONV = @LTLIBICONV@ | ||
3583 | 275 | LTLIBOBJS = @LTLIBOBJS@ | ||
3584 | 276 | MAKEINFO = @MAKEINFO@ | ||
3585 | 277 | MANIFEST_TOOL = @MANIFEST_TOOL@ | ||
3586 | 278 | MKDIR_P = @MKDIR_P@ | ||
3587 | 279 | MOCQT4 = @MOCQT4@ | ||
3588 | 280 | NM = @NM@ | ||
3589 | 281 | NMEDIT = @NMEDIT@ | ||
3590 | 282 | OBJDUMP = @OBJDUMP@ | ||
3591 | 283 | OBJEXT = @OBJEXT@ | ||
3592 | 284 | OTOOL = @OTOOL@ | ||
3593 | 285 | OTOOL64 = @OTOOL64@ | ||
3594 | 286 | PACKAGE = @PACKAGE@ | ||
3595 | 287 | PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ | ||
3596 | 288 | PACKAGE_NAME = @PACKAGE_NAME@ | ||
3597 | 289 | PACKAGE_STRING = @PACKAGE_STRING@ | ||
3598 | 290 | PACKAGE_TARNAME = @PACKAGE_TARNAME@ | ||
3599 | 291 | PACKAGE_URL = @PACKAGE_URL@ | ||
3600 | 292 | PACKAGE_VERSION = @PACKAGE_VERSION@ | ||
3601 | 293 | PATH_SEPARATOR = @PATH_SEPARATOR@ | ||
3602 | 294 | PC_REQUIRES = @PC_REQUIRES@ | ||
3603 | 295 | PC_REQUIRES_PRIVATE = @PC_REQUIRES_PRIVATE@ | ||
3604 | 296 | PDFTOCAIRO_CFLAGS = @PDFTOCAIRO_CFLAGS@ | ||
3605 | 297 | PDFTOCAIRO_LIBS = @PDFTOCAIRO_LIBS@ | ||
3606 | 298 | PKG_CONFIG = @PKG_CONFIG@ | ||
3607 | 299 | PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ | ||
3608 | 300 | PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ | ||
3609 | 301 | POPPLER_DATADIR = @POPPLER_DATADIR@ | ||
3610 | 302 | POPPLER_GLIB_CFLAGS = @POPPLER_GLIB_CFLAGS@ | ||
3611 | 303 | POPPLER_GLIB_DISABLE_DEPRECATED = @POPPLER_GLIB_DISABLE_DEPRECATED@ | ||
3612 | 304 | POPPLER_GLIB_DISABLE_SINGLE_INCLUDES = @POPPLER_GLIB_DISABLE_SINGLE_INCLUDES@ | ||
3613 | 305 | POPPLER_GLIB_LIBS = @POPPLER_GLIB_LIBS@ | ||
3614 | 306 | POPPLER_MAJOR_VERSION = @POPPLER_MAJOR_VERSION@ | ||
3615 | 307 | POPPLER_MICRO_VERSION = @POPPLER_MICRO_VERSION@ | ||
3616 | 308 | POPPLER_MINOR_VERSION = @POPPLER_MINOR_VERSION@ | ||
3617 | 309 | POPPLER_QT4_CFLAGS = @POPPLER_QT4_CFLAGS@ | ||
3618 | 310 | POPPLER_QT4_CXXFLAGS = @POPPLER_QT4_CXXFLAGS@ | ||
3619 | 311 | POPPLER_QT4_LIBS = @POPPLER_QT4_LIBS@ | ||
3620 | 312 | POPPLER_QT4_TEST_CFLAGS = @POPPLER_QT4_TEST_CFLAGS@ | ||
3621 | 313 | POPPLER_QT4_TEST_LIBS = @POPPLER_QT4_TEST_LIBS@ | ||
3622 | 314 | POPPLER_VERSION = @POPPLER_VERSION@ | ||
3623 | 315 | PTHREAD_CC = @PTHREAD_CC@ | ||
3624 | 316 | PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ | ||
3625 | 317 | PTHREAD_LIBS = @PTHREAD_LIBS@ | ||
3626 | 318 | RANLIB = @RANLIB@ | ||
3627 | 319 | SED = @SED@ | ||
3628 | 320 | SET_MAKE = @SET_MAKE@ | ||
3629 | 321 | SHELL = @SHELL@ | ||
3630 | 322 | STRIP = @STRIP@ | ||
3631 | 323 | TESTDATADIR = @TESTDATADIR@ | ||
3632 | 324 | VERSION = @VERSION@ | ||
3633 | 325 | XMKMF = @XMKMF@ | ||
3634 | 326 | X_CFLAGS = @X_CFLAGS@ | ||
3635 | 327 | X_EXTRA_LIBS = @X_EXTRA_LIBS@ | ||
3636 | 328 | X_LIBS = @X_LIBS@ | ||
3637 | 329 | X_PRE_LIBS = @X_PRE_LIBS@ | ||
3638 | 330 | ZLIB_LIBS = @ZLIB_LIBS@ | ||
3639 | 331 | abs_builddir = @abs_builddir@ | ||
3640 | 332 | abs_srcdir = @abs_srcdir@ | ||
3641 | 333 | abs_top_builddir = @abs_top_builddir@ | ||
3642 | 334 | abs_top_srcdir = @abs_top_srcdir@ | ||
3643 | 335 | ac_ct_AR = @ac_ct_AR@ | ||
3644 | 336 | ac_ct_CC = @ac_ct_CC@ | ||
3645 | 337 | ac_ct_CXX = @ac_ct_CXX@ | ||
3646 | 338 | ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ | ||
3647 | 339 | acx_pthread_config = @acx_pthread_config@ | ||
3648 | 340 | am__include = @am__include@ | ||
3649 | 341 | am__leading_dot = @am__leading_dot@ | ||
3650 | 342 | am__quote = @am__quote@ | ||
3651 | 343 | am__tar = @am__tar@ | ||
3652 | 344 | am__untar = @am__untar@ | ||
3653 | 345 | auto_import_flags = @auto_import_flags@ | ||
3654 | 346 | bindir = @bindir@ | ||
3655 | 347 | build = @build@ | ||
3656 | 348 | build_alias = @build_alias@ | ||
3657 | 349 | build_cpu = @build_cpu@ | ||
3658 | 350 | build_os = @build_os@ | ||
3659 | 351 | build_vendor = @build_vendor@ | ||
3660 | 352 | builddir = @builddir@ | ||
3661 | 353 | create_shared_lib = @create_shared_lib@ | ||
3662 | 354 | datadir = @datadir@ | ||
3663 | 355 | datarootdir = @datarootdir@ | ||
3664 | 356 | docdir = @docdir@ | ||
3665 | 357 | dvidir = @dvidir@ | ||
3666 | 358 | exec_prefix = @exec_prefix@ | ||
3667 | 359 | host = @host@ | ||
3668 | 360 | host_alias = @host_alias@ | ||
3669 | 361 | host_cpu = @host_cpu@ | ||
3670 | 362 | host_os = @host_os@ | ||
3671 | 363 | host_vendor = @host_vendor@ | ||
3672 | 364 | htmldir = @htmldir@ | ||
3673 | 365 | includedir = @includedir@ | ||
3674 | 366 | infodir = @infodir@ | ||
3675 | 367 | install_sh = @install_sh@ | ||
3676 | 368 | libdir = @libdir@ | ||
3677 | 369 | libexecdir = @libexecdir@ | ||
3678 | 370 | localedir = @localedir@ | ||
3679 | 371 | localstatedir = @localstatedir@ | ||
3680 | 372 | mandir = @mandir@ | ||
3681 | 373 | mkdir_p = @mkdir_p@ | ||
3682 | 374 | oldincludedir = @oldincludedir@ | ||
3683 | 375 | pdfdir = @pdfdir@ | ||
3684 | 376 | prefix = @prefix@ | ||
3685 | 377 | program_transform_name = @program_transform_name@ | ||
3686 | 378 | psdir = @psdir@ | ||
3687 | 379 | sbindir = @sbindir@ | ||
3688 | 380 | sharedstatedir = @sharedstatedir@ | ||
3689 | 381 | srcdir = @srcdir@ | ||
3690 | 382 | sysconfdir = @sysconfdir@ | ||
3691 | 383 | target_alias = @target_alias@ | ||
3692 | 384 | top_build_prefix = @top_build_prefix@ | ||
3693 | 385 | top_builddir = @top_builddir@ | ||
3694 | 386 | top_srcdir = @top_srcdir@ | ||
3695 | 387 | win32_libs = @win32_libs@ | ||
3696 | 388 | INCLUDES = \ | ||
3697 | 389 | -I$(top_srcdir) \ | ||
3698 | 390 | -I$(top_srcdir)/poppler \ | ||
3699 | 391 | $(FONTCONFIG_CFLAGS) \ | ||
3700 | 392 | $(POPPLER_QT4_CFLAGS) | ||
3701 | 393 | |||
3702 | 394 | poppler_includedir = $(includedir)/poppler/qt4 | ||
3703 | 395 | poppler_include_HEADERS = \ | ||
3704 | 396 | poppler-qt4.h \ | ||
3705 | 397 | poppler-link.h \ | ||
3706 | 398 | poppler-annotation.h \ | ||
3707 | 399 | poppler-form.h \ | ||
3708 | 400 | poppler-optcontent.h \ | ||
3709 | 401 | poppler-export.h \ | ||
3710 | 402 | poppler-media.h \ | ||
3711 | 403 | poppler-page-transition.h | ||
3712 | 404 | |||
3713 | 405 | lib_LTLIBRARIES = libpoppler-qt4.la | ||
3714 | 406 | libpoppler_qt4_la_SOURCES = \ | ||
3715 | 407 | poppler-document.cc \ | ||
3716 | 408 | poppler-page.cc \ | ||
3717 | 409 | poppler-fontinfo.cc \ | ||
3718 | 410 | poppler-embeddedfile.cc \ | ||
3719 | 411 | poppler-textbox.cc \ | ||
3720 | 412 | poppler-link.cc \ | ||
3721 | 413 | poppler-annotation.cc \ | ||
3722 | 414 | poppler-link-extractor.cc \ | ||
3723 | 415 | poppler-optcontent.cc \ | ||
3724 | 416 | poppler-optcontent.h \ | ||
3725 | 417 | poppler-page-transition.cc \ | ||
3726 | 418 | poppler-sound.cc \ | ||
3727 | 419 | poppler-form.cc \ | ||
3728 | 420 | poppler-base-converter.cc \ | ||
3729 | 421 | poppler-ps-converter.cc \ | ||
3730 | 422 | poppler-pdf-converter.cc \ | ||
3731 | 423 | poppler-qiodeviceoutstream.cc \ | ||
3732 | 424 | poppler-private.cc \ | ||
3733 | 425 | poppler-movie.cc \ | ||
3734 | 426 | poppler-media.cc \ | ||
3735 | 427 | poppler-annotation-helper.h \ | ||
3736 | 428 | poppler-page-private.h \ | ||
3737 | 429 | poppler-link-extractor-private.h \ | ||
3738 | 430 | poppler-annotation-private.h \ | ||
3739 | 431 | poppler-converter-private.h \ | ||
3740 | 432 | poppler-qiodeviceoutstream-private.h \ | ||
3741 | 433 | poppler-optcontent-private.h \ | ||
3742 | 434 | poppler-export.h \ | ||
3743 | 435 | poppler-private.h \ | ||
3744 | 436 | poppler-page-transition-private.h \ | ||
3745 | 437 | poppler-embeddedfile-private.h | ||
3746 | 438 | |||
3747 | 439 | libpoppler_qt4_la_CXXFLAGS = \ | ||
3748 | 440 | -Dpoppler_qt4_EXPORTS | ||
3749 | 441 | |||
3750 | 442 | libpoppler_qt4_la_LIBADD = \ | ||
3751 | 443 | $(top_builddir)/poppler/libpoppler.la \ | ||
3752 | 444 | $(top_builddir)/poppler/libpoppler-arthur.la \ | ||
3753 | 445 | $(FONTCONFIG_LIBS) \ | ||
3754 | 446 | $(POPPLER_QT4_LIBS) | ||
3755 | 447 | |||
3756 | 448 | libpoppler_qt4_la_LDFLAGS = -version-info 4:0:0 @create_shared_lib@ @auto_import_flags@ | ||
3757 | 449 | BUILT_SOURCES = poppler-optcontent.moc | ||
3758 | 450 | all: $(BUILT_SOURCES) | ||
3759 | 451 | $(MAKE) $(AM_MAKEFLAGS) all-am | ||
3760 | 452 | |||
3761 | 453 | .SUFFIXES: | ||
3762 | 454 | .SUFFIXES: .cc .h .lo .moc .o .obj | ||
3763 | 455 | $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) | ||
3764 | 456 | @for dep in $?; do \ | ||
3765 | 457 | case '$(am__configure_deps)' in \ | ||
3766 | 458 | *$$dep*) \ | ||
3767 | 459 | ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ | ||
3768 | 460 | && { if test -f $@; then exit 0; else break; fi; }; \ | ||
3769 | 461 | exit 1;; \ | ||
3770 | 462 | esac; \ | ||
3771 | 463 | done; \ | ||
3772 | 464 | echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign qt4/src/Makefile'; \ | ||
3773 | 465 | $(am__cd) $(top_srcdir) && \ | ||
3774 | 466 | $(AUTOMAKE) --foreign qt4/src/Makefile | ||
3775 | 467 | .PRECIOUS: Makefile | ||
3776 | 468 | Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status | ||
3777 | 469 | @case '$?' in \ | ||
3778 | 470 | *config.status*) \ | ||
3779 | 471 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ | ||
3780 | 472 | *) \ | ||
3781 | 473 | echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ | ||
3782 | 474 | cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ | ||
3783 | 475 | esac; | ||
3784 | 476 | |||
3785 | 477 | $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) | ||
3786 | 478 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
3787 | 479 | |||
3788 | 480 | $(top_srcdir)/configure: $(am__configure_deps) | ||
3789 | 481 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
3790 | 482 | $(ACLOCAL_M4): $(am__aclocal_m4_deps) | ||
3791 | 483 | cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh | ||
3792 | 484 | $(am__aclocal_m4_deps): | ||
3793 | 485 | install-libLTLIBRARIES: $(lib_LTLIBRARIES) | ||
3794 | 486 | @$(NORMAL_INSTALL) | ||
3795 | 487 | @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ | ||
3796 | 488 | list2=; for p in $$list; do \ | ||
3797 | 489 | if test -f $$p; then \ | ||
3798 | 490 | list2="$$list2 $$p"; \ | ||
3799 | 491 | else :; fi; \ | ||
3800 | 492 | done; \ | ||
3801 | 493 | test -z "$$list2" || { \ | ||
3802 | 494 | echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ | ||
3803 | 495 | $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ | ||
3804 | 496 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ | ||
3805 | 497 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ | ||
3806 | 498 | } | ||
3807 | 499 | |||
3808 | 500 | uninstall-libLTLIBRARIES: | ||
3809 | 501 | @$(NORMAL_UNINSTALL) | ||
3810 | 502 | @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ | ||
3811 | 503 | for p in $$list; do \ | ||
3812 | 504 | $(am__strip_dir) \ | ||
3813 | 505 | echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ | ||
3814 | 506 | $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ | ||
3815 | 507 | done | ||
3816 | 508 | |||
3817 | 509 | clean-libLTLIBRARIES: | ||
3818 | 510 | -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) | ||
3819 | 511 | @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ | ||
3820 | 512 | dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ | ||
3821 | 513 | test "$$dir" != "$$p" || dir=.; \ | ||
3822 | 514 | echo "rm -f \"$${dir}/so_locations\""; \ | ||
3823 | 515 | rm -f "$${dir}/so_locations"; \ | ||
3824 | 516 | done | ||
3825 | 517 | libpoppler-qt4.la: $(libpoppler_qt4_la_OBJECTS) $(libpoppler_qt4_la_DEPENDENCIES) $(EXTRA_libpoppler_qt4_la_DEPENDENCIES) | ||
3826 | 518 | $(AM_V_CXXLD)$(libpoppler_qt4_la_LINK) -rpath $(libdir) $(libpoppler_qt4_la_OBJECTS) $(libpoppler_qt4_la_LIBADD) $(LIBS) | ||
3827 | 519 | |||
3828 | 520 | mostlyclean-compile: | ||
3829 | 521 | -rm -f *.$(OBJEXT) | ||
3830 | 522 | |||
3831 | 523 | distclean-compile: | ||
3832 | 524 | -rm -f *.tab.c | ||
3833 | 525 | |||
3834 | 526 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-annotation.Plo@am__quote@ | ||
3835 | 527 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-base-converter.Plo@am__quote@ | ||
3836 | 528 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-document.Plo@am__quote@ | ||
3837 | 529 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-embeddedfile.Plo@am__quote@ | ||
3838 | 530 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-fontinfo.Plo@am__quote@ | ||
3839 | 531 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-form.Plo@am__quote@ | ||
3840 | 532 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-link-extractor.Plo@am__quote@ | ||
3841 | 533 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-link.Plo@am__quote@ | ||
3842 | 534 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-media.Plo@am__quote@ | ||
3843 | 535 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-movie.Plo@am__quote@ | ||
3844 | 536 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-optcontent.Plo@am__quote@ | ||
3845 | 537 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-page-transition.Plo@am__quote@ | ||
3846 | 538 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-page.Plo@am__quote@ | ||
3847 | 539 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-pdf-converter.Plo@am__quote@ | ||
3848 | 540 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-private.Plo@am__quote@ | ||
3849 | 541 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-ps-converter.Plo@am__quote@ | ||
3850 | 542 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-qiodeviceoutstream.Plo@am__quote@ | ||
3851 | 543 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-sound.Plo@am__quote@ | ||
3852 | 544 | @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpoppler_qt4_la-poppler-textbox.Plo@am__quote@ | ||
3853 | 545 | |||
3854 | 546 | .cc.o: | ||
3855 | 547 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
3856 | 548 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
3857 | 549 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
3858 | 550 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3859 | 551 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< | ||
3860 | 552 | |||
3861 | 553 | .cc.obj: | ||
3862 | 554 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` | ||
3863 | 555 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po | ||
3864 | 556 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ | ||
3865 | 557 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3866 | 558 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` | ||
3867 | 559 | |||
3868 | 560 | .cc.lo: | ||
3869 | 561 | @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LTCXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< | ||
3870 | 562 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo | ||
3871 | 563 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ | ||
3872 | 564 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3873 | 565 | @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< | ||
3874 | 566 | |||
3875 | 567 | libpoppler_qt4_la-poppler-document.lo: poppler-document.cc | ||
3876 | 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 | ||
3877 | 569 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-document.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-document.Plo | ||
3878 | 570 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-document.cc' object='libpoppler_qt4_la-poppler-document.lo' libtool=yes @AMDEPBACKSLASH@ | ||
3879 | 571 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3880 | 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 | ||
3881 | 573 | |||
3882 | 574 | libpoppler_qt4_la-poppler-page.lo: poppler-page.cc | ||
3883 | 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 | ||
3884 | 576 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-page.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-page.Plo | ||
3885 | 577 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-page.cc' object='libpoppler_qt4_la-poppler-page.lo' libtool=yes @AMDEPBACKSLASH@ | ||
3886 | 578 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3887 | 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 | ||
3888 | 580 | |||
3889 | 581 | libpoppler_qt4_la-poppler-fontinfo.lo: poppler-fontinfo.cc | ||
3890 | 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 | ||
3891 | 583 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-fontinfo.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-fontinfo.Plo | ||
3892 | 584 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-fontinfo.cc' object='libpoppler_qt4_la-poppler-fontinfo.lo' libtool=yes @AMDEPBACKSLASH@ | ||
3893 | 585 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3894 | 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 | ||
3895 | 587 | |||
3896 | 588 | libpoppler_qt4_la-poppler-embeddedfile.lo: poppler-embeddedfile.cc | ||
3897 | 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 | ||
3898 | 590 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-embeddedfile.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-embeddedfile.Plo | ||
3899 | 591 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-embeddedfile.cc' object='libpoppler_qt4_la-poppler-embeddedfile.lo' libtool=yes @AMDEPBACKSLASH@ | ||
3900 | 592 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3901 | 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 | ||
3902 | 594 | |||
3903 | 595 | libpoppler_qt4_la-poppler-textbox.lo: poppler-textbox.cc | ||
3904 | 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 | ||
3905 | 597 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-textbox.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-textbox.Plo | ||
3906 | 598 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-textbox.cc' object='libpoppler_qt4_la-poppler-textbox.lo' libtool=yes @AMDEPBACKSLASH@ | ||
3907 | 599 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3908 | 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 | ||
3909 | 601 | |||
3910 | 602 | libpoppler_qt4_la-poppler-link.lo: poppler-link.cc | ||
3911 | 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 | ||
3912 | 604 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-link.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-link.Plo | ||
3913 | 605 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-link.cc' object='libpoppler_qt4_la-poppler-link.lo' libtool=yes @AMDEPBACKSLASH@ | ||
3914 | 606 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3915 | 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 | ||
3916 | 608 | |||
3917 | 609 | libpoppler_qt4_la-poppler-annotation.lo: poppler-annotation.cc | ||
3918 | 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 | ||
3919 | 611 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-annotation.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-annotation.Plo | ||
3920 | 612 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-annotation.cc' object='libpoppler_qt4_la-poppler-annotation.lo' libtool=yes @AMDEPBACKSLASH@ | ||
3921 | 613 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3922 | 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 | ||
3923 | 615 | |||
3924 | 616 | libpoppler_qt4_la-poppler-link-extractor.lo: poppler-link-extractor.cc | ||
3925 | 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 | ||
3926 | 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 | ||
3927 | 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@ | ||
3928 | 620 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3929 | 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 | ||
3930 | 622 | |||
3931 | 623 | libpoppler_qt4_la-poppler-optcontent.lo: poppler-optcontent.cc | ||
3932 | 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 | ||
3933 | 625 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-optcontent.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-optcontent.Plo | ||
3934 | 626 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-optcontent.cc' object='libpoppler_qt4_la-poppler-optcontent.lo' libtool=yes @AMDEPBACKSLASH@ | ||
3935 | 627 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3936 | 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 | ||
3937 | 629 | |||
3938 | 630 | libpoppler_qt4_la-poppler-page-transition.lo: poppler-page-transition.cc | ||
3939 | 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 | ||
3940 | 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 | ||
3941 | 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@ | ||
3942 | 634 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3943 | 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 | ||
3944 | 636 | |||
3945 | 637 | libpoppler_qt4_la-poppler-sound.lo: poppler-sound.cc | ||
3946 | 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 | ||
3947 | 639 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-sound.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-sound.Plo | ||
3948 | 640 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-sound.cc' object='libpoppler_qt4_la-poppler-sound.lo' libtool=yes @AMDEPBACKSLASH@ | ||
3949 | 641 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3950 | 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 | ||
3951 | 643 | |||
3952 | 644 | libpoppler_qt4_la-poppler-form.lo: poppler-form.cc | ||
3953 | 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 | ||
3954 | 646 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-form.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-form.Plo | ||
3955 | 647 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-form.cc' object='libpoppler_qt4_la-poppler-form.lo' libtool=yes @AMDEPBACKSLASH@ | ||
3956 | 648 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3957 | 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 | ||
3958 | 650 | |||
3959 | 651 | libpoppler_qt4_la-poppler-base-converter.lo: poppler-base-converter.cc | ||
3960 | 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 | ||
3961 | 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 | ||
3962 | 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@ | ||
3963 | 655 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3964 | 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 | ||
3965 | 657 | |||
3966 | 658 | libpoppler_qt4_la-poppler-ps-converter.lo: poppler-ps-converter.cc | ||
3967 | 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 | ||
3968 | 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 | ||
3969 | 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@ | ||
3970 | 662 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3971 | 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 | ||
3972 | 664 | |||
3973 | 665 | libpoppler_qt4_la-poppler-pdf-converter.lo: poppler-pdf-converter.cc | ||
3974 | 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 | ||
3975 | 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 | ||
3976 | 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@ | ||
3977 | 669 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3978 | 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 | ||
3979 | 671 | |||
3980 | 672 | libpoppler_qt4_la-poppler-qiodeviceoutstream.lo: poppler-qiodeviceoutstream.cc | ||
3981 | 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 | ||
3982 | 674 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-qiodeviceoutstream.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-qiodeviceoutstream.Plo | ||
3983 | 675 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-qiodeviceoutstream.cc' object='libpoppler_qt4_la-poppler-qiodeviceoutstream.lo' libtool=yes @AMDEPBACKSLASH@ | ||
3984 | 676 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3985 | 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 | ||
3986 | 678 | |||
3987 | 679 | libpoppler_qt4_la-poppler-private.lo: poppler-private.cc | ||
3988 | 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 | ||
3989 | 681 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-private.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-private.Plo | ||
3990 | 682 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-private.cc' object='libpoppler_qt4_la-poppler-private.lo' libtool=yes @AMDEPBACKSLASH@ | ||
3991 | 683 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3992 | 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 | ||
3993 | 685 | |||
3994 | 686 | libpoppler_qt4_la-poppler-movie.lo: poppler-movie.cc | ||
3995 | 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 | ||
3996 | 688 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-movie.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-movie.Plo | ||
3997 | 689 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-movie.cc' object='libpoppler_qt4_la-poppler-movie.lo' libtool=yes @AMDEPBACKSLASH@ | ||
3998 | 690 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
3999 | 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 | ||
4000 | 692 | |||
4001 | 693 | libpoppler_qt4_la-poppler-media.lo: poppler-media.cc | ||
4002 | 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 | ||
4003 | 695 | @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpoppler_qt4_la-poppler-media.Tpo $(DEPDIR)/libpoppler_qt4_la-poppler-media.Plo | ||
4004 | 696 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='poppler-media.cc' object='libpoppler_qt4_la-poppler-media.lo' libtool=yes @AMDEPBACKSLASH@ | ||
4005 | 697 | @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ | ||
4006 | 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 | ||
4007 | 699 | |||
4008 | 700 | mostlyclean-libtool: | ||
4009 | 701 | -rm -f *.lo | ||
4010 | 702 | |||
4011 | 703 | clean-libtool: | ||
4012 | 704 | -rm -rf .libs _libs | ||
4013 | 705 | install-poppler_includeHEADERS: $(poppler_include_HEADERS) | ||
4014 | 706 | @$(NORMAL_INSTALL) | ||
4015 | 707 | @list='$(poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \ | ||
4016 | 708 | if test -n "$$list"; then \ | ||
4017 | 709 | echo " $(MKDIR_P) '$(DESTDIR)$(poppler_includedir)'"; \ | ||
4018 | 710 | $(MKDIR_P) "$(DESTDIR)$(poppler_includedir)" || exit 1; \ | ||
4019 | 711 | fi; \ | ||
4020 | 712 | for p in $$list; do \ | ||
4021 | 713 | if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ | ||
4022 | 714 | echo "$$d$$p"; \ | ||
4023 | 715 | done | $(am__base_list) | \ | ||
4024 | 716 | while read files; do \ | ||
4025 | 717 | echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(poppler_includedir)'"; \ | ||
4026 | 718 | $(INSTALL_HEADER) $$files "$(DESTDIR)$(poppler_includedir)" || exit $$?; \ | ||
4027 | 719 | done | ||
4028 | 720 | |||
4029 | 721 | uninstall-poppler_includeHEADERS: | ||
4030 | 722 | @$(NORMAL_UNINSTALL) | ||
4031 | 723 | @list='$(poppler_include_HEADERS)'; test -n "$(poppler_includedir)" || list=; \ | ||
4032 | 724 | files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ | ||
4033 | 725 | dir='$(DESTDIR)$(poppler_includedir)'; $(am__uninstall_files_from_dir) | ||
4034 | 726 | |||
4035 | 727 | ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) | ||
4036 | 728 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
4037 | 729 | unique=`for i in $$list; do \ | ||
4038 | 730 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
4039 | 731 | done | \ | ||
4040 | 732 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
4041 | 733 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
4042 | 734 | mkid -fID $$unique | ||
4043 | 735 | tags: TAGS | ||
4044 | 736 | |||
4045 | 737 | TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
4046 | 738 | $(TAGS_FILES) $(LISP) | ||
4047 | 739 | set x; \ | ||
4048 | 740 | here=`pwd`; \ | ||
4049 | 741 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
4050 | 742 | unique=`for i in $$list; do \ | ||
4051 | 743 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
4052 | 744 | done | \ | ||
4053 | 745 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
4054 | 746 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
4055 | 747 | shift; \ | ||
4056 | 748 | if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ | ||
4057 | 749 | test -n "$$unique" || unique=$$empty_fix; \ | ||
4058 | 750 | if test $$# -gt 0; then \ | ||
4059 | 751 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
4060 | 752 | "$$@" $$unique; \ | ||
4061 | 753 | else \ | ||
4062 | 754 | $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ | ||
4063 | 755 | $$unique; \ | ||
4064 | 756 | fi; \ | ||
4065 | 757 | fi | ||
4066 | 758 | ctags: CTAGS | ||
4067 | 759 | CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ | ||
4068 | 760 | $(TAGS_FILES) $(LISP) | ||
4069 | 761 | list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ | ||
4070 | 762 | unique=`for i in $$list; do \ | ||
4071 | 763 | if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ | ||
4072 | 764 | done | \ | ||
4073 | 765 | $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ | ||
4074 | 766 | END { if (nonempty) { for (i in files) print i; }; }'`; \ | ||
4075 | 767 | test -z "$(CTAGS_ARGS)$$unique" \ | ||
4076 | 768 | || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ | ||
4077 | 769 | $$unique | ||
4078 | 770 | |||
4079 | 771 | GTAGS: | ||
4080 | 772 | here=`$(am__cd) $(top_builddir) && pwd` \ | ||
4081 | 773 | && $(am__cd) $(top_srcdir) \ | ||
4082 | 774 | && gtags -i $(GTAGS_ARGS) "$$here" | ||
4083 | 775 | |||
4084 | 776 | distclean-tags: | ||
4085 | 777 | -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags | ||
4086 | 778 | |||
4087 | 779 | distdir: $(DISTFILES) | ||
4088 | 780 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
4089 | 781 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | ||
4090 | 782 | list='$(DISTFILES)'; \ | ||
4091 | 783 | dist_files=`for file in $$list; do echo $$file; done | \ | ||
4092 | 784 | sed -e "s|^$$srcdirstrip/||;t" \ | ||
4093 | 785 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ | ||
4094 | 786 | case $$dist_files in \ | ||
4095 | 787 | */*) $(MKDIR_P) `echo "$$dist_files" | \ | ||
4096 | 788 | sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ | ||
4097 | 789 | sort -u` ;; \ | ||
4098 | 790 | esac; \ | ||
4099 | 791 | for file in $$dist_files; do \ | ||
4100 | 792 | if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ | ||
4101 | 793 | if test -d $$d/$$file; then \ | ||
4102 | 794 | dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ | ||
4103 | 795 | if test -d "$(distdir)/$$file"; then \ | ||
4104 | 796 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
4105 | 797 | fi; \ | ||
4106 | 798 | if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ | ||
4107 | 799 | cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ | ||
4108 | 800 | find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ | ||
4109 | 801 | fi; \ | ||
4110 | 802 | cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ | ||
4111 | 803 | else \ | ||
4112 | 804 | test -f "$(distdir)/$$file" \ | ||
4113 | 805 | || cp -p $$d/$$file "$(distdir)/$$file" \ | ||
4114 | 806 | || exit 1; \ | ||
4115 | 807 | fi; \ | ||
4116 | 808 | done | ||
4117 | 809 | check-am: all-am | ||
4118 | 810 | check: $(BUILT_SOURCES) | ||
4119 | 811 | $(MAKE) $(AM_MAKEFLAGS) check-am | ||
4120 | 812 | all-am: Makefile $(LTLIBRARIES) $(HEADERS) | ||
4121 | 813 | installdirs: | ||
4122 | 814 | for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(poppler_includedir)"; do \ | ||
4123 | 815 | test -z "$$dir" || $(MKDIR_P) "$$dir"; \ | ||
4124 | 816 | done | ||
4125 | 817 | install: $(BUILT_SOURCES) | ||
4126 | 818 | $(MAKE) $(AM_MAKEFLAGS) install-am | ||
4127 | 819 | install-exec: install-exec-am | ||
4128 | 820 | install-data: install-data-am | ||
4129 | 821 | uninstall: uninstall-am | ||
4130 | 822 | |||
4131 | 823 | install-am: all-am | ||
4132 | 824 | @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am | ||
4133 | 825 | |||
4134 | 826 | installcheck: installcheck-am | ||
4135 | 827 | install-strip: | ||
4136 | 828 | if test -z '$(STRIP)'; then \ | ||
4137 | 829 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
4138 | 830 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
4139 | 831 | install; \ | ||
4140 | 832 | else \ | ||
4141 | 833 | $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ | ||
4142 | 834 | install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ | ||
4143 | 835 | "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ | ||
4144 | 836 | fi | ||
4145 | 837 | mostlyclean-generic: | ||
4146 | 838 | |||
4147 | 839 | distclean-generic: | ||
4148 | 840 | -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) | ||
4149 | 841 | -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) | ||
4150 | 842 | |||
4151 | 843 | maintainer-clean-generic: | ||
4152 | 844 | @echo "This command is intended for maintainers to use" | ||
4153 | 845 | @echo "it deletes files that may require special tools to rebuild." | ||
4154 | 846 | -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) | ||
4155 | 847 | clean: clean-am | ||
4156 | 848 | |||
4157 | 849 | clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ | ||
4158 | 850 | mostlyclean-am | ||
4159 | 851 | |||
4160 | 852 | distclean: distclean-am | ||
4161 | 853 | -rm -rf ./$(DEPDIR) | ||
4162 | 854 | -rm -f Makefile | ||
4163 | 855 | distclean-am: clean-am distclean-compile distclean-generic \ | ||
4164 | 856 | distclean-tags | ||
4165 | 857 | |||
4166 | 858 | dvi: dvi-am | ||
4167 | 859 | |||
4168 | 860 | dvi-am: | ||
4169 | 861 | |||
4170 | 862 | html: html-am | ||
4171 | 863 | |||
4172 | 864 | html-am: | ||
4173 | 865 | |||
4174 | 866 | info: info-am | ||
4175 | 867 | |||
4176 | 868 | info-am: | ||
4177 | 869 | |||
4178 | 870 | install-data-am: install-poppler_includeHEADERS | ||
4179 | 871 | |||
4180 | 872 | install-dvi: install-dvi-am | ||
4181 | 873 | |||
4182 | 874 | install-dvi-am: | ||
4183 | 875 | |||
4184 | 876 | install-exec-am: install-libLTLIBRARIES | ||
4185 | 877 | |||
4186 | 878 | install-html: install-html-am | ||
4187 | 879 | |||
4188 | 880 | install-html-am: | ||
4189 | 881 | |||
4190 | 882 | install-info: install-info-am | ||
4191 | 883 | |||
4192 | 884 | install-info-am: | ||
4193 | 885 | |||
4194 | 886 | install-man: | ||
4195 | 887 | |||
4196 | 888 | install-pdf: install-pdf-am | ||
4197 | 889 | |||
4198 | 890 | install-pdf-am: | ||
4199 | 891 | |||
4200 | 892 | install-ps: install-ps-am | ||
4201 | 893 | |||
4202 | 894 | install-ps-am: | ||
4203 | 895 | |||
4204 | 896 | installcheck-am: | ||
4205 | 897 | |||
4206 | 898 | maintainer-clean: maintainer-clean-am | ||
4207 | 899 | -rm -rf ./$(DEPDIR) | ||
4208 | 900 | -rm -f Makefile | ||
4209 | 901 | maintainer-clean-am: distclean-am maintainer-clean-generic | ||
4210 | 902 | |||
4211 | 903 | mostlyclean: mostlyclean-am | ||
4212 | 904 | |||
4213 | 905 | mostlyclean-am: mostlyclean-compile mostlyclean-generic \ | ||
4214 | 906 | mostlyclean-libtool | ||
4215 | 907 | |||
4216 | 908 | pdf: pdf-am | ||
4217 | 909 | |||
4218 | 910 | pdf-am: | ||
4219 | 911 | |||
4220 | 912 | ps: ps-am | ||
4221 | 913 | |||
4222 | 914 | ps-am: | ||
4223 | 915 | |||
4224 | 916 | uninstall-am: uninstall-libLTLIBRARIES \ | ||
4225 | 917 | uninstall-poppler_includeHEADERS | ||
4226 | 918 | |||
4227 | 919 | .MAKE: all check install install-am install-strip | ||
4228 | 920 | |||
4229 | 921 | .PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \ | ||
4230 | 922 | clean-libLTLIBRARIES clean-libtool ctags distclean \ | ||
4231 | 923 | distclean-compile distclean-generic distclean-libtool \ | ||
4232 | 924 | distclean-tags distdir dvi dvi-am html html-am info info-am \ | ||
4233 | 925 | install install-am install-data install-data-am install-dvi \ | ||
4234 | 926 | install-dvi-am install-exec install-exec-am install-html \ | ||
4235 | 927 | install-html-am install-info install-info-am \ | ||
4236 | 928 | install-libLTLIBRARIES install-man install-pdf install-pdf-am \ | ||
4237 | 929 | install-poppler_includeHEADERS install-ps install-ps-am \ | ||
4238 | 930 | install-strip installcheck installcheck-am installdirs \ | ||
4239 | 931 | maintainer-clean maintainer-clean-generic mostlyclean \ | ||
4240 | 932 | mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ | ||
4241 | 933 | pdf pdf-am ps ps-am tags uninstall uninstall-am \ | ||
4242 | 934 | uninstall-libLTLIBRARIES uninstall-poppler_includeHEADERS | ||
4243 | 935 | |||
4244 | 936 | |||
4245 | 937 | SUFFIXES: .moc | ||
4246 | 938 | |||
4247 | 939 | # This rule lets GNU make create any *.moc from the equivalent *.h | ||
4248 | 940 | .h.moc: | ||
4249 | 941 | $(AM_V_GEN) $(MOCQT4) -i $< -o $@ | ||
4250 | 942 | |||
4251 | 943 | clean-generic: | ||
4252 | 944 | rm -f *.moc | ||
4253 | 945 | |||
4254 | 946 | # Tell versions [3.59,3.63) of GNU make to not export all variables. | ||
4255 | 947 | # Otherwise a system limit (for SysV at least) may be exceeded. | ||
4256 | 948 | .NOEXPORT: | ||
4257 | 0 | 949 | ||
4258 | === added file '.pc/qt4-visibility.diff/qt4/src/poppler-export.h' | |||
4259 | --- .pc/qt4-visibility.diff/qt4/src/poppler-export.h 1970-01-01 00:00:00 +0000 | |||
4260 | +++ .pc/qt4-visibility.diff/qt4/src/poppler-export.h 2012-11-16 16:39:27 +0000 | |||
4261 | @@ -0,0 +1,17 @@ | |||
4262 | 1 | /* | ||
4263 | 2 | * This file is used to set the poppler_qt4_EXPORT macros right. | ||
4264 | 3 | * This is needed for setting the visibility on windows, it will have no effect on other platforms. | ||
4265 | 4 | */ | ||
4266 | 5 | #if defined(_WIN32) | ||
4267 | 6 | # define LIB_EXPORT __declspec(dllexport) | ||
4268 | 7 | # define LIB_IMPORT __declspec(dllimport) | ||
4269 | 8 | #else | ||
4270 | 9 | # define LIB_EXPORT | ||
4271 | 10 | # define LIB_IMPORT | ||
4272 | 11 | #endif | ||
4273 | 12 | |||
4274 | 13 | #ifdef poppler_qt4_EXPORTS | ||
4275 | 14 | # define POPPLER_QT4_EXPORT LIB_EXPORT | ||
4276 | 15 | #else | ||
4277 | 16 | # define POPPLER_QT4_EXPORT LIB_IMPORT | ||
4278 | 17 | #endif | ||
4279 | 0 | 18 | ||
4280 | === modified file 'CMakeLists.txt' | |||
4281 | --- CMakeLists.txt 2012-06-07 17:13:58 +0000 | |||
4282 | +++ CMakeLists.txt 2012-11-16 16:39:27 +0000 | |||
4283 | @@ -16,7 +16,7 @@ | |||
4284 | 16 | 16 | ||
4285 | 17 | set(POPPLER_MAJOR_VERSION "0") | 17 | set(POPPLER_MAJOR_VERSION "0") |
4286 | 18 | set(POPPLER_MINOR_VERSION "20") | 18 | set(POPPLER_MINOR_VERSION "20") |
4288 | 19 | set(POPPLER_MICRO_VERSION "0") | 19 | set(POPPLER_MICRO_VERSION "4") |
4289 | 20 | set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}") | 20 | set(POPPLER_VERSION "${POPPLER_MAJOR_VERSION}.${POPPLER_MINOR_VERSION}.${POPPLER_MICRO_VERSION}") |
4290 | 21 | 21 | ||
4291 | 22 | # command line switches | 22 | # command line switches |
4292 | @@ -386,7 +386,7 @@ | |||
4293 | 386 | else(MSVC) | 386 | else(MSVC) |
4294 | 387 | add_library(poppler SHARED ${poppler_SRCS}) | 387 | add_library(poppler SHARED ${poppler_SRCS}) |
4295 | 388 | endif(MSVC) | 388 | endif(MSVC) |
4297 | 389 | set_target_properties(poppler PROPERTIES VERSION 25.0.0 SOVERSION 25) | 389 | set_target_properties(poppler PROPERTIES VERSION 28.0.0 SOVERSION 28) |
4298 | 390 | target_link_libraries(poppler ${poppler_LIBS}) | 390 | target_link_libraries(poppler ${poppler_LIBS}) |
4299 | 391 | target_link_libraries(poppler LINK_INTERFACE_LIBRARIES "") | 391 | target_link_libraries(poppler LINK_INTERFACE_LIBRARIES "") |
4300 | 392 | install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX}) | 392 | install(TARGETS poppler RUNTIME DESTINATION bin LIBRARY DESTINATION lib${LIB_SUFFIX} ARCHIVE DESTINATION lib${LIB_SUFFIX}) |
4301 | 393 | 393 | ||
4302 | === modified file 'ChangeLog' | |||
4303 | --- ChangeLog 2012-06-07 17:13:58 +0000 | |||
4304 | +++ ChangeLog 2012-11-16 16:39:27 +0000 | |||
4305 | @@ -1,3 +1,687 @@ | |||
4306 | 1 | commit 5fd691dc58aac817bca81c87c4820afcf53989d1 | ||
4307 | 2 | Author: Albert Astals Cid <aacid@kde.org> | ||
4308 | 3 | Date: Mon Sep 10 19:29:01 2012 +0200 | ||
4309 | 4 | |||
4310 | 5 | 0.20.40.20.40.20.40.20.4 | ||
4311 | 6 | |||
4312 | 7 | CMakeLists.txt | 4 ++-- | ||
4313 | 8 | NEWS | 13 +++++++++++++ | ||
4314 | 9 | configure.ac | 2 +- | ||
4315 | 10 | cpp/Doxyfile | 2 +- | ||
4316 | 11 | poppler/Makefile.am | 2 +- | ||
4317 | 12 | qt4/src/Doxyfile | 2 +- | ||
4318 | 13 | 6 files changed, 19 insertions(+), 6 deletions(-) | ||
4319 | 14 | |||
4320 | 15 | commit b3e86dbdba82956f125e37f69176072e2d0127f2 | ||
4321 | 16 | Author: Thomas Freitag <Thomas.Freitag@kabelmail.de> | ||
4322 | 17 | Date: Sun Sep 9 23:35:45 2012 +0200 | ||
4323 | 18 | |||
4324 | 19 | Try to find another rootNum if actual rootNum doesn't point to a dict | ||
4325 | 20 | |||
4326 | 21 | Bug #14303 | ||
4327 | 22 | |||
4328 | 23 | poppler/XRef.cc | 14 ++++++++++++-- | ||
4329 | 24 | poppler/XRef.h | 4 ++-- | ||
4330 | 25 | 2 files changed, 14 insertions(+), 4 deletions(-) | ||
4331 | 26 | |||
4332 | 27 | commit 558a7d9b046bbbe185dea263b48a3cb2664378fc | ||
4333 | 28 | Author: Thomas Freitag <Thomas.Freitag@alfa.de> | ||
4334 | 29 | Date: Sun Sep 9 23:25:47 2012 +0200 | ||
4335 | 30 | |||
4336 | 31 | Fix invalid memory access in solves 1066.pdf.asan.38.75 | ||
4337 | 32 | |||
4338 | 33 | splash/SplashClip.cc | 23 +++++++++++++++++++++++ | ||
4339 | 34 | splash/SplashXPathScanner.cc | 3 +++ | ||
4340 | 35 | 2 files changed, 26 insertions(+) | ||
4341 | 36 | |||
4342 | 37 | commit d0df8e54512f584ca2b3edbae1c19e167948e5c3 | ||
4343 | 38 | Author: Thomas Freitag <Thomas.Freitag@alfa.de> | ||
4344 | 39 | Date: Sun Sep 9 23:21:38 2012 +0200 | ||
4345 | 40 | |||
4346 | 41 | Fix invalid memory access in 1106.pdf.asan.30.120.patch | ||
4347 | 42 | |||
4348 | 43 | poppler/Function.cc | 5 +++++ | ||
4349 | 44 | 1 file changed, 5 insertions(+) | ||
4350 | 45 | |||
4351 | 46 | commit 86b89864396a1dcf027e5793e6ac75411977bcf9 | ||
4352 | 47 | Author: Thomas Freitag <Thomas.Freitag@kabelmail.de> | ||
4353 | 48 | Date: Sun Sep 9 23:08:49 2012 +0200 | ||
4354 | 49 | |||
4355 | 50 | Fix crash in 1255.pdf.SIGSEGV.56f.285 | ||
4356 | 51 | |||
4357 | 52 | poppler/XRef.cc | 6 ++++++ | ||
4358 | 53 | 1 file changed, 6 insertions(+) | ||
4359 | 54 | |||
4360 | 55 | commit 96931732f343d2bbda9af9488b485da031866c3b | ||
4361 | 56 | Author: Thomas Freitag <Thomas.Freitag@alfa.de> | ||
4362 | 57 | Date: Sun Sep 9 22:47:57 2012 +0200 | ||
4363 | 58 | |||
4364 | 59 | Fix invalid memory access in 61.pdf.asan.13.95 | ||
4365 | 60 | |||
4366 | 61 | fofi/FoFiType1C.cc | 25 +++++++++++++++++-------- | ||
4367 | 62 | fofi/FoFiType1C.h | 2 ++ | ||
4368 | 63 | 2 files changed, 19 insertions(+), 8 deletions(-) | ||
4369 | 64 | |||
4370 | 65 | commit 26917d69c4da6a110db02b120133c36579fbb17c | ||
4371 | 66 | Author: Albert Astals Cid <aacid@kde.org> | ||
4372 | 67 | Date: Sun Sep 9 22:23:36 2012 +0200 | ||
4373 | 68 | |||
4374 | 69 | Add unlikely | ||
4375 | 70 | |||
4376 | 71 | poppler/Gfx.cc | 2 +- | ||
4377 | 72 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
4378 | 73 | |||
4379 | 74 | commit e6a3c797c01aa343f640f2e6f45de5bf379aa8ad | ||
4380 | 75 | Author: Thomas Freitag <Thomas.Freitag@alfa.de> | ||
4381 | 76 | Date: Sun Sep 9 22:22:59 2012 +0200 | ||
4382 | 77 | |||
4383 | 78 | Fix wrong memory access in 68.pdf.asan.7.1030 | ||
4384 | 79 | |||
4385 | 80 | poppler/Gfx.cc | 4 ++++ | ||
4386 | 81 | 1 file changed, 4 insertions(+) | ||
4387 | 82 | |||
4388 | 83 | commit 48fe18cf277cd2a4e665c74b3a594482f762f4b6 | ||
4389 | 84 | Author: Albert Astals Cid <aacid@kde.org> | ||
4390 | 85 | Date: Sun Sep 9 22:09:44 2012 +0200 | ||
4391 | 86 | |||
4392 | 87 | Fix memory leak | ||
4393 | 88 | |||
4394 | 89 | poppler/Gfx.cc | 1 + | ||
4395 | 90 | 1 file changed, 1 insertion(+) | ||
4396 | 91 | |||
4397 | 92 | commit b87aafc0cdb36c3555053f2684c45f1a9d7b2f94 | ||
4398 | 93 | Author: Albert Astals Cid <aacid@kde.org> | ||
4399 | 94 | Date: Sun Sep 9 21:42:48 2012 +0200 | ||
4400 | 95 | |||
4401 | 96 | Add unlikelys to the ifs | ||
4402 | 97 | |||
4403 | 98 | poppler/DCTStream.cc | 4 ++-- | ||
4404 | 99 | poppler/JBIG2Stream.cc | 2 +- | ||
4405 | 100 | 2 files changed, 3 insertions(+), 3 deletions(-) | ||
4406 | 101 | |||
4407 | 102 | commit a019eef2f8ca53addd7ccab7f9c47657f4e52286 | ||
4408 | 103 | Author: Thomas Freitag <Thomas.Freitag@alfa.de> | ||
4409 | 104 | Date: Sun Sep 9 21:41:09 2012 +0200 | ||
4410 | 105 | |||
4411 | 106 | Fix crash in 1162.pdf.SIGSEGV.28e.182 | ||
4412 | 107 | |||
4413 | 108 | poppler/DCTStream.cc | 4 ++++ | ||
4414 | 109 | 1 file changed, 4 insertions(+) | ||
4415 | 110 | |||
4416 | 111 | commit ad7c6ac88f2315c9ce003308d1b4988592d4434b | ||
4417 | 112 | Author: William Bader <williambader@hotmail.com> | ||
4418 | 113 | Date: Sun Sep 9 21:31:58 2012 +0200 | ||
4419 | 114 | |||
4420 | 115 | Fix crash in 1028.pdf.SIGSEGV.ae6.33 | ||
4421 | 116 | |||
4422 | 117 | poppler/JBIG2Stream.cc | 8 ++++++++ | ||
4423 | 118 | 1 file changed, 8 insertions(+) | ||
4424 | 119 | |||
4425 | 120 | commit b861af714daee4125e54b250dddf82106f5a8ce8 | ||
4426 | 121 | Author: Albert Astals Cid <aacid@kde.org> | ||
4427 | 122 | Date: Sun Sep 9 21:15:06 2012 +0200 | ||
4428 | 123 | |||
4429 | 124 | Fix memory leak | ||
4430 | 125 | |||
4431 | 126 | poppler/Form.cc | 2 +- | ||
4432 | 127 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
4433 | 128 | |||
4434 | 129 | commit a4f59113574a8d7460c6ce5000cb09d20fe52b74 | ||
4435 | 130 | Author: Albert Astals Cid <aacid@kde.org> | ||
4436 | 131 | Date: Sun Sep 9 12:49:43 2012 +0200 | ||
4437 | 132 | |||
4438 | 133 | Fix memory leak | ||
4439 | 134 | |||
4440 | 135 | poppler/Annot.cc | 3 ++- | ||
4441 | 136 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
4442 | 137 | |||
4443 | 138 | commit 28240046f8fe37ca96f9a80cb1ea3a59af9c66f3 | ||
4444 | 139 | Author: Thomas Freitag <Thomas.Freitag@alfa.de> | ||
4445 | 140 | Date: Sun Sep 9 12:48:26 2012 +0200 | ||
4446 | 141 | |||
4447 | 142 | Fix crash in 589.pdf.SIGSEGV.8b1.929 | ||
4448 | 143 | |||
4449 | 144 | poppler/Annot.cc | 8 ++++++++ | ||
4450 | 145 | 1 file changed, 8 insertions(+) | ||
4451 | 146 | |||
4452 | 147 | commit ccd3db5a7723ddb692f6dc85ed9d0f5e3dde189f | ||
4453 | 148 | Author: Albert Astals Cid <aacid@kde.org> | ||
4454 | 149 | Date: Sat Sep 8 18:10:14 2012 +0200 | ||
4455 | 150 | |||
4456 | 151 | Only complain when the malloc really failed | ||
4457 | 152 | |||
4458 | 153 | poppler/JBIG2Stream.cc | 2 +- | ||
4459 | 154 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
4460 | 155 | |||
4461 | 156 | commit 6356c0bbae47db291a3585d31c7727bc3f8d97a4 | ||
4462 | 157 | Author: Albert Astals Cid <aacid@kde.org> | ||
4463 | 158 | Date: Thu Aug 30 00:57:51 2012 +0200 | ||
4464 | 159 | |||
4465 | 160 | qt4: unbreak spacing | ||
4466 | 161 | |||
4467 | 162 | qt4/src/poppler-embeddedfile.cc | 6 +++--- | ||
4468 | 163 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
4469 | 164 | |||
4470 | 165 | commit 46948868dee6d4e68b658c68d7df482590e34da3 | ||
4471 | 166 | Author: Albert Astals Cid <aacid@kde.org> | ||
4472 | 167 | Date: Thu Aug 30 00:43:45 2012 +0200 | ||
4473 | 168 | |||
4474 | 169 | Accept FileSpec as Dict too and not only as Ref | ||
4475 | 170 | |||
4476 | 171 | File to try in KDE bug #306008 | ||
4477 | 172 | |||
4478 | 173 | poppler/Catalog.cc | 4 +++- | ||
4479 | 174 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
4480 | 175 | |||
4481 | 176 | commit debc8fb497bc22c0f9f34d785852981a87475c30 | ||
4482 | 177 | Author: Albert Astals Cid <aacid@kde.org> | ||
4483 | 178 | Date: Thu Aug 30 00:35:40 2012 +0200 | ||
4484 | 179 | |||
4485 | 180 | Take into account the embFile returned by the core may be NULL | ||
4486 | 181 | |||
4487 | 182 | qt4/src/poppler-embeddedfile-private.h | 4 +++- | ||
4488 | 183 | qt4/src/poppler-embeddedfile.cc | 19 ++++++++++++------- | ||
4489 | 184 | 2 files changed, 15 insertions(+), 8 deletions(-) | ||
4490 | 185 | |||
4491 | 186 | commit 3ca67a59fc15782abb1e479eb2b8916de5b1b6ed | ||
4492 | 187 | Author: Albert Astals Cid <aacid@kde.org> | ||
4493 | 188 | Date: Thu Aug 30 00:34:06 2012 +0200 | ||
4494 | 189 | |||
4495 | 190 | Return NULL EmbFile if the FileSpec is not ok | ||
4496 | 191 | |||
4497 | 192 | Otherwise we might end up asserting | ||
4498 | 193 | |||
4499 | 194 | poppler/FileSpec.cc | 4 ++++ | ||
4500 | 195 | 1 file changed, 4 insertions(+) | ||
4501 | 196 | |||
4502 | 197 | commit 686ec0cc92e25f74eaa9e09a328724cbdf939bca | ||
4503 | 198 | Author: Albert Astals Cid <aacid@kde.org> | ||
4504 | 199 | Date: Wed Aug 15 20:02:05 2012 +0200 | ||
4505 | 200 | |||
4506 | 201 | Remove declared but not implemented function | ||
4507 | 202 | |||
4508 | 203 | poppler/XRef.h | 1 - | ||
4509 | 204 | 1 file changed, 1 deletion(-) | ||
4510 | 205 | |||
4511 | 206 | commit e83568065f77ba722b147b3b10faed1ff66f22dc | ||
4512 | 207 | Author: Pino Toscano <pino@kde.org> | ||
4513 | 208 | Date: Sat Aug 11 01:38:08 2012 +0200 | ||
4514 | 209 | |||
4515 | 210 | remove extra execution permissions | ||
4516 | 211 | |||
4517 | 212 | (cherry picked from commit 9a5a19ee2f9cd536c3527b30c0256ca9dce3638c) | ||
4518 | 213 | |||
4519 | 214 | 0 files changed | ||
4520 | 215 | |||
4521 | 216 | commit 1b2903c104012fdd3c982d57898910945dff9a15 | ||
4522 | 217 | Author: Albert Astals Cid <aacid@kde.org> | ||
4523 | 218 | Date: Sat Aug 11 00:05:10 2012 +0200 | ||
4524 | 219 | |||
4525 | 220 | 0.20.3 | ||
4526 | 221 | |||
4527 | 222 | CMakeLists.txt | 4 ++-- | ||
4528 | 223 | NEWS | 16 ++++++++++++++++ | ||
4529 | 224 | configure.ac | 2 +- | ||
4530 | 225 | cpp/Doxyfile | 2 +- | ||
4531 | 226 | poppler/Makefile.am | 2 +- | ||
4532 | 227 | qt4/src/Doxyfile | 2 +- | ||
4533 | 228 | 6 files changed, 22 insertions(+), 6 deletions(-) | ||
4534 | 229 | |||
4535 | 230 | commit 40e7b744d32152ab4c6201b8bda7fb7caf6bfd4e | ||
4536 | 231 | Author: Albert Astals Cid <aacid@kde.org> | ||
4537 | 232 | Date: Sun Aug 5 15:07:16 2012 +0200 | ||
4538 | 233 | |||
4539 | 234 | If NULL, NULL fails as password try EMPTY, EMPTY before failing | ||
4540 | 235 | |||
4541 | 236 | Reviewed by Jose Aliste | ||
4542 | 237 | Bug #3498 | ||
4543 | 238 | |||
4544 | 239 | poppler/SecurityHandler.cc | 7 ++++++- | ||
4545 | 240 | 1 file changed, 6 insertions(+), 1 deletion(-) | ||
4546 | 241 | |||
4547 | 242 | commit 3ca2bc0d3abdf92741b7921ea402c9de09e531f6 | ||
4548 | 243 | Author: Markus Trippelsdorf <markus@trippelsdorf.de> | ||
4549 | 244 | Date: Fri Aug 3 00:48:12 2012 +0200 | ||
4550 | 245 | |||
4551 | 246 | Fix segfault when scaleImage returns NULL | ||
4552 | 247 | |||
4553 | 248 | Bug 52488 | ||
4554 | 249 | |||
4555 | 250 | splash/Splash.cc | 7 +++++++ | ||
4556 | 251 | 1 file changed, 7 insertions(+) | ||
4557 | 252 | |||
4558 | 253 | commit 768cf5877f48f8cee80fe96e2ee52f42f230dfdf | ||
4559 | 254 | Author: Thomas Freitag <Thomas.Freitag@alfa.de> | ||
4560 | 255 | Date: Thu Aug 2 00:22:19 2012 +0200 | ||
4561 | 256 | |||
4562 | 257 | PSOutputDev: Fix Bitmaps in level2sep or level3sep | ||
4563 | 258 | |||
4564 | 259 | Bug #52384 | ||
4565 | 260 | |||
4566 | 261 | poppler/PSOutputDev.cc | 4 ++-- | ||
4567 | 262 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
4568 | 263 | |||
4569 | 264 | commit 315447843a368556a8536bc30e579c9bf338682e | ||
4570 | 265 | Author: Thomas Freitag <Thomas.Freitag@alfa.de> | ||
4571 | 266 | Date: Wed Aug 1 22:56:49 2012 +0200 | ||
4572 | 267 | |||
4573 | 268 | Splash: Blend mode enhancements for CMYK | ||
4574 | 269 | |||
4575 | 270 | poppler/SplashOutputDev.cc | 76 | ||
4576 | 271 | +++++++++++++++++++++++++++++++------------- | ||
4577 | 272 | splash/Splash.cc | 22 ------------- | ||
4578 | 273 | 2 files changed, 54 insertions(+), 44 deletions(-) | ||
4579 | 274 | |||
4580 | 275 | commit c0c88b3707fc7337e814ae4252d80002641a19ee | ||
4581 | 276 | Author: Albert Astals Cid <aacid@kde.org> | ||
4582 | 277 | Date: Tue Jul 31 23:32:19 2012 +0200 | ||
4583 | 278 | |||
4584 | 279 | Replace c++ style includes with c style ones | ||
4585 | 280 | |||
4586 | 281 | Fixes build in Solaris 10 | ||
4587 | 282 | Bug #52426 | ||
4588 | 283 | |||
4589 | 284 | goo/gstrtod.cc | 10 +++++----- | ||
4590 | 285 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
4591 | 286 | |||
4592 | 287 | commit dcbc923bd3592a81876f84005fbaddcea18641cc | ||
4593 | 288 | Author: Thomas Freitag <Thomas.Freitag@alfa.de> | ||
4594 | 289 | Date: Sun Jul 22 18:40:46 2012 +0200 | ||
4595 | 290 | |||
4596 | 291 | Make sure xScale and yScale are always initialized | ||
4597 | 292 | |||
4598 | 293 | Bug #52215 | ||
4599 | 294 | |||
4600 | 295 | poppler/PSOutputDev.cc | 5 +---- | ||
4601 | 296 | 1 file changed, 1 insertion(+), 4 deletions(-) | ||
4602 | 297 | |||
4603 | 298 | commit ef7c2418e12d3e6a79f1d89a0051b005fadbc344 | ||
4604 | 299 | Author: Thomas Freitag <Thomas.Freitag@alfa.de> | ||
4605 | 300 | Date: Sat Jul 21 00:01:49 2012 +0200 | ||
4606 | 301 | |||
4607 | 302 | Fix conversion to ps when having multiple strips | ||
4608 | 303 | |||
4609 | 304 | Bug 51982 | ||
4610 | 305 | |||
4611 | 306 | poppler/PSOutputDev.cc | 4 +++- | ||
4612 | 307 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
4613 | 308 | |||
4614 | 309 | commit 349b21acc249c130fb053bc4a0c75019f75bd35b | ||
4615 | 310 | Author: Torsten Kasch <tk@CeBiTec.Uni-Bielefeld.DE> | ||
4616 | 311 | Date: Thu Jul 19 00:18:14 2012 +0200 | ||
4617 | 312 | |||
4618 | 313 | Unify poppler-config.h includes in core "installed" headers | ||
4619 | 314 | |||
4620 | 315 | Bug 52193 | ||
4621 | 316 | |||
4622 | 317 | goo/FixedPoint.h | 2 +- | ||
4623 | 318 | goo/GooTimer.h | 2 +- | ||
4624 | 319 | goo/JpegWriter.h | 2 +- | ||
4625 | 320 | goo/PNGWriter.h | 2 +- | ||
4626 | 321 | goo/TiffWriter.h | 2 +- | ||
4627 | 322 | goo/gfile.h | 2 +- | ||
4628 | 323 | goo/gmem.h | 2 +- | ||
4629 | 324 | splash/SplashFTFont.h | 2 +- | ||
4630 | 325 | splash/SplashMath.h | 2 +- | ||
4631 | 326 | 9 files changed, 9 insertions(+), 9 deletions(-) | ||
4632 | 327 | |||
4633 | 328 | commit 15c6ae699f083ea6c9716c1098ae9833a56eeb3e | ||
4634 | 329 | Author: Torsten Kasch <tk@CeBiTec.Uni-Bielefeld.DE> | ||
4635 | 330 | Date: Thu Jul 19 00:06:45 2012 +0200 | ||
4636 | 331 | |||
4637 | 332 | autoconf: Do not assume the shell is bash compatible | ||
4638 | 333 | |||
4639 | 334 | Bug 52197 | ||
4640 | 335 | |||
4641 | 336 | configure.ac | 2 +- | ||
4642 | 337 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
4643 | 338 | |||
4644 | 339 | commit f5311da76ec7cd7c1e6cdfc4e18df6dd56e8398b | ||
4645 | 340 | Author: Albert Astals Cid <aacid@kde.org> | ||
4646 | 341 | Date: Thu Jul 19 00:01:49 2012 +0200 | ||
4647 | 342 | |||
4648 | 343 | pdfseparate: Return 0 on success | ||
4649 | 344 | |||
4650 | 345 | utils/pdfseparate.cc | 6 +++++- | ||
4651 | 346 | 1 file changed, 5 insertions(+), 1 deletion(-) | ||
4652 | 347 | |||
4653 | 348 | commit 51f22ca0badfc41c19cba66cabd63184244f81c7 | ||
4654 | 349 | Author: Thomas Freitag <Thomas.Freitag@alfa.de> | ||
4655 | 350 | Date: Mon Jul 16 23:32:23 2012 +0200 | ||
4656 | 351 | |||
4657 | 352 | PSOutputDev: Fix DeviceN images with alternate Lab colorspace in | ||
4658 | 353 | level 3 PostScript | ||
4659 | 354 | |||
4660 | 355 | Bug #51822 | ||
4661 | 356 | |||
4662 | 357 | poppler/PSOutputDev.cc | 54 | ||
4663 | 358 | +++++++++++++++++++++++++++++++++++++++++------- | ||
4664 | 359 | poppler/PSOutputDev.h | 2 +- | ||
4665 | 360 | 2 files changed, 48 insertions(+), 8 deletions(-) | ||
4666 | 361 | |||
4667 | 362 | commit 950d5f3dec4bff5d3c523d55689d7b70215dc110 | ||
4668 | 363 | Author: Thomas Freitag <Thomas.Freitag@alfa.de> | ||
4669 | 364 | Date: Fri Jul 13 00:56:48 2012 +0200 | ||
4670 | 365 | |||
4671 | 366 | Fix Splash::arbitraryTransformImage causes bogus memory allocation | ||
4672 | 367 | size | ||
4673 | 368 | |||
4674 | 369 | Bug #49523 | ||
4675 | 370 | |||
4676 | 371 | poppler/SplashOutputDev.cc | 2 +- | ||
4677 | 372 | splash/Splash.cc | 79 | ||
4678 | 373 | +++++++++++++++++++++++++------------------- | ||
4679 | 374 | splash/Splash.h | 4 +-- | ||
4680 | 375 | 3 files changed, 48 insertions(+), 37 deletions(-) | ||
4681 | 376 | |||
4682 | 377 | commit e09be3bc6ba1290fd31bde0c3d19c4ffcbadbf00 | ||
4683 | 378 | Author: Albert Astals Cid <aacid@kde.org> | ||
4684 | 379 | Date: Tue Jul 10 23:06:53 2012 +0200 | ||
4685 | 380 | |||
4686 | 381 | 0.20.2 | ||
4687 | 382 | |||
4688 | 383 | CMakeLists.txt | 2 +- | ||
4689 | 384 | NEWS | 11 +++++++++++ | ||
4690 | 385 | configure.ac | 2 +- | ||
4691 | 386 | cpp/Doxyfile | 2 +- | ||
4692 | 387 | qt4/src/Doxyfile | 2 +- | ||
4693 | 388 | 5 files changed, 15 insertions(+), 4 deletions(-) | ||
4694 | 389 | |||
4695 | 390 | commit e15fe0e1e6accf779caeb1179a8d62161c0aa650 | ||
4696 | 391 | Author: Thomas Freitag <Thomas.Freitag@alfa.de> | ||
4697 | 392 | Date: Thu Jul 5 17:44:02 2012 +0200 | ||
4698 | 393 | |||
4699 | 394 | Fix handling of DeviceN images in level 3 PostScript | ||
4700 | 395 | |||
4701 | 396 | bug #51548 | ||
4702 | 397 | |||
4703 | 398 | poppler/PSOutputDev.cc | 14 -------------- | ||
4704 | 399 | 1 file changed, 14 deletions(-) | ||
4705 | 400 | |||
4706 | 401 | commit 02c4e6bf4cc0f5535946fe31815081a40b1de986 | ||
4707 | 402 | Author: Albert Astals Cid <aacid@kde.org> | ||
4708 | 403 | Date: Fri Jun 29 01:56:55 2012 +0200 | ||
4709 | 404 | |||
4710 | 405 | PSOutputDev: Correct %%DocumentCustomColors | ||
4711 | 406 | |||
4712 | 407 | Bug 51479 | ||
4713 | 408 | |||
4714 | 409 | poppler/PSOutputDev.cc | 20 ++++++++++++++++++++ | ||
4715 | 410 | 1 file changed, 20 insertions(+) | ||
4716 | 411 | |||
4717 | 412 | commit f7990386d268a444c297958e9c50ed27a0825a00 | ||
4718 | 413 | Author: Albert Astals Cid <aacid@kde.org> | ||
4719 | 414 | Date: Thu Jun 28 00:18:07 2012 +0200 | ||
4720 | 415 | |||
4721 | 416 | Add some security checks to JPXStream decoding | ||
4722 | 417 | |||
4723 | 418 | Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk | ||
4724 | 419 | and Gynvael Coldwind | ||
4725 | 420 | |||
4726 | 421 | poppler/JPXStream.cc | 14 ++++++++++++-- | ||
4727 | 422 | 1 file changed, 12 insertions(+), 2 deletions(-) | ||
4728 | 423 | |||
4729 | 424 | commit c5c6eed1623506e1206e89cee0b7c887d815ba62 | ||
4730 | 425 | Author: Albert Astals Cid <aacid@kde.org> | ||
4731 | 426 | Date: Sun Jun 24 23:43:03 2012 +0200 | ||
4732 | 427 | |||
4733 | 428 | Change SplashBitmap gmallocn to gmallocn_checkoverflow | ||
4734 | 429 | |||
4735 | 430 | Fixes abort in KDE bug #302372 | ||
4736 | 431 | |||
4737 | 432 | splash/Splash.cc | 37 +++++++++++++++++++++++-------------- | ||
4738 | 433 | splash/SplashBitmap.cc | 18 +++++++++++------- | ||
4739 | 434 | 2 files changed, 34 insertions(+), 21 deletions(-) | ||
4740 | 435 | |||
4741 | 436 | commit c87738ee234aafc6eda5a263ad789205037020e1 | ||
4742 | 437 | Author: Thomas Freitag <Thomas.Freitag@alfa.de> | ||
4743 | 438 | Date: Sun Jun 24 20:20:38 2012 +0200 | ||
4744 | 439 | |||
4745 | 440 | copy resources content defined in the pages dict | ||
4746 | 441 | |||
4747 | 442 | Fixes bug #51369 | ||
4748 | 443 | |||
4749 | 444 | poppler/PDFDoc.cc | 16 ++++++++++++++-- | ||
4750 | 445 | 1 file changed, 14 insertions(+), 2 deletions(-) | ||
4751 | 446 | |||
4752 | 447 | commit 6cdf879e389f05abba30b3fad8083b7fff23056e | ||
4753 | 448 | Author: Fabio D'Urso <fabiodurso@hotmail.it> | ||
4754 | 449 | Date: Sun Jun 24 11:48:04 2012 +0200 | ||
4755 | 450 | |||
4756 | 451 | qt4: Do not hang on malformed /Annots objects | ||
4757 | 452 | |||
4758 | 453 | Don't recurse infinitely if the /Annots object contains annotation | ||
4759 | 454 | dictionaries (according to specs, /Annots must contain *references* | ||
4760 | 455 | to annotation dictionaries). | ||
4761 | 456 | |||
4762 | 457 | Fixes bug #51361 | ||
4763 | 458 | |||
4764 | 459 | qt4/src/poppler-annotation.cc | 5 +++++ | ||
4765 | 460 | 1 file changed, 5 insertions(+) | ||
4766 | 461 | |||
4767 | 462 | commit 3575becd60585324bcefc0631b1bac47c1db3c5c | ||
4768 | 463 | Author: Mark Brand <mabrand@mabrand.nl> | ||
4769 | 464 | Date: Thu Jun 14 20:31:26 2012 +0200 | ||
4770 | 465 | |||
4771 | 466 | fix typo to compile in Windows | ||
4772 | 467 | |||
4773 | 468 | poppler/GlobalParamsWin.cc | 3 ++- | ||
4774 | 469 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
4775 | 470 | |||
4776 | 471 | commit 06618065c8a97a5bec125560546b98edfc1210f3 | ||
4777 | 472 | Author: Albert Astals Cid <aacid@kde.org> | ||
4778 | 473 | Date: Mon Jun 11 15:17:59 2012 +0200 | ||
4779 | 474 | |||
4780 | 475 | Add some security checks to JBIG2Stream decoding | ||
4781 | 476 | |||
4782 | 477 | Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk | ||
4783 | 478 | and Gynvael Coldwind | ||
4784 | 479 | |||
4785 | 480 | poppler/JBIG2Stream.cc | 58 | ||
4786 | 481 | ++++++++++++++++++++++++++++++++++++------------ | ||
4787 | 482 | 1 file changed, 44 insertions(+), 14 deletions(-) | ||
4788 | 483 | |||
4789 | 484 | commit e3fe88df3646a80945210ba426eb4681a98b55e9 | ||
4790 | 485 | Author: Hib Eris <hib@hiberis.nl> | ||
4791 | 486 | Date: Sun Jun 10 19:44:18 2012 +0200 | ||
4792 | 487 | |||
4793 | 488 | Check value of first page in linearization table | ||
4794 | 489 | |||
4795 | 490 | Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk | ||
4796 | 491 | and Gynvael Coldwind | ||
4797 | 492 | |||
4798 | 493 | poppler/Linearization.cc | 4 ++-- | ||
4799 | 494 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
4800 | 495 | |||
4801 | 496 | commit 1240eee8c0d0d01113443e0fda87721775a76da9 | ||
4802 | 497 | Author: Albert Astals Cid <aacid@kde.org> | ||
4803 | 498 | Date: Sun Jun 10 20:42:55 2012 +0200 | ||
4804 | 499 | |||
4805 | 500 | 0.20.1 | ||
4806 | 501 | |||
4807 | 502 | CMakeLists.txt | 4 ++-- | ||
4808 | 503 | NEWS | 25 +++++++++++++++++++++++++ | ||
4809 | 504 | configure.ac | 2 +- | ||
4810 | 505 | cpp/Doxyfile | 2 +- | ||
4811 | 506 | poppler/Makefile.am | 2 +- | ||
4812 | 507 | qt4/src/Doxyfile | 2 +- | ||
4813 | 508 | 6 files changed, 31 insertions(+), 6 deletions(-) | ||
4814 | 509 | |||
4815 | 510 | commit c783037619e2b4c101e8ecd7e61c94ee077b4be2 | ||
4816 | 511 | Author: Albert Astals Cid <aacid@kde.org> | ||
4817 | 512 | Date: Sun Jun 10 20:15:01 2012 +0200 | ||
4818 | 513 | |||
4819 | 514 | Update copyrights | ||
4820 | 515 | |||
4821 | 516 | poppler/GlobalParamsWin.cc | 1 + | ||
4822 | 517 | 1 file changed, 1 insertion(+) | ||
4823 | 518 | |||
4824 | 519 | commit f3f9d8f28a97338da92c842d5668b0ef3495ef13 | ||
4825 | 520 | Author: Albert Astals Cid <aacid@kde.org> | ||
4826 | 521 | Date: Sun Jun 10 19:09:17 2012 +0200 | ||
4827 | 522 | |||
4828 | 523 | Do use NULL function | ||
4829 | 524 | |||
4830 | 525 | Fixes crash in broken/fuzzed pdf sent by Mateusz "j00ru" Jurczyk | ||
4831 | 526 | and Gynvael Coldwind | ||
4832 | 527 | |||
4833 | 528 | poppler/Gfx.cc | 5 +++-- | ||
4834 | 529 | 1 file changed, 3 insertions(+), 2 deletions(-) | ||
4835 | 530 | |||
4836 | 531 | commit 92ef16e3699da949c80716c3fd4b438fe79c134d | ||
4837 | 532 | Author: Thomas Freitag <Thomas.Freitag@alfa.de> | ||
4838 | 533 | Date: Sun Jun 10 16:58:54 2012 +0200 | ||
4839 | 534 | |||
4840 | 535 | use setoverprintmode only if rip knows it | ||
4841 | 536 | |||
4842 | 537 | poppler/PSOutputDev.cc | 6 +++--- | ||
4843 | 538 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
4844 | 539 | |||
4845 | 540 | commit 99aa734ae2d3ba51f840d4c8ef450488fb702a31 | ||
4846 | 541 | Author: Fabio D'Urso <fabiodurso@hotmail.it> | ||
4847 | 542 | Date: Thu May 24 23:17:27 2012 +0200 | ||
4848 | 543 | |||
4849 | 544 | qt4: Keep page rotation into account when normalizing annotation | ||
4850 | 545 | coords | ||
4851 | 546 | |||
4852 | 547 | If the page is rotated by 90 or 270 degrees, width and height need | ||
4853 | 548 | to be swapped | ||
4854 | 549 | |||
4855 | 550 | qt4/src/poppler-annotation.cc | 16 ++++++++++++++-- | ||
4856 | 551 | 1 file changed, 14 insertions(+), 2 deletions(-) | ||
4857 | 552 | |||
4858 | 553 | commit bde31ce7b223abc86d25e06f3d73668b792c70df | ||
4859 | 554 | Author: Fabio D'Urso <fabiodurso@hotmail.it> | ||
4860 | 555 | Date: Sat Jun 9 01:31:29 2012 +0200 | ||
4861 | 556 | |||
4862 | 557 | Fix saving to xml | ||
4863 | 558 | |||
4864 | 559 | The default icon is Note not comment | ||
4865 | 560 | |||
4866 | 561 | qt4/src/poppler-annotation.cc | 2 +- | ||
4867 | 562 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
4868 | 563 | |||
4869 | 564 | commit 9904b8f10abf068a7816bd90976ccbb320387645 | ||
4870 | 565 | Author: Adrian Johnson <ajohnson@redneon.com> | ||
4871 | 566 | Date: Thu May 24 18:24:48 2012 +0930 | ||
4872 | 567 | |||
4873 | 568 | glib docs: fix typo | ||
4874 | 569 | |||
4875 | 570 | glib/poppler-document.cc | 4 ++-- | ||
4876 | 571 | 1 file changed, 2 insertions(+), 2 deletions(-) | ||
4877 | 572 | |||
4878 | 573 | commit 028f580056f99719cfb8af7bbe8184ceac02cb16 | ||
4879 | 574 | Author: Adrian Johnson <ajohnson@redneon.com> | ||
4880 | 575 | Date: Sun May 13 21:36:36 2012 +0930 | ||
4881 | 576 | |||
4882 | 577 | add sustitute font name to GlobalParamsWin32 to fix compilation | ||
4883 | 578 | |||
4884 | 579 | poppler/GlobalParamsWin.cc | 5 ++++- | ||
4885 | 580 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
4886 | 581 | |||
4887 | 582 | commit 1916d000a86336213ffd6e9bd44ce873e8955895 | ||
4888 | 583 | Author: Adrian Johnson <ajohnson@redneon.com> | ||
4889 | 584 | Date: Sat May 12 16:31:38 2012 +0930 | ||
4890 | 585 | |||
4891 | 586 | Include substitute font name in system font cache | ||
4892 | 587 | |||
4893 | 588 | Bug 49826 | ||
4894 | 589 | |||
4895 | 590 | poppler/FontInfo.cc | 1 + | ||
4896 | 591 | poppler/GlobalParams.cc | 58 | ||
4897 | 592 | ++++++++++++++++++++++++++--------------------- | ||
4898 | 593 | 2 files changed, 33 insertions(+), 26 deletions(-) | ||
4899 | 594 | |||
4900 | 595 | commit 1c6e84555572a6bf3a2e3fbe9a54b40f11c122ad | ||
4901 | 596 | Author: Fabio D'Urso <fabiodurso@hotmail.it> | ||
4902 | 597 | Date: Fri May 18 16:22:46 2012 +0200 | ||
4903 | 598 | |||
4904 | 599 | qt4: Make TextAnnotation ctor public | ||
4905 | 600 | |||
4906 | 601 | qt4/src/poppler-annotation.h | 2 +- | ||
4907 | 602 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
4908 | 603 | |||
4909 | 604 | commit 8e504bf2543621973fdaddbd29055ce435540146 | ||
4910 | 605 | Author: Ville Skyttä <ville.skytta@iki.fi> | ||
4911 | 606 | Date: Wed May 16 23:49:01 2012 +0300 | ||
4912 | 607 | |||
4913 | 608 | pdfseparate.1: Syntax fixes. | ||
4914 | 609 | |||
4915 | 610 | utils/pdfseparate.1 | 6 +++--- | ||
4916 | 611 | 1 file changed, 3 insertions(+), 3 deletions(-) | ||
4917 | 612 | |||
4918 | 613 | commit 9f7d919e68a26bb7dd809986d8394fe20b750bd0 | ||
4919 | 614 | Author: Anthony Wesley <awesley@smartnetworks.com.au> | ||
4920 | 615 | Date: Thu May 17 19:54:47 2012 +0200 | ||
4921 | 616 | |||
4922 | 617 | Fix logic on SplashBitmap::writeImgFile | ||
4923 | 618 | |||
4924 | 619 | splash/SplashBitmap.cc | 3 ++- | ||
4925 | 620 | 1 file changed, 2 insertions(+), 1 deletion(-) | ||
4926 | 621 | |||
4927 | 622 | commit 7e7997e12faccf4c0513811b324a2fd0fa960a96 | ||
4928 | 623 | Author: Igor Slepchin <igor.slepchin@gmail.com> | ||
4929 | 624 | Date: Tue May 15 23:16:27 2012 +0200 | ||
4930 | 625 | |||
4931 | 626 | Determine if font is bold or italic based on FontDescriptor. | ||
4932 | 627 | |||
4933 | 628 | Bug #49758 | ||
4934 | 629 | |||
4935 | 630 | utils/HtmlFonts.cc | 24 ++++++++++++++++++------ | ||
4936 | 631 | utils/HtmlFonts.h | 3 ++- | ||
4937 | 632 | utils/HtmlOutputDev.cc | 4 +--- | ||
4938 | 633 | 3 files changed, 21 insertions(+), 10 deletions(-) | ||
4939 | 634 | |||
4940 | 635 | commit 329bb1e2b4f4b58832847bcf805d19ac0fd5ef02 | ||
4941 | 636 | Author: Carlos Garcia Campos <carlosgc@gnome.org> | ||
4942 | 637 | Date: Sun May 13 19:45:55 2012 +0200 | ||
4943 | 638 | |||
4944 | 639 | glib: Make sure password is always converted to latin1 | ||
4945 | 640 | |||
4946 | 641 | Remove the utf8 validation since glib API is supposed to always | ||
4947 | 642 | receive | ||
4948 | 643 | utf8 strings. | ||
4949 | 644 | |||
4950 | 645 | glib/poppler-document.cc | 38 +++++++++++++++++++------------------- | ||
4951 | 646 | 1 file changed, 19 insertions(+), 19 deletions(-) | ||
4952 | 647 | |||
4953 | 648 | commit 7714b4e319c48ee915061a172208245ae7c4141b | ||
4954 | 649 | Author: Carlos Garcia Campos <carlosgc@gnome.org> | ||
4955 | 650 | Date: Sun May 13 19:30:17 2012 +0200 | ||
4956 | 651 | |||
4957 | 652 | glib: Fix memory leak when document fails to load | ||
4958 | 653 | |||
4959 | 654 | glib/poppler-document.cc | 3 +-- | ||
4960 | 655 | 1 file changed, 1 insertion(+), 2 deletions(-) | ||
4961 | 656 | |||
4962 | 657 | commit 13d2aa303eb1fd900f1045efec14af8002477b02 | ||
4963 | 658 | Author: Thomas Freitag <Thomas.Freitag@alfa.de> | ||
4964 | 659 | Date: Sun May 13 17:25:15 2012 +0200 | ||
4965 | 660 | |||
4966 | 661 | remove unnecesary transparency group handling in splash | ||
4967 | 662 | |||
4968 | 663 | Bug #13487 | ||
4969 | 664 | |||
4970 | 665 | poppler/Gfx.cc | 64 | ||
4971 | 666 | +++++++++++++++++++++++++++++++++++++++++++- | ||
4972 | 667 | poppler/Gfx.h | 4 ++- | ||
4973 | 668 | poppler/GfxState.cc | 4 ++- | ||
4974 | 669 | poppler/OutputDev.h | 1 + | ||
4975 | 670 | poppler/SplashOutputDev.cc | 11 ++++++++ | ||
4976 | 671 | poppler/SplashOutputDev.h | 1 + | ||
4977 | 672 | 6 files changed, 82 insertions(+), 3 deletions(-) | ||
4978 | 673 | |||
4979 | 674 | commit a76867003a7bff5ab03016156c75b4c928788d50 | ||
4980 | 675 | Author: Albert Astals Cid <aacid@kde.org> | ||
4981 | 676 | Date: Sun May 13 13:10:40 2012 +0200 | ||
4982 | 677 | |||
4983 | 678 | Distribute cmake/modules/FindLCMS2.cmake | ||
4984 | 679 | |||
4985 | 680 | Bug #49818 | ||
4986 | 681 | |||
4987 | 682 | Makefile.am | 1 + | ||
4988 | 683 | 1 file changed, 1 insertion(+) | ||
4989 | 684 | |||
4990 | 1 | commit 4114c928fa2560937e02319f57937f1c267a9817 | 685 | commit 4114c928fa2560937e02319f57937f1c267a9817 |
4991 | 2 | Author: Albert Astals Cid <aacid@kde.org> | 686 | Author: Albert Astals Cid <aacid@kde.org> |
4992 | 3 | Date: Thu May 10 21:09:14 2012 +0200 | 687 | Date: Thu May 10 21:09:14 2012 +0200 |
4993 | 4 | 688 | ||
4994 | === modified file 'Makefile.am' | |||
4995 | --- Makefile.am 2012-06-07 17:13:58 +0000 | |||
4996 | +++ Makefile.am 2012-11-16 16:39:27 +0000 | |||
4997 | @@ -76,6 +76,7 @@ | |||
4998 | 76 | cmake/modules/FindGTK.cmake \ | 76 | cmake/modules/FindGTK.cmake \ |
4999 | 77 | cmake/modules/FindIconv.cmake \ | 77 | cmake/modules/FindIconv.cmake \ |
5000 | 78 | cmake/modules/FindLCMS.cmake \ | 78 | cmake/modules/FindLCMS.cmake \ |
The diff has been truncated for viewing.
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)