~matttbe/ubuntu/raring/poppler/lp1072129

« back to all changes in this revision

Viewing changes to poppler/CairoOutputDev.h

  • Committer: Package Import Robot
  • Author(s): Sebastien Bacher
  • Date: 2011-12-05 17:23:02 UTC
  • mfrom: (1.7.1)
  • Revision ID: package-import@ubuntu.com-20111205172302-tmhrk7s9hikjsa79
Tags: 0.18.2-0ubuntu1
* New upstream version, bugs fixed in the new version (lp: #869850):
  - lines and graphics wrongly rendered (lp: #603929) (lp: #780169)
  - rendering issues on some documents (lp: #784154)
  - some pages are displayed blank (lp: #817626)
* debian/control, debian/rules:
  - updated for the libpoppler and libpoppler-glib soname changes
* drop patches included in the new version
* debian/libpoppler-glib-dev.install:
  - drop deprecated test-poppler-glib
* debian/rules: 
  - drop deprecated qt3 and abiword configure options

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
// Copyright (C) 2005-2008 Jeff Muizelaar <jeff@infidigm.net>
18
18
// Copyright (C) 2005, 2006 Kristian Høgsberg <krh@redhat.com>
19
19
// Copyright (C) 2005 Nickolay V. Shmyrev <nshmyrev@yandex.ru>
20
 
// Copyright (C) 2006-2010 Carlos Garcia Campos <carlosgc@gnome.org>
 
20
// Copyright (C) 2006-2011 Carlos Garcia Campos <carlosgc@gnome.org>
21
21
// Copyright (C) 2008, 2009, 2011 Adrian Johnson <ajohnson@redneon.com>
22
22
// Copyright (C) 2008 Michael Vrable <mvrable@cs.ucsd.edu>
23
 
// Copyright (C) 2010 Thomas Freitag <Thomas.Freitag@alfa.de>
 
23
// Copyright (C) 2010, 2011 Thomas Freitag <Thomas.Freitag@alfa.de>
24
24
//
25
25
// To see a description of the changes please see the Changelog file that
26
26
// came with your tarball or type make ChangeLog if you are building from git
107
107
  // Does this device use functionShadedFill(), axialShadedFill(), and
108
108
  // radialShadedFill()?  If this returns false, these shaded fills
109
109
  // will be reduced to a series of other drawing operations.
 
110
#if CAIRO_VERSION == CAIRO_VERSION_ENCODE(1, 11, 2)
 
111
  virtual GBool useShadedFills(int type) { return type <= 7; }
 
112
#else
110
113
  virtual GBool useShadedFills(int type) { return type < 4; }
 
114
#endif
111
115
 
112
116
  // Does this device use FillColorStop()?
113
117
  virtual GBool useFillColorStop() { return gTrue; }
124
128
  // End a page.
125
129
  virtual void endPage();
126
130
 
127
 
  //----- link borders
128
 
  virtual void drawLink(Link *link, Catalog *catalog);
129
 
 
130
131
  //----- save/restore graphics state
131
132
  virtual void saveState(GfxState *state);
132
133
  virtual void restoreState(GfxState *state);
157
158
  virtual void fill(GfxState *state);
158
159
  virtual void eoFill(GfxState *state);
159
160
  virtual void clipToStrokePath(GfxState *state);
160
 
  virtual GBool tilingPatternFill(GfxState *state, Object *str,
161
 
                                  int paintType, int tilingType, Dict *resDict,
 
161
  virtual GBool tilingPatternFill(GfxState *state, Catalog *cat, Object *str,
 
162
                                  double *pmat, int paintType, int tilingType, Dict *resDict,
162
163
                                  double *mat, double *bbox,
163
164
                                  int x0, int y0, int x1, int y1,
164
165
                                  double xStep, double yStep);
166
167
  virtual GBool axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading);
167
168
  virtual GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax);
168
169
  virtual GBool radialShadedSupportExtend(GfxState *state, GfxRadialShading *shading);
 
170
#if CAIRO_VERSION == CAIRO_VERSION_ENCODE(1, 11, 2)
 
171
  virtual GBool gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading);
 
172
  virtual GBool patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading);
 
173
#endif
169
174
 
170
175
  //----- path clipping
171
176
  virtual void clip(GfxState *state);
275
280
  cairo_filter_t getFilterForSurface(cairo_surface_t *image,
276
281
                                     GBool interpolate);
277
282
  GBool getStreamData (Stream *str, char **buffer, int *length);
278
 
  void setMimeData(Stream *str, cairo_surface_t *image);
279
 
  
 
283
  void setMimeData(Stream *str, Object *ref, cairo_surface_t *image);
 
284
  void fillToStrokePathClip();
 
285
  void alignStrokeCoords(double *x, double *y);
 
286
 
280
287
  GfxRGB fill_color, stroke_color;
281
288
  cairo_pattern_t *fill_pattern, *stroke_pattern;
282
289
  double fill_opacity;
283
290
  double stroke_opacity;
 
291
  GBool stroke_adjust;
 
292
  GBool adjusted_stroke_width;
 
293
  GBool align_stroke_coords;
284
294
  CairoFont *currentFont;
285
 
  
 
295
 
 
296
  struct StrokePathClip {
 
297
    cairo_path_t *path;
 
298
    cairo_matrix_t ctm;
 
299
    double line_width;
 
300
    double *dashes;
 
301
    int dash_count;
 
302
    double dash_offset;
 
303
    cairo_line_cap_t cap;
 
304
    cairo_line_join_t join;
 
305
    double miter;
 
306
  } *strokePathClip;
 
307
 
286
308
  XRef *xref;                   // xref table for current document
287
309
  Catalog *catalog;
288
310
 
296
318
  cairo_matrix_t orig_matrix;
297
319
  GBool needFontUpdate;                // set when the font needs to be updated
298
320
  GBool printing;
 
321
  GBool use_show_text_glyphs;
299
322
  cairo_surface_t *surface;
300
323
  cairo_glyph_t *glyphs;
301
324
  int glyphCount;
 
325
  cairo_text_cluster_t *clusters;
 
326
  int clusterCount;
 
327
  char *utf8;
 
328
  int utf8Count;
 
329
  int utf8Max;
302
330
  cairo_path_t *textClipPath;
303
331
  GBool inType3Char;            // inside a Type 3 CharProc
304
332
  double t3_glyph_wx, t3_glyph_wy;
313
341
  cairo_pattern_t *group;
314
342
  cairo_pattern_t *shape;
315
343
  cairo_pattern_t *mask;
 
344
  cairo_matrix_t mask_matrix;
316
345
  cairo_surface_t *cairo_shape_surface;
317
346
  cairo_t *cairo_shape;
318
347
  int knockoutCount;
323
352
  } * groupColorSpaceStack;
324
353
 
325
354
  struct MaskStack {
326
 
      cairo_pattern_t *mask;
327
 
      struct MaskStack *next;
 
355
    cairo_pattern_t *mask;
 
356
    cairo_matrix_t mask_matrix;
 
357
    struct MaskStack *next;
328
358
  } *maskStack;
329
359
 
330
360
  GBool haveCSPattern;  // set if text has been drawn with a
362
392
  // Does this device use functionShadedFill(), axialShadedFill(), and
363
393
  // radialShadedFill()?  If this returns false, these shaded fills
364
394
  // will be reduced to a series of other drawing operations.
 
395
#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 11, 2)
 
396
  virtual GBool useShadedFills(int type) { return type <= 7; }
 
397
#else
365
398
  virtual GBool useShadedFills(int type) { return type < 4; }
 
399
#endif
366
400
 
367
401
  // Does this device use FillColorStop()?
368
402
  virtual GBool useFillColorStop() { return gFalse; }
374
408
  // Does this device need non-text content?
375
409
  virtual GBool needNonText() { return gTrue; }
376
410
 
377
 
    //----- link borders
378
 
  virtual void drawLink(Link *link, Catalog *catalog) { }
379
 
 
380
411
  //----- save/restore graphics state
381
412
  virtual void saveState(GfxState *state) { }
382
413
  virtual void restoreState(GfxState *state) { }
405
436
  virtual void stroke(GfxState *state) { }
406
437
  virtual void fill(GfxState *state) { }
407
438
  virtual void eoFill(GfxState *state) { }
408
 
  virtual GBool tilingPatternFill(GfxState *state, Object *str,
409
 
                                  int paintType, int tilingType, Dict *resDict,
 
439
  virtual void clipToStrokePath(GfxState *state) { }
 
440
  virtual GBool tilingPatternFill(GfxState *state, Catalog *cat, Object *str,
 
441
                                  double *pmat, int paintType, int tilingType, Dict *resDict,
410
442
                                  double *mat, double *bbox,
411
443
                                  int x0, int y0, int x1, int y1,
412
444
                                  double xStep, double yStep) { return gTrue; }