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

Side by Side Diff: include/core/SkDocument.h

Issue 963953002: XPS, DM: add SkDocument::CreateXPS (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix iOS compile 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 | « gyp/xps.gyp ('k') | include/device/xps/SkXPSDevice.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « gyp/xps.gyp ('k') | include/device/xps/SkXPSDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698