00001 //======================================================================== 00002 // 00003 // Annot.h 00004 // 00005 // Copyright 2000-2002 Glyph & Cog, LLC 00006 // 00007 //======================================================================== 00008 00009 #ifndef ANNOT_H 00010 #define ANNOT_H 00011 00012 #ifdef __GNUC__ 00013 #pragma interface 00014 #endif 00015 00016 #include <aconf.h> 00017 00018 class XRef; 00019 class Gfx; 00020 00021 //------------------------------------------------------------------------ 00022 // Annot 00023 //------------------------------------------------------------------------ 00024 00025 class Annot { 00026 public: 00027 00028 Annot(XRef *xrefA, Dict *dict); 00029 ~Annot(); 00030 GBool isOk() { return ok; } 00031 00032 void draw(Gfx *gfx); 00033 00034 // Get appearance object. 00035 Object *getAppearance(Object *obj) { return appearance.fetch(xref, obj); } 00036 00037 private: 00038 00039 XRef *xref; // the xref table for this PDF file 00040 Object appearance; // a reference to the Form XObject stream 00041 // for the normal appearance 00042 fouble xMin, yMin, // annotation rectangle 00043 xMax, yMax; 00044 GBool ok; 00045 }; 00046 00047 //------------------------------------------------------------------------ 00048 // Annots 00049 //------------------------------------------------------------------------ 00050 00051 class Annots { 00052 public: 00053 00054 // Extract non-link annotations from array of annotations. 00055 Annots(XRef *xref, Object *annotsObj); 00056 00057 ~Annots(); 00058 00059 // Iterate through list of annotations. 00060 int getNumAnnots() { return nAnnots; } 00061 Annot *getAnnot(int i) { return annots[i]; } 00062 00063 private: 00064 00065 Annot **annots; 00066 int nAnnots; 00067 }; 00068 00069 #endif
1.4.2