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

Side by Side Diff: experimental/PdfViewer/SkPdfRenderer.h

Issue 19000004: add ability to specify the DPI at which to render the page (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | experimental/PdfViewer/SkPdfRenderer.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2013 Google Inc. 2 * Copyright 2013 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #ifndef SkPdfRenderer_DEFINED 9 #ifndef SkPdfRenderer_DEFINED
10 #define SkPdfRenderer_DEFINED 10 #define SkPdfRenderer_DEFINED
11 11
12 class SkCanvas; 12 class SkCanvas;
13 class SkNativeParsedPDF; 13 class SkNativeParsedPDF;
14 class SkRect;
14 15
15 // TODO(edisonn): move in another file 16 // TODO(edisonn): move in another file
16 class SkPdfRenderer : public SkRefCnt { 17 class SkPdfRenderer : public SkRefCnt {
17 SkNativeParsedPDF* fPdfDoc; 18 SkNativeParsedPDF* fPdfDoc;
18 public: 19 public:
19 SkPdfRenderer() : fPdfDoc(NULL) {} 20 SkPdfRenderer() : fPdfDoc(NULL) {}
20 virtual ~SkPdfRenderer() {unload();} 21 virtual ~SkPdfRenderer() {unload();}
21 22
22 // TODO(edisonn): add options to render forms, or not 23 // TODO(edisonn): add options to render forms, or not
23 bool renderPage(int page, SkCanvas* canvas) const; 24 bool renderPage(int page, SkCanvas* canvas, const SkRect& dst) const;
reed1 2013/07/11 15:27:13 Why is this better than just using the matrix on t
edisonn 2013/07/11 15:36:24 there is some magic I need to do to remap the matr
24 25
25 bool load(const SkString inputFileName); 26 bool load(const SkString inputFileName);
26 bool loaded() const {return fPdfDoc != NULL;} 27 bool loaded() const {return fPdfDoc != NULL;}
27 int pages() const; 28 int pages() const;
28 void unload(); 29 void unload();
29 SkRect MediaBox(int page) const; 30 SkRect MediaBox(int page) const;
30 size_t bytesUsed() const; 31 size_t bytesUsed() const;
31 }; 32 };
32 33
33 void reportPdfRenderStats(); 34 void reportPdfRenderStats();
34 35
35 #endif // SkPdfRenderer_DEFINED 36 #endif // SkPdfRenderer_DEFINED
OLDNEW
« 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