blob: 092b6133432d8db2e3c5ef2bc48c82725b06e14a (
plain)
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
71
72
73
74
75
76
77
78
79
80
81
|
//========================================================================
//
// Annot.h
//
// Copyright 2000-2003 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); }
// Get subtype object
Object *getSubtype(Object *obj) {return subtype.copy(obj); };
// Get dictionary
Dict *getDict() {return dict; };
// Get annot appearance ID
int getRefNum() {return appearance.getRefNum();};
int getRefGen() {return appearance.getRefGen();};
private:
XRef *xref; // the xref table for this PDF file
Dict *dict;
Object subtype;
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
|