Index: experimental/PdfViewer/SkPdfRenderer.h |
=================================================================== |
--- experimental/PdfViewer/SkPdfRenderer.h (revision 10286) |
+++ experimental/PdfViewer/SkPdfRenderer.h (working copy) |
@@ -9,10 +9,17 @@ |
#ifndef SkPdfRenderer_DEFINED |
#define SkPdfRenderer_DEFINED |
+class SkBitmap; |
class SkCanvas; |
class SkNativeParsedPDF; |
class SkRect; |
+class SkStream; |
+enum SkPdfContent { |
+ kNoForms_SkPdfContent, |
+ kAll_SkPdfContent, |
+}; |
+ |
// TODO(edisonn): move in another file |
class SkPdfRenderer : public SkRefCnt { |
SkNativeParsedPDF* fPdfDoc; |
@@ -24,6 +31,7 @@ |
bool renderPage(int page, SkCanvas* canvas, const SkRect& dst) const; |
bool load(const SkString inputFileName); |
+ bool load(SkStream* stream); |
bool loaded() const {return fPdfDoc != NULL;} |
int pages() const; |
void unload(); |
@@ -33,4 +41,10 @@ |
void reportPdfRenderStats(); |
+bool SkPDFNativeRenderToBitmap(SkStream* stream, |
+ SkBitmap* output, |
+ int page = 0, |
+ SkPdfContent content = kAll_SkPdfContent, |
+ double dpi = 72.0); |
+ |
#endif // SkPdfRenderer_DEFINED |