OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkDocument_DEFINED | 8 #ifndef SkDocument_DEFINED |
9 #define SkDocument_DEFINED | 9 #define SkDocument_DEFINED |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 /** | 23 /** |
24 * High-level API for creating a document-based canvas. To use.. | 24 * High-level API for creating a document-based canvas. To use.. |
25 * | 25 * |
26 * 1. Create a document, specifying a stream to store the output. | 26 * 1. Create a document, specifying a stream to store the output. |
27 * 2. For each "page" of content: | 27 * 2. For each "page" of content: |
28 * a. canvas = doc->beginPage(...) | 28 * a. canvas = doc->beginPage(...) |
29 * b. draw_my_content(canvas); | 29 * b. draw_my_content(canvas); |
30 * c. doc->endPage(); | 30 * c. doc->endPage(); |
31 * 3. Close the document with doc->close(). | 31 * 3. Close the document with doc->close(). |
32 */ | 32 */ |
33 class SkDocument : public SkRefCnt { | 33 class SK_API SkDocument : public SkRefCnt { |
34 public: | 34 public: |
35 SK_DECLARE_INST_COUNT(SkDocument) | 35 SK_DECLARE_INST_COUNT(SkDocument) |
36 | 36 |
37 /** | 37 /** |
38 * Create a PDF-backed document, writing the results into a file. | 38 * Create a PDF-backed document, writing the results into a file. |
39 * If there is an error trying to create the doc, returns NULL. | 39 * If there is an error trying to create the doc, returns NULL. |
40 * encoder sets the DCTEncoder for images, to encode a bitmap | 40 * encoder sets the DCTEncoder for images, to encode a bitmap |
41 * as JPEG (DCT). | 41 * as JPEG (DCT). |
42 * rasterDpi - the DPI at which features without native PDF support | 42 * rasterDpi - the DPI at which features without native PDF support |
43 * will be rasterized (e.g. draw image with perspective, | 43 * will be rasterized (e.g. draw image with perspective, |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 134 |
135 private: | 135 private: |
136 SkWStream* fStream; | 136 SkWStream* fStream; |
137 void (*fDoneProc)(SkWStream*, bool aborted); | 137 void (*fDoneProc)(SkWStream*, bool aborted); |
138 State fState; | 138 State fState; |
139 | 139 |
140 typedef SkRefCnt INHERITED; | 140 typedef SkRefCnt INHERITED; |
141 }; | 141 }; |
142 | 142 |
143 #endif | 143 #endif |
OLD | NEW |