~matttbe/ubuntu/raring/poppler/lp1072129

« back to all changes in this revision

Viewing changes to poppler/ArthurOutputDev.cc

  • 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:
14
14
// under GPL version 2 or later
15
15
//
16
16
// Copyright (C) 2005 Brad Hards <bradh@frogmouth.net>
17
 
// Copyright (C) 2005-2009 Albert Astals Cid <aacid@kde.org>
 
17
// Copyright (C) 2005-2009, 2011 Albert Astals Cid <aacid@kde.org>
18
18
// Copyright (C) 2008, 2010 Pino Toscano <pino@kde.org>
19
 
// Copyright (C) 2009 Carlos Garcia Campos <carlosgc@gnome.org>
 
19
// Copyright (C) 2009, 2011 Carlos Garcia Campos <carlosgc@gnome.org>
20
20
// Copyright (C) 2009 Petr Gajdos <pgajdos@novell.com>
21
21
// Copyright (C) 2010 Matthias Fauconneau <matthias.fauconneau@gmail.com>
 
22
// Copyright (C) 2011 Andreas Hartmetz <ahartmetz@gmail.com>
22
23
//
23
24
// To see a description of the changes please see the Changelog file that
24
25
// came with your tarball or type make ChangeLog if you are building from git
86
87
//------------------------------------------------------------------------
87
88
 
88
89
ArthurOutputDev::ArthurOutputDev(QPainter *painter):
89
 
  m_painter(painter)
 
90
  m_painter(painter),
 
91
  m_fontHinting(NoHinting)
90
92
{
91
93
  m_currentBrush = QBrush(Qt::SolidPattern);
92
94
  m_fontEngine = 0;
104
106
  xref = xrefA;
105
107
#ifdef HAVE_SPLASH
106
108
  delete m_fontEngine;
 
109
 
 
110
  const bool isHintingEnabled = m_fontHinting != NoHinting;
 
111
  const bool isSlightHinting = m_fontHinting == SlightHinting;
 
112
 
107
113
  m_fontEngine = new SplashFontEngine(
108
114
#if HAVE_T1LIB_H
109
115
  globalParams->getEnableT1lib(),
110
116
#endif
111
117
#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
112
118
  globalParams->getEnableFreeType(),
113
 
  gFalse,
 
119
  isHintingEnabled,
 
120
  isSlightHinting,
114
121
#endif
115
122
  m_painter->testRenderHint(QPainter::TextAntialiasing));
116
123
#endif
133
140
void ArthurOutputDev::endPage() {
134
141
}
135
142
 
136
 
void ArthurOutputDev::drawLink(Link *link, Catalog *catalog)
137
 
{
138
 
}
139
 
 
140
143
void ArthurOutputDev::saveState(GfxState *state)
141
144
{
142
145
  m_painter->save();
281
284
  double *textMat;
282
285
  double m11, m12, m21, m22, fontSize;
283
286
  SplashCoord mat[4];
284
 
  int substIdx, n;
 
287
  int n;
285
288
  int faceIndex = 0;
286
289
  SplashCoord matrix[6];
287
290
 
289
292
  m_font = NULL;
290
293
  fileName = NULL;
291
294
  tmpBuf = NULL;
292
 
  substIdx = -1;
293
295
 
294
296
  if (!(gfxFont = state->getFont())) {
295
297
    goto err1;
770
772
  int i;
771
773
  double *ctm;
772
774
  QMatrix matrix;
773
 
  int is_identity_transform;
774
775
  QImage image;
775
776
  int stride;
776
777
  
780
781
                           colorMap->getBits());
781
782
  imgStr->reset();
782
783
  
783
 
  /* ICCBased color space doesn't do any color correction
784
 
   * so check its underlying color space as well */
785
 
  is_identity_transform = colorMap->getColorSpace()->getMode() == csDeviceRGB ||
786
 
                  (colorMap->getColorSpace()->getMode() == csICCBased && 
787
 
                  ((GfxICCBasedColorSpace*)colorMap->getColorSpace())->getAlt()->getMode() == csDeviceRGB);
788
 
 
789
784
  image = QImage(width, height, QImage::Format_ARGB32);
790
785
  data = (unsigned int *)image.bits();
791
786
  stride = image.bytesPerLine()/4;