Docs: update to docs from a4daf19319

NoTry: true
Change-Id: Icb9e940a9b0c801188ae910805e61056994681ea
Reviewed-on: https://skia-review.googlesource.com/156190
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Hal Canary <halcanary@google.com>
This commit is contained in:
Hal Canary 2018-09-21 15:53:03 -04:00 committed by Skia Commit-Bot
parent 00529a1771
commit 62589c6537

View File

@ -20,15 +20,12 @@ SkDocument and SkCanvas APIs.
SkTime::GetDateTime(&now); SkTime::GetDateTime(&now);
metadata.fCreation = now; metadata.fCreation = now;
metadata.fModified = now; metadata.fModified = now;
sk_sp<SkDocument> pdfDocument = SkPDF::MakeDocument( sk_sp<SkDocument> pdfDocument = SkPDF::MakeDocument(outputStream, metadata);
outputStream, SK_ScalarDefaultRasterDPI, metadata,
nullptr, true);
assert(pdfDocument); assert(pdfDocument);
for (int page = 0; page < numberOfPages; ++page) { for (int page = 0; page < numberOfPages; ++page) {
SkCanvas* pageCanvas = SkCanvas* pageCanvas = pdfDocument->beginPage(pageSize.width(),
pdfDocument->beginPage(pageSize.width(), pageSize.height());
pageSize.height());
writePage(pageCanvas, page); writePage(pageCanvas, page);
pdfDocument->endPage(); pdfDocument->endPage();
} }