| 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;
|
| };
|
|
|