From 8c294900f31d8d032b62182f011019276d27d5d0 Mon Sep 17 00:00:00 2001 From: "commit-bot@chromium.org" Date: Mon, 21 Oct 2013 17:14:37 +0000 Subject: Add DPI stettings to SkDocument::CreatePDF(). Tests will be added in a future cl, once DPI will be used in SkPDFDevice R=reed@google.com, bungeman@google.com, vandebo@chromium.org Author: edisonn@google.com Review URL: https://codereview.chromium.org/32233003 git-svn-id: http://skia.googlecode.com/svn/trunk@11886 2bbb7eff-a529-9590-31e7-b0007b416f81 --- include/pdf/SkPDFDevice.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'include/pdf') diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h index d668be5df3..e68623e22f 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; + } + 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 fFontGlyphUsage; SkPicture::EncodeBitmap fEncoder; + SkScalar fRasterDpi; SkPDFDevice(const SkISize& layerSize, const SkClipStack& existingClipStack, const SkRegion& existingClipRegion); -- cgit v1.2.3