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

Unified Diff: include/pdf/SkPDFDevice.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: add comments 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 | « include/core/SkDocument.h ('k') | src/doc/SkDocument_PDF.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/pdf/SkPDFDevice.h
diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h
index d668be5df38a05ff0be5ee25670b78dfb6cc7877..e68623e22f0957ac8323ea3a6a07ed21964b9d48 100644
--- a/include/pdf/SkPDFDevice.h
+++ b/include/pdf/SkPDFDevice.h
@@ -197,6 +197,20 @@ protected:
virtual bool allowImageFilter(SkImageFilter*) SK_OVERRIDE;
+ /**
+ * rasterDpi - the DPI at which features without native PDF support
+ * will be rasterized (e.g. draw image with perspective,
+ * draw text with perspective, ...)
+ * A larger DPI would create a PDF that reflects the original
+ * intent with better fidelity, but it can make for larger
+ * PDF files too, which would use more memory while rendering,
+ * and it would be slower to be processed or sent online or
+ * to printer.
+ */
+ void setRasterDpi(SkScalar rasterDpi) {
+ fRasterDpi = rasterDpi;
vandebo (ex-Chrome) 2013/10/21 16:28:35 nit: you could move the 0 check down to this metho
edisonn 2013/10/21 16:36:34 IMHO it is way easier for a dev to find out the de
+ }
+
private:
// TODO(vandebo): push most of SkPDFDevice's state into a core object in
// order to get the right access levels without using friend.
@@ -233,6 +247,7 @@ private:
SkAutoTDelete<SkPDFGlyphSetMap> fFontGlyphUsage;
SkPicture::EncodeBitmap fEncoder;
+ SkScalar fRasterDpi;
SkPDFDevice(const SkISize& layerSize, const SkClipStack& existingClipStack,
const SkRegion& existingClipRegion);
« no previous file with comments | « include/core/SkDocument.h ('k') | src/doc/SkDocument_PDF.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698