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

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

Issue 1918713006: SkDocument::CreateXPS fix roll (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 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 /* 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
177 } 177 }
178 178
179 /** 179 /**
180 * Create a PDF-backed document, writing the results into a file. 180 * Create a PDF-backed document, writing the results into a file.
181 */ 181 */
182 static SkDocument* CreatePDF(const char outputFilePath[], 182 static SkDocument* CreatePDF(const char outputFilePath[],
183 SkScalar dpi = SK_ScalarDefaultRasterDPI) { 183 SkScalar dpi = SK_ScalarDefaultRasterDPI) {
184 return SkDocument::MakePDF(outputFilePath, dpi).release(); 184 return SkDocument::MakePDF(outputFilePath, dpi).release();
185 } 185 }
186 186
187 /**
188 * Create a XPS-backed document, writing the results into the stream.
189 * Returns NULL if XPS is not supported.
190 */
191 static SkDocument* CreateXPS(SkWStream* stream,
192 SkScalar dpi = SK_ScalarDefaultRasterDPI) {
193 return SkDocument::MakeXPS(stream, dpi).release();
194 }
195
196 /**
197 * Create a XPS-backed document, writing the results into a file.
198 * Returns NULL if XPS is not supported.
199 */
200 static SkDocument* CreateXPS(const char path[],
201 SkScalar dpi = SK_ScalarDefaultRasterDPI) {
202 return SkDocument::MakeXPS(path, dpi).release();
203 }
204 #endif // SK_SUPPORT_LEGACY_DOCUMENT_API 187 #endif // SK_SUPPORT_LEGACY_DOCUMENT_API
205 188
206 /** 189 /**
207 * Begin a new page for the document, returning the canvas that will draw 190 * Begin a new page for the document, returning the canvas that will draw
208 * into the page. The document owns this canvas, and it will go out of 191 * into the page. The document owns this canvas, and it will go out of
209 * scope when endPage() or close() is called, or the document is deleted. 192 * scope when endPage() or close() is called, or the document is deleted.
210 */ 193 */
211 SkCanvas* beginPage(SkScalar width, SkScalar height, 194 SkCanvas* beginPage(SkScalar width, SkScalar height,
212 const SkRect* content = NULL); 195 const SkRect* content = NULL);
213 196
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 271
289 private: 272 private:
290 SkWStream* fStream; 273 SkWStream* fStream;
291 void (*fDoneProc)(SkWStream*, bool aborted); 274 void (*fDoneProc)(SkWStream*, bool aborted);
292 State fState; 275 State fState;
293 276
294 typedef SkRefCnt INHERITED; 277 typedef SkRefCnt INHERITED;
295 }; 278 };
296 279
297 #endif 280 #endif
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