diff options
author | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-07-13 20:06:02 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2012-07-13 20:06:02 +0000 |
commit | 238be8c7e5de5a83517440a3db7f7965b47fb010 (patch) | |
tree | 574cb480c44361b9f962ea4862d5033b171d6e57 /include | |
parent | e742bf0ab19659145325ac894f7e0b78c8efbd89 (diff) |
[PDF] Add link annotations.
Review URL: https://codereview.appspot.com/6346100
git-svn-id: http://skia.googlecode.com/svn/trunk@4609 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include')
-rw-r--r-- | include/pdf/SkPDFDevice.h | 9 | ||||
-rw-r--r-- | include/pdf/SkPDFDocument.h | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/include/pdf/SkPDFDevice.h b/include/pdf/SkPDFDevice.h index 589cde965f..c01a383fa7 100644 --- a/include/pdf/SkPDFDevice.h +++ b/include/pdf/SkPDFDevice.h @@ -14,6 +14,7 @@ #include "SkDevice.h" #include "SkPaint.h" #include "SkPath.h" +#include "SkRect.h" #include "SkRefCnt.h" #include "SkStream.h" #include "SkTScopedPtr.h" @@ -142,6 +143,10 @@ public: */ SK_API SkRefPtr<SkPDFArray> getMediaBox() const; + /** Get the annotations from this page. + */ + SK_API SkRefPtr<SkPDFArray> getAnnotations() const; + /** Returns a SkStream with the page contents. The caller is responsible for a reference to the returned value. DEPRECATED: use copyContentToData() @@ -180,6 +185,7 @@ private: SkMatrix fInitialTransform; SkClipStack fExistingClipStack; SkRegion fExistingClipRegion; + SkRefPtr<SkPDFArray> fAnnotations; SkRefPtr<SkPDFDict> fResourceDict; SkTDArray<SkPDFGraphicState*> fGraphicStateResources; @@ -263,6 +269,9 @@ private: */ void copyContentEntriesToData(ContentEntry* entry, SkWStream* data) const; + bool handleAnnotations(const SkRect& r, const SkMatrix& matrix, + const SkPaint& paint); + typedef SkDevice INHERITED; }; diff --git a/include/pdf/SkPDFDocument.h b/include/pdf/SkPDFDocument.h index 1a4a51fa43..2caa28f18f 100644 --- a/include/pdf/SkPDFDocument.h +++ b/include/pdf/SkPDFDocument.h @@ -29,10 +29,10 @@ class SkWStream; class SkPDFDocument { public: enum Flags { - kNoCompression_Flag = 0x01, //!< mask disable stream compression. - kNoEmbedding_Flag = 0x02, //!< mask do not embed fonts. + kNoCompression_Flags = 0x01, //!< mask disable stream compression. + kNoLinks_Flags = 0x02, //!< do not honor link annotations. - kDraftMode_Flags = 0x03, + kDraftMode_Flags = 0x01, }; /** Create a PDF document. */ |