diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-21 17:14:37 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-10-21 17:14:37 +0000 |
commit | 8c294900f31d8d032b62182f011019276d27d5d0 (patch) | |
tree | 92507dad54441936a44e3fab985600d74d027fb8 /include/pdf | |
parent | 9f51d16b54f0256f3f9ea00c85324d70535e374d (diff) |
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
Diffstat (limited to 'include/pdf')
-rw-r--r-- | include/pdf/SkPDFDevice.h | 15 |
1 files changed, 15 insertions, 0 deletions
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<SkPDFGlyphSetMap> fFontGlyphUsage; SkPicture::EncodeBitmap fEncoder; + SkScalar fRasterDpi; SkPDFDevice(const SkISize& layerSize, const SkClipStack& existingClipStack, const SkRegion& existingClipRegion); |