Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(514)

Unified Diff: experimental/PdfViewer/SkPdfFont.h

Issue 22407005: pdfviewer: fix font rotation issues (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | experimental/PdfViewer/SkPdfRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/PdfViewer/SkPdfFont.h
===================================================================
--- experimental/PdfViewer/SkPdfFont.h (revision 10543)
+++ experimental/PdfViewer/SkPdfFont.h (working copy)
@@ -172,9 +172,14 @@
void drawText(const SkDecodedText& text, SkPaint* paint, PdfContext* pdfContext, SkCanvas* canvas) {
for (int i = 0 ; i < text.size(); i++) {
+ canvas->setMatrix(pdfContext->fGraphicsState.fMatrixTm);
+#ifdef PDF_TRACE
+ SkPoint point = SkPoint::Make(SkDoubleToScalar(0), SkDoubleToScalar(0));
+ pdfContext->fGraphicsState.fMatrixTm.mapPoints(&point, 1);
+ printf("DrawText at (%f, %f)\n", SkScalarToDouble(point.x()), SkScalarToDouble(point.y()));
+#endif // PDF_TRACE
double width = drawOneChar(text[i], paint, pdfContext, canvas);
pdfContext->fGraphicsState.fMatrixTm.preTranslate(SkDoubleToScalar(width), SkDoubleToScalar(0.0));
- canvas->translate(SkDoubleToScalar(width), SkDoubleToScalar(0.0));
}
}
« no previous file with comments | « no previous file | experimental/PdfViewer/SkPdfRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698