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

Unified Diff: include/core/SkDocument.h

Issue 32233003: Add DPI stettings to SkDocument::CreatePDF(). Tests will be added in a future cl, once DPI will be … (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: use SkScalar instead of double Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | include/pdf/SkPDFDevice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkDocument.h
diff --git a/include/core/SkDocument.h b/include/core/SkDocument.h
index b941d1bd19ce775be0c83c474dcb42ba5e0f4dc9..a4bbad8d467b6f0028f55858cc8bd7b37e1a566a 100644
--- a/include/core/SkDocument.h
+++ b/include/core/SkDocument.h
@@ -16,6 +16,10 @@
class SkCanvas;
class SkWStream;
+/** SK_ScalarDefaultDPI is 72 DPI.
+*/
+#define SK_ScalarDefaultDPI SkFloatToScalar(72.0f)
+
/**
* High-level API for creating a document-based canvas. To use..
*
@@ -37,7 +41,8 @@ public:
* as JPEG (DCT).
reed1 2013/10/21 13:10:24 What does DPI mean to the client when they draw in
edisonn 2013/10/21 14:40:58 No Does it affect internal
*/
static SkDocument* CreatePDF(const char filename[],
- SkPicture::EncodeBitmap encoder = NULL);
+ SkPicture::EncodeBitmap encoder = NULL,
+ SkScalar dpi = SK_ScalarDefaultDPI);
/**
* Create a PDF-backed document, writing the results into a stream.
@@ -52,7 +57,8 @@ public:
* as JPEG (DCT).
*/
static SkDocument* CreatePDF(SkWStream*, void (*Done)(SkWStream*) = NULL,
- SkPicture::EncodeBitmap encoder = NULL);
+ SkPicture::EncodeBitmap encoder = NULL,
+ SkScalar dpi = SK_ScalarDefaultDPI);
/**
* Begin a new page for the document, returning the canvas that will draw
« no previous file with comments | « no previous file | include/pdf/SkPDFDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698