| 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 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 /** | 66 /** |
| 67 * Create a XPS-backed document, writing the results into the stream. |
| 68 * Returns NULL if XPS is not supported. |
| 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 * Returns NULL if XPS is not supported. |
| 76 */ |
| 77 static SkDocument* CreateXPS(const char path[], |
| 78 SkScalar dpi = SK_ScalarDefaultRasterDPI); |
| 79 /** |
| 67 * Begin a new page for the document, returning the canvas that will draw | 80 * 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 | 81 * 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. | 82 * scope when endPage() or close() is called, or the document is deleted. |
| 70 */ | 83 */ |
| 71 SkCanvas* beginPage(SkScalar width, SkScalar height, | 84 SkCanvas* beginPage(SkScalar width, SkScalar height, |
| 72 const SkRect* content = NULL); | 85 const SkRect* content = NULL); |
| 73 | 86 |
| 74 /** | 87 /** |
| 75 * Call endPage() when the content for the current page has been drawn | 88 * Call endPage() when the content for the current page has been drawn |
| 76 * (into the canvas returned by beginPage()). After this call the canvas | 89 * (into the canvas returned by beginPage()). After this call the canvas |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 118 | 131 |
| 119 private: | 132 private: |
| 120 SkWStream* fStream; | 133 SkWStream* fStream; |
| 121 void (*fDoneProc)(SkWStream*, bool aborted); | 134 void (*fDoneProc)(SkWStream*, bool aborted); |
| 122 State fState; | 135 State fState; |
| 123 | 136 |
| 124 typedef SkRefCnt INHERITED; | 137 typedef SkRefCnt INHERITED; |
| 125 }; | 138 }; |
| 126 | 139 |
| 127 #endif | 140 #endif |
| OLD | NEW |