upgrade to xpdf 3.00.
[swftools.git] / pdf2swf / xpdf / Annot.h
blob89dde0f90f17a012493b1998d4d69621a36d391d
1 //========================================================================
2 //
3 // Annot.h
4 //
5 // Copyright 2000-2003 Glyph & Cog, LLC
6 //
7 //========================================================================
9 #ifndef ANNOT_H
10 #define ANNOT_H
12 #include <aconf.h>
14 #ifdef USE_GCC_PRAGMAS
15 #pragma interface
16 #endif
18 class XRef;
19 class Gfx;
21 //------------------------------------------------------------------------
22 // Annot
23 //------------------------------------------------------------------------
25 class Annot {
26 public:
28 Annot(XRef *xrefA, Dict *dict);
29 ~Annot();
30 GBool isOk() { return ok; }
32 void draw(Gfx *gfx);
34 // Get appearance object.
35 Object *getAppearance(Object *obj) { return appearance.fetch(xref, obj); }
37 private:
39 XRef *xref; // the xref table for this PDF file
40 Object appearance; // a reference to the Form XObject stream
41 // for the normal appearance
42 double xMin, yMin, // annotation rectangle
43 xMax, yMax;
44 GBool ok;
47 //------------------------------------------------------------------------
48 // Annots
49 //------------------------------------------------------------------------
51 class Annots {
52 public:
54 // Extract non-link annotations from array of annotations.
55 Annots(XRef *xref, Object *annotsObj);
57 ~Annots();
59 // Iterate through list of annotations.
60 int getNumAnnots() { return nAnnots; }
61 Annot *getAnnot(int i) { return annots[i]; }
63 private:
65 Annot **annots;
66 int nAnnots;
69 #endif