[poppler] 4 commits - poppler/ArthurOutputDev.cc
Pino Toscano
pino at kemper.freedesktop.org
Sat Apr 26 09:08:44 PDT 2008
poppler/ArthurOutputDev.cc | 41 +++++++++++++++++++++++------------------
1 file changed, 23 insertions(+), 18 deletions(-)
New commits:
commit f9c7e8037b7165b6271ce7aea0d315053c4d66a5
Merge: 59d33d8... f5fec4f...
Author: Pino Toscano <pino at kde.org>
Date: Sat Apr 26 18:09:59 2008 +0200
Merge branch 'master' of ssh://pino@git.freedesktop.org/git/poppler/poppler
commit 59d33d8e99673f73ccf2ad9a62bd25fca51f0eb8
Author: Pino Toscano <pino at kde.org>
Date: Sat Apr 26 17:56:42 2008 +0200
use the base implementation to update all the states
diff --git a/poppler/ArthurOutputDev.cc b/poppler/ArthurOutputDev.cc
index 73536e2..9eaae37 100644
--- a/poppler/ArthurOutputDev.cc
+++ b/poppler/ArthurOutputDev.cc
@@ -126,16 +126,7 @@ void ArthurOutputDev::restoreState(GfxState *state)
void ArthurOutputDev::updateAll(GfxState *state)
{
- updateLineDash(state);
- updateLineJoin(state);
- updateLineCap(state);
- updateLineWidth(state);
- updateFlatness(state);
- updateMiterLimit(state);
- updateFillColor(state);
- updateStrokeColor(state);
- updateFillOpacity(state);
- updateStrokeOpacity(state);
+ OutputDev::updateAll(state);
m_needFontUpdate = gTrue;
}
commit 45d2a9529bf241554c59437118cb8c705554dc27
Author: Pino Toscano <pino at kde.org>
Date: Sat Apr 26 17:55:39 2008 +0200
Set the font antialiasing from the painter settings, instead of the global settings.
diff --git a/poppler/ArthurOutputDev.cc b/poppler/ArthurOutputDev.cc
index ed1b599..73536e2 100644
--- a/poppler/ArthurOutputDev.cc
+++ b/poppler/ArthurOutputDev.cc
@@ -90,7 +90,7 @@ void ArthurOutputDev::startDoc(XRef *xrefA) {
#if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H
globalParams->getEnableFreeType(),
#endif
- globalParams->getAntialias());
+ m_painter->testRenderHint(QPainter::TextAntialiasing));
}
void ArthurOutputDev::startPage(int pageNum, GfxState *state)
commit 5faa72fd70e0d85268e807a8b870d80dda9189a9
Author: Pino Toscano <pino at kde.org>
Date: Sat Apr 26 17:53:28 2008 +0200
Get the font and painter matrices, and reenable the font drawing.
diff --git a/poppler/ArthurOutputDev.cc b/poppler/ArthurOutputDev.cc
index 1c0728c..ed1b599 100644
--- a/poppler/ArthurOutputDev.cc
+++ b/poppler/ArthurOutputDev.cc
@@ -243,7 +243,6 @@ void ArthurOutputDev::updateFont(GfxState *state)
#ifdef __GNUC__
#warning fix this, probably update with updated code from SplashOutputdev
#endif
-/*
GfxFont *gfxFont;
GfxFontType fontType;
SplashOutFontFileID *id;
@@ -257,7 +256,8 @@ void ArthurOutputDev::updateFont(GfxState *state)
int tmpBufLen;
Gushort *codeToGID;
DisplayFontParam *dfp;
- double m11, m12, m21, m22, w1, w2;
+ double *textMat;
+ double m11, m12, m21, m22, fontSize;
SplashCoord mat[4];
char *name;
int c, substIdx, n, code;
@@ -393,20 +393,34 @@ void ArthurOutputDev::updateFont(GfxState *state)
}
// get the font matrix
- state->getFontTransMat(&m11, &m12, &m21, &m22);
- m11 *= state->getHorizScaling();
- m12 *= state->getHorizScaling();
+ textMat = state->getTextMat();
+ fontSize = state->getFontSize();
+ m11 = textMat[0] * fontSize * state->getHorizScaling();
+ m12 = textMat[1] * fontSize * state->getHorizScaling();
+ m21 = textMat[2] * fontSize;
+ m22 = textMat[3] * fontSize;
+
+ SplashCoord matrix[6];
+ {
+ QMatrix painterMatrix = m_painter->worldMatrix();
+ matrix[0] = painterMatrix.m11();
+ matrix[1] = painterMatrix.m12();
+ matrix[2] = painterMatrix.m21();
+ matrix[3] = painterMatrix.m22();
+ matrix[4] = painterMatrix.dx();
+ matrix[5] = painterMatrix.dy();
+ }
// create the scaled font
mat[0] = m11; mat[1] = -m12;
mat[2] = m21; mat[3] = -m22;
- m_font = m_fontEngine->getFont(fontFile, mat);
+ m_font = m_fontEngine->getFont(fontFile, mat, matrix);
return;
err2:
delete id;
- err1:*/
+ err1:
return;
}
More information about the poppler
mailing list