1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
|
// -*- C++ -*-
//========================================================================
//
// Annot.h
//
// Copyright 2000-2002 Glyph & Cog, LLC
//
//========================================================================
#ifndef ANNOT_H
#define ANNOT_H
#include "aconf.h"
#ifdef USE_GCC_PRAGMAS
#pragma interface
#endif
class XRef;
class Gfx;
//------------------------------------------------------------------------
// Annot
//------------------------------------------------------------------------
class Annot {
public:
Annot(XRef *xrefA, Dict *dict);
~Annot();
GBool isOk() { return ok; }
void draw(Gfx *gfx);
// Get appearance object.
Object *getAppearance(Object *obj) { return appearance.fetch(xref, obj); }
private:
XRef *xref; // the xref table for this PDF file
Object appearance; // a reference to the Form XObject stream
// for the normal appearance
double xMin, yMin, // annotation rectangle
xMax, yMax;
GBool ok;
};
//------------------------------------------------------------------------
// Annots
//------------------------------------------------------------------------
class Annots {
public:
// Extract non-link annotations from array of annotations.
Annots(XRef *xref, Object *annotsObj);
~Annots();
// Iterate through list of annotations.
int getNumAnnots() { return nAnnots; }
Annot *getAnnot(int i) { return annots[i]; }
private:
Annot **annots;
int nAnnots;
};
#endif
|