зеркало из https://github.com/mozilla/moz-skia.git
[PDF] Add pages accessor to SkPDFDocument.
Also add SK_API to SkPDFPage::getFontResources. Review URL: http://codereview.appspot.com/4561050 git-svn-id: http://skia.googlecode.com/svn/trunk@1453 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
Родитель
f33d153732
Коммит
d897bfb76f
|
@ -49,6 +49,10 @@ public:
|
|||
*/
|
||||
SK_API bool appendPage(const SkRefPtr<SkPDFDevice>& pdfDevice);
|
||||
|
||||
/** Get the list of pages in this document.
|
||||
*/
|
||||
SK_API const SkTDArray<SkPDFPage*>& getPages();
|
||||
|
||||
private:
|
||||
SkPDFCatalog fCatalog;
|
||||
int64_t fXRefFileOffset;
|
||||
|
|
|
@ -88,7 +88,7 @@ public:
|
|||
|
||||
/** Get the fonts used on this page.
|
||||
*/
|
||||
const SkTDArray<SkPDFFont*>& getFontResources() const;
|
||||
SK_API const SkTDArray<SkPDFFont*>& getFontResources() const;
|
||||
|
||||
private:
|
||||
// Multiple pages may reference the content.
|
||||
|
|
|
@ -154,6 +154,10 @@ bool SkPDFDocument::appendPage(const SkRefPtr<SkPDFDevice>& pdfDevice) {
|
|||
return true;
|
||||
}
|
||||
|
||||
const SkTDArray<SkPDFPage*>& SkPDFDocument::getPages() {
|
||||
return fPages;
|
||||
}
|
||||
|
||||
void SkPDFDocument::emitHeader(SkWStream* stream) {
|
||||
stream->writeText("%PDF-1.4\n%");
|
||||
// The PDF spec recommends including a comment with four bytes, all
|
||||
|
|
Загрузка…
Ссылка в новой задаче