Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(173)

Side by Side Diff: site/dev/design/pdftheory.md

Issue 967873002: Doc: update dev/design/pdftheory with new function call (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 PDF Theory of Operation 1 PDF Theory of Operation
2 ======================= 2 =======================
3 3
4 <!-- 4 <!--
5 PRE-GIT DOCUMENT VERSION HISTORY 5 PRE-GIT DOCUMENT VERSION HISTORY
6 2012-06-25 Steve VanDeBogart 6 2012-06-25 Steve VanDeBogart
7 * Original version 7 * Original version
8 2015-01-14 Hal Canary. 8 2015-01-14 Hal Canary.
9 * Add section "Using the PDF backend" 9 * Add section "Using the PDF backend"
10 * Markdown formatting 10 * Markdown formatting
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 new SkPDFDevice should be created for each page desired in the 49 new SkPDFDevice should be created for each page desired in the
50 document. After all the pages have been added to the document, 50 document. After all the pages have been added to the document,
51 `SkPDFDocument::emitPDF()` can be called to get a PDF file. One of the 51 `SkPDFDocument::emitPDF()` can be called to get a PDF file. One of the
52 special features of the PDF backend is that the same device can be 52 special features of the PDF backend is that the same device can be
53 added to multiple documents. This for example, would let you generate 53 added to multiple documents. This for example, would let you generate
54 a PDF with the single page you just drew as well as adding it to a 54 a PDF with the single page you just drew as well as adding it to a
55 longer document with a bunch of other pages. 55 longer document with a bunch of other pages.
56 56
57 <!--?prettify lang=cc?--> 57 <!--?prettify lang=cc?-->
58 58
59 SkPDFCanon canon;
59 SkAutoUnref<SkPDFDevice> pdfDevice( 60 SkAutoUnref<SkPDFDevice> pdfDevice(
60 new SkPDFDevice(width, height, initial_transform)); 61 SkPDFDevice::Create(SkISize::Make(width, height), 72.0f, &canon));
61 62
62 SkCanvas canvas(pdfDevice); 63 SkCanvas canvas(pdfDevice);
63 draw_content(&canvas); 64 draw_content(&canvas);
64 65
65 SkPDFDocument doc; 66 SkPDFDocument doc;
66 doc.appendPage(dev); 67 doc.appendPage(dev);
67 doc.emitPDF(&pdf_stream); 68 doc.emitPDF(&pdf_stream);
68 69
69 <a name="PDF_Objects_and_Document_Structure"></a> 70 <a name="PDF_Objects_and_Document_Structure"></a>
70 PDF Objects and Document Structure 71 PDF Objects and Document Structure
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 * [issue 244](http://skbug.com/244) 589 * [issue 244](http://skbug.com/244)
589 Mostly, only TTF fonts are directly supported. (User metrics 590 Mostly, only TTF fonts are directly supported. (User metrics
590 show that almost all fonts are truetype. 591 show that almost all fonts are truetype.
591 * [issue 260](http://skbug.com/260) 592 * [issue 260](http://skbug.com/260)
592 Page rotation is accomplished by specifying a different 593 Page rotation is accomplished by specifying a different
593 size page instead of including the appropriate rotation 594 size page instead of including the appropriate rotation
594 annotation. 595 annotation.
595 596
596 * * * 597 * * *
597 598
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698