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

Unified Diff: include/pdf/SkPDFDevice.h

Issue 12466008: PDF: add support for named destinations (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 10 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/SkAnnotation.h ('k') | src/core/SkAnnotation.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/pdf/SkPDFDevice.h
===================================================================
--- include/pdf/SkPDFDevice.h (revision 7989)
+++ include/pdf/SkPDFDevice.h (working copy)
@@ -17,6 +17,7 @@
#include "SkRect.h"
#include "SkRefCnt.h"
#include "SkStream.h"
+#include "SkTDArray.h"
#include "SkTScopedPtr.h"
class SkPDFArray;
@@ -33,6 +34,7 @@
// Private classes.
struct ContentEntry;
struct GraphicStateEntry;
+struct NamedDestination;
/** \class SkPDFDevice
@@ -142,6 +144,12 @@
*/
SK_API const SkTDArray<SkPDFFont*>& getFontResources() const;
+ /** Add our named destinations to the supplied dictionary.
+ * @param dict Dictionary to add destinations to.
+ * @param page The PDF object representing the page for this device.
+ */
+ void appendDestinations(SkPDFDict* dict, SkPDFObject* page);
+
/** Returns a copy of the media box for this device. The caller is required
* to unref() this when it is finished.
*/
@@ -191,6 +199,7 @@
SkRegion fExistingClipRegion;
SkPDFArray* fAnnotations;
SkPDFDict* fResourceDict;
+ SkTDArray<NamedDestination*> fNamedDestinations;
SkTDArray<SkPDFGraphicState*> fGraphicStateResources;
SkTDArray<SkPDFObject*> fXObjectResources;
@@ -273,8 +282,17 @@
*/
void copyContentEntriesToData(ContentEntry* entry, SkWStream* data) const;
- bool handleAnnotations(const SkRect& r, const SkMatrix& matrix,
- const SkPaint& paint);
+ bool handleRectAnnotation(const SkRect& r, const SkMatrix& matrix,
+ const SkPaint& paint);
+ bool handlePointAnnotation(const SkPoint* points, size_t count,
+ const SkMatrix& matrix, const SkPaint& paint);
+ SkPDFDict* createLinkAnnotation(const SkRect& r, const SkMatrix& matrix);
+ void handleLinkToURL(SkData* urlData, const SkRect& r,
+ const SkMatrix& matrix);
+ void handleLinkToNamedDest(SkData* nameData, const SkRect& r,
+ const SkMatrix& matrix);
+ void defineNamedDestination(SkData* nameData, const SkPoint& point,
+ const SkMatrix& matrix);
typedef SkDevice INHERITED;
};
« no previous file with comments | « include/core/SkAnnotation.h ('k') | src/core/SkAnnotation.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698