| Index: include/core/SkAnnotation.h
|
| diff --git a/include/core/SkAnnotation.h b/include/core/SkAnnotation.h
|
| index 80503c78d21dad490662cceda0e50de35d4cd3a5..2ea66d37ac4f0f2f35ab2f59a0023872de651026 100644
|
| --- a/include/core/SkAnnotation.h
|
| +++ b/include/core/SkAnnotation.h
|
| @@ -1,3 +1,4 @@
|
| +
|
| /*
|
| * Copyright 2012 Google Inc.
|
| *
|
| @@ -8,83 +9,21 @@
|
| #ifndef SkAnnotation_DEFINED
|
| #define SkAnnotation_DEFINED
|
|
|
| -#include "SkRefCnt.h"
|
| -#include "SkString.h"
|
| #include "SkTypes.h"
|
|
|
| +// for chrome in PrintContextTest.cpp
|
| +#define SK_SUPPORT_NEW_ANNOTATION_CANVAS_VIRTUAL
|
| +
|
| class SkData;
|
| -class SkReadBuffer;
|
| -class SkWriteBuffer;
|
| struct SkPoint;
|
| -
|
| -/**
|
| - * Experimental class for annotating draws. Do not use directly yet.
|
| - * Use helper functions at the bottom of this file for now.
|
| - */
|
| -class SkAnnotation : public SkRefCnt {
|
| -public:
|
| - virtual ~SkAnnotation();
|
| -
|
| - static SkAnnotation* Create(const char key[], SkData* value) {
|
| - return new SkAnnotation(key, value);
|
| - }
|
| -
|
| - static SkAnnotation* Create(SkReadBuffer& buffer) { return new SkAnnotation(buffer); }
|
| -
|
| - /**
|
| - * Return the data for the specified key, or NULL.
|
| - */
|
| - SkData* find(const char key[]) const;
|
| -
|
| - void writeToBuffer(SkWriteBuffer&) const;
|
| -
|
| -private:
|
| - SkAnnotation(const char key[], SkData* value);
|
| - SkAnnotation(SkReadBuffer&);
|
| -
|
| - SkString fKey;
|
| - SkData* fData;
|
| -
|
| - typedef SkRefCnt INHERITED;
|
| -};
|
| -
|
| -/**
|
| - * Experimental collection of predefined Keys into the Annotation dictionary
|
| - */
|
| -class SkAnnotationKeys {
|
| -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();
|
| -};
|
| -
|
| -///////////////////////////////////////////////////////////////////////////////
|
| -//
|
| -// Experimental helper functions to use Annotations
|
| -//
|
| -
|
| struct SkRect;
|
| class SkCanvas;
|
|
|
| /**
|
| - * Experimental!
|
| - *
|
| * Annotate the canvas by associating the specified URL with the
|
| - * specified rectangle (in local coordinates, just like drawRect). If the
|
| - * backend of this canvas does not support annotations, this call is
|
| + * specified rectangle (in local coordinates, just like drawRect).
|
| + *
|
| + * 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.
|
| @@ -92,8 +31,6 @@ 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
|
| @@ -104,8 +41,6 @@ SK_API void SkAnnotateRectWithURL(SkCanvas*, const SkRect&, SkData*);
|
| SK_API void SkAnnotateNamedDestination(SkCanvas*, const SkPoint&, SkData*);
|
|
|
| /**
|
| - * Experimental!
|
| - *
|
| * Annotate the canvas by making the specified rectangle link to a named
|
| * destination.
|
| *
|
| @@ -116,5 +51,4 @@ SK_API void SkAnnotateNamedDestination(SkCanvas*, const SkPoint&, SkData*);
|
| */
|
| SK_API void SkAnnotateLinkToDestination(SkCanvas*, const SkRect&, SkData*);
|
|
|
| -
|
| #endif
|
|
|