aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core
diff options
context:
space:
mode:
authorGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-08 09:09:10 +0000
committerGravatar epoger@google.com <epoger@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-03-08 09:09:10 +0000
commitb58772f86659cfe0e8d9247fcee878dddd8fdad9 (patch)
tree78c54090d70af79ab206ef5137833c0703874203 /include/core
parent754a3eb73b796398062f09cc98eae224262a3bc8 (diff)
PDF: add support for named destinations.
Landing patchset 7 from https://codereview.appspot.com/7374052 for dml@google.com Review URL: https://codereview.chromium.org/12533009 git-svn-id: http://skia.googlecode.com/svn/trunk@8034 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'include/core')
-rw-r--r--include/core/SkAnnotation.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/include/core/SkAnnotation.h b/include/core/SkAnnotation.h
index e1ecf6caf1..18ee1cd1a6 100644
--- a/include/core/SkAnnotation.h
+++ b/include/core/SkAnnotation.h
@@ -14,6 +14,7 @@ class SkData;
class SkDataSet;
class SkStream;
class SkWStream;
+struct SkPoint;
/**
* Experimental class for annotating draws. Do not use directly yet.
@@ -64,6 +65,18 @@ public:
* 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 @@ class SkCanvas;
*/
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