1 51 package org.apache.fop.svg; 52 53 import java.awt.geom.AffineTransform ; 54 55 import org.apache.batik.bridge.*; 56 57 import org.apache.batik.gvt.GraphicsNode; 58 59 import org.w3c.dom.Element ; 60 import org.w3c.dom.svg.SVGAElement; 61 62 67 public class PDFAElementBridge extends AbstractGraphicsNodeBridge { 68 AffineTransform transform; 69 70 73 public PDFAElementBridge() {} 74 75 public void setCurrentTransform(AffineTransform tf) { 76 transform = tf; 77 } 78 79 82 public String getLocalName() { 83 return SVG_A_TAG; 84 } 85 86 89 protected GraphicsNode instantiateGraphicsNode() { 90 return new PDFANode(); 91 } 92 93 101 public GraphicsNode createGraphicsNode(BridgeContext ctx, Element e) { 102 PDFANode aNode = (PDFANode)super.createGraphicsNode(ctx, e); 103 aNode.setDestination(((SVGAElement)e).getHref().getBaseVal()); 104 aNode.setTransform(transform); 105 return aNode; 106 } 107 108 111 public boolean isComposite() { 112 return true; 113 } 114 115 } 116 | Popular Tags |