OLD | NEW |
(Empty) | |
| 1 #ifndef EXPERIMENTAL_PDFVIEWER_PDFPARSER_PODOFO_SKPODOFOPARSEDPDF_H_ |
| 2 #define EXPERIMENTAL_PDFVIEWER_PDFPARSER_PODOFO_SKPODOFOPARSEDPDF_H_ |
| 3 |
| 4 #include "SkRect.h" |
| 5 |
| 6 class SkCanvas; |
| 7 |
| 8 class SkPdfInteger; |
| 9 class SkPdfMapper; |
| 10 class SkPdfNumber; |
| 11 class SkPdfObject; |
| 12 class SkPdfResourceDictionary; |
| 13 class SkPdfStream; |
| 14 class SkPdfString; |
| 15 |
| 16 class SkPdfPodofoTokenizer; |
| 17 |
| 18 namespace PoDoFo { |
| 19 class PdfMemDocument; |
| 20 class PdfObject; |
| 21 } |
| 22 |
| 23 class SkPodofoParsedPDF { |
| 24 public: |
| 25 SkPodofoParsedPDF(const char* path); |
| 26 virtual ~SkPodofoParsedPDF(); |
| 27 |
| 28 virtual int pages() const; |
| 29 virtual double width(int page) const; |
| 30 virtual double height(int page) const; |
| 31 const SkPdfResourceDictionary* pageResources(int page) const; |
| 32 virtual SkRect MediaBox(int n) const; |
| 33 virtual SkPdfPodofoTokenizer* tokenizerOfPage(int n) const; |
| 34 |
| 35 virtual SkPdfPodofoTokenizer* tokenizerOfStream(const SkPdfStream* stream) c
onst; |
| 36 virtual SkPdfPodofoTokenizer* tokenizerOfBuffer(char* buffer, size_t len) co
nst; |
| 37 |
| 38 virtual size_t objects() const; |
| 39 virtual const SkPdfObject* object(int i) const; |
| 40 |
| 41 PoDoFo::PdfMemDocument* podofo() const {return fDoc;} |
| 42 |
| 43 const SkPdfMapper* mapper() const; |
| 44 |
| 45 SkPdfNumber* createNumber(double number) const; |
| 46 SkPdfInteger* createInteger(int value) const; |
| 47 SkPdfString* createString(char* sz, size_t len) const; |
| 48 |
| 49 void drawPage(int page, SkCanvas* canvas) const; |
| 50 |
| 51 private: |
| 52 SkPdfObject* make(PoDoFo::PdfObject* obj) const; |
| 53 const SkPdfObject* make(const PoDoFo::PdfObject* obj) const; |
| 54 |
| 55 PoDoFo::PdfMemDocument* fDoc; |
| 56 SkPdfMapper* fMapper; |
| 57 }; |
| 58 |
| 59 #endif // EXPERIMENTAL_PDFVIEWER_PDFPARSER_PODOFO_SKPODOFOPARSEDPDF_H_ |
OLD | NEW |