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);
metadata.fCreation = now;
metadata.fModified = now;
sk_sp<SkDocument> pdfDocument = SkPDF::MakeDocument(
outputStream, SK_ScalarDefaultRasterDPI, metadata,
nullptr, true);
sk_sp<SkDocument> pdfDocument = SkPDF::MakeDocument(outputStream, metadata);
assert(pdfDocument);
for (int page = 0; page < numberOfPages; ++page) {
SkCanvas* pageCanvas =
pdfDocument->beginPage(pageSize.width(),
pageSize.height());
SkCanvas* pageCanvas = pdfDocument->beginPage(pageSize.width(),
pageSize.height());
writePage(pageCanvas, page);
pdfDocument->endPage();
}