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

Unified Diff: include/core/SkAnnotation.h

Issue 12533009: PDF: add support for named destinations. (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
Patch Set: attempt_to_fix_warnings_in_internal_links.cpp Created 7 years, 9 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 | « gyp/gmslides.gypi ('k') | include/pdf/SkPDFDevice.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkAnnotation.h
===================================================================
--- include/core/SkAnnotation.h (revision 8005)
+++ include/core/SkAnnotation.h (working copy)
@@ -14,6 +14,7 @@
class SkDataSet;
class SkStream;
class SkWStream;
+struct SkPoint;
/**
* Experimental class for annotating draws. Do not use directly yet.
@@ -64,6 +65,18 @@
* Returns the canonical key whose payload is a URL
*/
static const char* URL_Key();
+
+ /**
+ * Returns the canonical key whose payload is the name of a destination to
+ * be defined.
+ */
+ static const char* Define_Named_Dest_Key();
+
+ /**
+ * Returns the canonical key whose payload is the name of a destination to
+ * be linked to.
+ */
+ static const char* Link_Named_Dest_Key();
};
///////////////////////////////////////////////////////////////////////////////
@@ -86,4 +99,30 @@
*/
SK_API void SkAnnotateRectWithURL(SkCanvas*, const SkRect&, SkData*);
+/**
+ * Experimental!
+ *
+ * Annotate the canvas by associating a name with the specified point.
+ *
+ * If the backend of this canvas does not support annotations, this call is
+ * safely ignored.
+ *
+ * The caller is responsible for managing its ownership of the SkData.
+ */
+SK_API void SkAnnotateNamedDestination(SkCanvas*, const SkPoint&, SkData*);
+
+/**
+ * Experimental!
+ *
+ * Annotate the canvas by making the specified rectangle link to a named
+ * destination.
+ *
+ * If the backend of this canvas does not support annotations, this call is
+ * safely ignored.
+ *
+ * The caller is responsible for managing its ownership of the SkData.
+ */
+SK_API void SkAnnotateLinkToDestination(SkCanvas*, const SkRect&, SkData*);
+
+
#endif
« no previous file with comments | « gyp/gmslides.gypi ('k') | include/pdf/SkPDFDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698