[poppler] [PATCH] Initial support for transitions

Jeff Muizelaar jrmuizel at nit.ca
Wed Mar 30 10:55:06 PST 2005


Pretty straightforward. Doesn't actually export them in a useful way
yet, just builds some infrastructure.

-Jeff


diff -X /home/jrmuizel/rsrc/autoignore -urN poppler/poppler/Page.cc poppler-qt-new/poppler/Page.cc
--- poppler/poppler/Page.cc	2005-03-30 12:19:16.000000000 -0500
+++ poppler-qt-new/poppler/Page.cc	2005-03-30 13:52:44.000000000 -0500
@@ -186,6 +186,14 @@
   // get attributes
   attrs = attrsA;
 
+  // transtion
+  pageDict->lookupNF("Trans", &trans);
+  if (!(trans.isDict() || trans.isNull())) {
+    error(-1, "Page transition object (page %d) is wrong type (%s)",
+	  num, trans.getTypeName());
+    trans.free();
+  }
+
   // annotations
   pageDict->lookupNF("Annots", &annots);
   if (!(annots.isRef() || annots.isArray() || annots.isNull())) {
@@ -215,6 +223,8 @@
   
   return;
 
+ err3:
+  trans.initNull();
  err2:
   annots.initNull();
  err1:
diff -X /home/jrmuizel/rsrc/autoignore -urN poppler/poppler/Page.h poppler-qt-new/poppler/Page.h
--- poppler/poppler/Page.h	2005-03-30 12:19:16.000000000 -0500
+++ poppler-qt-new/poppler/Page.h	2005-03-30 12:14:26.000000000 -0500
@@ -144,6 +144,9 @@
   Object *getThumb(Object *obj) { return thumb.fetch(xref, obj); }
   GBool loadThumb(unsigned char **data, int *width, int *height, int *rowstride);
 
+  // Get transition.
+  Object *getTrans(Object *obj) { return trans.fetch(xref, obj); }
+
   // Display a page.
   void display(OutputDev *out, double hDPI, double vDPI,
 	       int rotate, GBool crop,
@@ -171,6 +174,7 @@
   Object annots;		// annotations array
   Object contents;		// page contents
   Object thumb;			// page thumbnail
+  Object trans;			// page transition
   GBool ok;			// true if page is valid
 };
 


More information about the poppler mailing list