aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/svg/PDFTextElementBridge.java
diff options
context:
space:
mode:
authorAdrian Cumiskey <acumiskey@apache.org>2008-11-13 16:11:58 +0000
committerAdrian Cumiskey <acumiskey@apache.org>2008-11-13 16:11:58 +0000
commitf637010908d0898b6f7f40843c4bfa2d37daabc0 (patch)
tree6966dec8cc50e5133d958498859f69b4399e074d /src/java/org/apache/fop/svg/PDFTextElementBridge.java
parentc4b1cf56cd9fa706a20765ad2078e040eb4c67bc (diff)
downloadxmlgraphics-fop-f637010908d0898b6f7f40843c4bfa2d37daabc0.tar.gz
xmlgraphics-fop-f637010908d0898b6f7f40843c4bfa2d37daabc0.zip
* PDFImageHandler interface split into ImageHandler and PDFImageHandler.
* Deleted AFPDataObjectInfoProvider and AFPImage*Factory implementations, and abstracted AbstractImageHandlerRegistry from PDFImageHandlerRegistry, creating AFPImageHandlerRegistry and AFPImageHandler so there is a common reuse of image handling implementation between AFP and PDF now. * RendererContext instantiation is now overridable in PrintRenderer. * Created AFPRendererContext that is able to provide AFPInfo. * toString() added to RendererContext for ease of use. * Removed GraphicsObjectPainterAFP. * Added package.html for AFP (sub)packages. * Abstracted AbstractFOPBridgeContext from PDFBridgeContext and provided AFPBridgeContext implementation. * Abstracted AbstractFOPTextElementBridge from PDFTextElementBridge and provided AFPTextElementBridge implementation. * Abstracted AbstractFOPImageElementBridge from PDFImageElementBridge and provided AFPImageElementBridge implementation. * Provided inline image support/handling in AFPGraphics2D for SVG. * Created NativeImageHandler interface. * Fix for path iterator filled line drawing in AFPGraphics2D adding coordinate drawing implementations GraphicsLineRelative and GraphicsFilletRelative (Thanks for the patch Jeremias). * Improved configuration.xml documentation for images mode/native setting in AFP renderer configuration. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@713747 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/svg/PDFTextElementBridge.java')
-rw-r--r--src/java/org/apache/fop/svg/PDFTextElementBridge.java42
1 files changed, 5 insertions, 37 deletions
diff --git a/src/java/org/apache/fop/svg/PDFTextElementBridge.java b/src/java/org/apache/fop/svg/PDFTextElementBridge.java
index 4c11aa97e..c983d2b45 100644
--- a/src/java/org/apache/fop/svg/PDFTextElementBridge.java
+++ b/src/java/org/apache/fop/svg/PDFTextElementBridge.java
@@ -19,13 +19,7 @@
package org.apache.fop.svg;
-import org.apache.batik.bridge.BridgeContext;
-import org.apache.batik.bridge.SVGTextElementBridge;
-import org.apache.batik.gvt.GraphicsNode;
-import org.apache.batik.gvt.TextNode;
import org.apache.batik.gvt.TextPainter;
-import org.apache.fop.fonts.FontInfo;
-import org.w3c.dom.Element;
/**
* Bridge class for the &lt;text> element.
@@ -34,41 +28,15 @@ import org.w3c.dom.Element;
*
* @author <a href="mailto:keiron@aftexsw.com">Keiron Liddle</a>
*/
-public class PDFTextElementBridge extends SVGTextElementBridge {
-
- private PDFTextPainter pdfTextPainter;
+public class PDFTextElementBridge extends AbstractFOPTextElementBridge {
/**
* Constructs a new bridge for the &lt;text> element.
- * @param fi the font information
- */
- public PDFTextElementBridge(FontInfo fi) {
- pdfTextPainter = new PDFTextPainter(fi);
- }
-
- /**
- * Create a text element bridge.
- * This set the text painter on the node if the text is simple.
- * @param ctx the bridge context
- * @param e the svg element
- * @return the text graphics node created by the super class
+ *
+ * @param textPainter the text painter to use
*/
- public GraphicsNode createGraphicsNode(BridgeContext ctx, Element e) {
- GraphicsNode node = super.createGraphicsNode(ctx, e);
- if (node != null) {
- //Set our own text painter
- ((TextNode)node).setTextPainter(getTextPainter());
- }
- return node;
+ public PDFTextElementBridge(TextPainter textPainter) {
+ super(textPainter);
}
-
- /**
- * Returns the TextPainter instance used by this bridge.
- * @return the text painter
- */
- public TextPainter getTextPainter() {
- return pdfTextPainter;
- }
-
}