1 17 18 19 20 package org.apache.fop.pdf; 21 22 36 public class PDFResourceContext extends PDFObject { 37 38 41 protected PDFResources resources; 42 43 46 protected PDFAnnotList annotList; 47 48 52 public PDFResourceContext(PDFResources resources) { 53 54 super(); 55 56 57 this.resources = resources; 59 this.annotList = null; 60 } 61 62 67 public PDFResources getPDFResources() { 68 return this.resources; 69 } 70 71 76 public void addAnnotation(PDFObject annot) { 77 if (this.annotList == null) { 78 this.annotList = getDocument().getFactory().makeAnnotList(); 79 } 80 this.annotList.addAnnot(annot); 81 } 82 83 88 public PDFAnnotList getAnnotations() { 89 return this.annotList; 90 } 91 92 97 public void addGState(PDFGState gstate) { 98 getPDFResources().addGState(gstate); 99 } 100 101 106 public void addShading(PDFShading shading) { 107 getPDFResources().addShading(shading); 108 } 109 110 } 111 | Popular Tags |