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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
56 */ | 56 */ |
57 static SkDocument* CreatePDF(SkWStream*, | 57 static SkDocument* CreatePDF(SkWStream*, |
58 SkScalar dpi = SK_ScalarDefaultRasterDPI); | 58 SkScalar dpi = SK_ScalarDefaultRasterDPI); |
59 | 59 |
60 /** | 60 /** |
61 * Create a PDF-backed document, writing the results into a file. | 61 * Create a PDF-backed document, writing the results into a file. |
62 */ | 62 */ |
63 static SkDocument* CreatePDF(const char outputFilePath[], | 63 static SkDocument* CreatePDF(const char outputFilePath[], |
64 SkScalar dpi = SK_ScalarDefaultRasterDPI); | 64 SkScalar dpi = SK_ScalarDefaultRasterDPI); |
65 | 65 |
66 #ifdef SK_SUPPORT_XPS | |
reed1
2015/03/02 21:32:27
Why does this check need to be here? Can it not ju
reed1
2015/03/02 21:41:32
As a factory, it is allowed to return NULL even on
hal.canary
2015/03/02 23:08:24
Done.
| |
67 /** | |
68 * Create a XPS-backed document, writing the results into the stream. | |
69 */ | |
70 static SkDocument* CreateXPS(SkWStream* stream, | |
71 SkScalar dpi = SK_ScalarDefaultRasterDPI); | |
72 | |
73 /** | |
74 * Create a XPS-backed document, writing the results into a file. | |
75 */ | |
76 static SkDocument* CreateXPS(const char path[], | |
77 SkScalar dpi = SK_ScalarDefaultRasterDPI); | |
78 #endif // SK_SUPPORT_XPS | |
79 | |
66 /** | 80 /** |
67 * Begin a new page for the document, returning the canvas that will draw | 81 * Begin a new page for the document, returning the canvas that will draw |
68 * into the page. The document owns this canvas, and it will go out of | 82 * into the page. The document owns this canvas, and it will go out of |
69 * scope when endPage() or close() is called, or the document is deleted. | 83 * scope when endPage() or close() is called, or the document is deleted. |
70 */ | 84 */ |
71 SkCanvas* beginPage(SkScalar width, SkScalar height, | 85 SkCanvas* beginPage(SkScalar width, SkScalar height, |
72 const SkRect* content = NULL); | 86 const SkRect* content = NULL); |
73 | 87 |
74 /** | 88 /** |
75 * Call endPage() when the content for the current page has been drawn | 89 * Call endPage() when the content for the current page has been drawn |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
118 | 132 |
119 private: | 133 private: |
120 SkWStream* fStream; | 134 SkWStream* fStream; |
121 void (*fDoneProc)(SkWStream*, bool aborted); | 135 void (*fDoneProc)(SkWStream*, bool aborted); |
122 State fState; | 136 State fState; |
123 | 137 |
124 typedef SkRefCnt INHERITED; | 138 typedef SkRefCnt INHERITED; |
125 }; | 139 }; |
126 | 140 |
127 #endif | 141 #endif |
OLD | NEW |