aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkDocument.h
diff options
context:
space:
mode:
authorGravatar halcanary <halcanary@google.com>2015-03-03 08:26:00 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-03-03 08:26:00 -0800
commit00d39bcbfc8394a9b48b86b04ab06ec19091fa43 (patch)
tree2287b3641efeb3175c2eb4af1437c2d0343fecdf /include/core/SkDocument.h
parent60ff4582ae76aa131aeb20a3e16c89fa3a40a41c (diff)
XPS, DM: add SkDocument::CreateXPS
- SkDocument::CreateXPS() function added, returns NULL on non-Windows OS. - DM: (Windows only) an XPSSink is added, fails on non-Windows OS - DM: Common code for PDFSink::draw and XPSSink::draw are factored into draw_skdocument static function. - SkDocument_XPS (Windows only) implementation of SkDocument via SkXPSDevice. - SkDocument_XPS_None (non-Windows) returns NULL for SkDocument::CreateXPS(). - gyp/xps.gyp refactored. - SkXPSDevice::drawTextOnPath removed (see http://crrev.com/925343003 ) - SkXPSDevice::drawPath supports conics via SkAutoConicToQuads. NOPRESUBMIT=true Review URL: https://codereview.chromium.org/963953002
Diffstat (limited to 'include/core/SkDocument.h')
-rw-r--r--include/core/SkDocument.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/include/core/SkDocument.h b/include/core/SkDocument.h
index db8113f0e2..8d48aad25b 100644
--- a/include/core/SkDocument.h
+++ b/include/core/SkDocument.h
@@ -64,6 +64,19 @@ public:
SkScalar dpi = SK_ScalarDefaultRasterDPI);
/**
+ * Create a XPS-backed document, writing the results into the stream.
+ * Returns NULL if XPS is not supported.
+ */
+ static SkDocument* CreateXPS(SkWStream* stream,
+ SkScalar dpi = SK_ScalarDefaultRasterDPI);
+
+ /**
+ * Create a XPS-backed document, writing the results into a file.
+ * Returns NULL if XPS is not supported.
+ */
+ static SkDocument* CreateXPS(const char path[],
+ SkScalar dpi = SK_ScalarDefaultRasterDPI);
+ /**
* Begin a new page for the document, returning the canvas that will draw
* into the page. The document owns this canvas, and it will go out of
* scope when endPage() or close() is called, or the document is deleted.