aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-08-21 14:20:34 +0000
committerJeremias Maerki <jeremias@apache.org>2005-08-21 14:20:34 +0000
commit25bb4c9e9b82bcc40c977762fab8dc7c3e5e33d8 (patch)
treed57d00128a48b130865829f715c43c74d8930451 /src/java/org
parentc3163d170fca3666ef270d4612f78377e88a3880 (diff)
downloadxmlgraphics-fop-25bb4c9e9b82bcc40c977762fab8dc7c3e5e33d8.tar.gz
xmlgraphics-fop-25bb4c9e9b82bcc40c977762fab8dc7c3e5e33d8.zip
Rename PDFXMLHandler to what it really is: an SVGHandler.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@234207 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/render/java2d/Java2DRenderer.java28
-rw-r--r--src/java/org/apache/fop/render/pdf/PDFRenderer.java30
-rw-r--r--src/java/org/apache/fop/render/pdf/PDFSVGHandler.java (renamed from src/java/org/apache/fop/render/pdf/PDFXMLHandler.java)9
3 files changed, 33 insertions, 34 deletions
diff --git a/src/java/org/apache/fop/render/java2d/Java2DRenderer.java b/src/java/org/apache/fop/render/java2d/Java2DRenderer.java
index b4a8fdbf2..b807d8ced 100644
--- a/src/java/org/apache/fop/render/java2d/Java2DRenderer.java
+++ b/src/java/org/apache/fop/render/java2d/Java2DRenderer.java
@@ -1050,24 +1050,24 @@ public abstract class Java2DRenderer extends AbstractRenderer implements Printab
context.setUserAgent(userAgent);
// TODO implement
/*
- * context.setProperty(PDFXMLHandler.PDF_DOCUMENT, pdfDoc);
- * context.setProperty(PDFXMLHandler.OUTPUT_STREAM, ostream);
- * context.setProperty(PDFXMLHandler.PDF_STATE, currentState);
- * context.setProperty(PDFXMLHandler.PDF_PAGE, currentPage);
- * context.setProperty(PDFXMLHandler.PDF_CONTEXT, currentContext == null ?
+ * context.setProperty(PDFSVGHandler.PDF_DOCUMENT, pdfDoc);
+ * context.setProperty(PDFSVGHandler.OUTPUT_STREAM, ostream);
+ * context.setProperty(PDFSVGHandler.PDF_STATE, currentState);
+ * context.setProperty(PDFSVGHandler.PDF_PAGE, currentPage);
+ * context.setProperty(PDFSVGHandler.PDF_CONTEXT, currentContext == null ?
* currentPage : currentContext);
- * context.setProperty(PDFXMLHandler.PDF_CONTEXT, currentContext);
- * context.setProperty(PDFXMLHandler.PDF_STREAM, currentStream);
- * context.setProperty(PDFXMLHandler.PDF_XPOS, new
+ * context.setProperty(PDFSVGHandler.PDF_CONTEXT, currentContext);
+ * context.setProperty(PDFSVGHandler.PDF_STREAM, currentStream);
+ * context.setProperty(PDFSVGHandler.PDF_XPOS, new
* Integer(currentIPPosition + (int) pos.getX()));
- * context.setProperty(PDFXMLHandler.PDF_YPOS, new
+ * context.setProperty(PDFSVGHandler.PDF_YPOS, new
* Integer(currentBPPosition + (int) pos.getY()));
- * context.setProperty(PDFXMLHandler.PDF_FONT_INFO, fontInfo);
- * context.setProperty(PDFXMLHandler.PDF_FONT_NAME, currentFontName);
- * context.setProperty(PDFXMLHandler.PDF_FONT_SIZE, new
+ * context.setProperty(PDFSVGHandler.PDF_FONT_INFO, fontInfo);
+ * context.setProperty(PDFSVGHandler.PDF_FONT_NAME, currentFontName);
+ * context.setProperty(PDFSVGHandler.PDF_FONT_SIZE, new
* Integer(currentFontSize));
- * context.setProperty(PDFXMLHandler.PDF_WIDTH, new Integer((int)
- * pos.getWidth())); context.setProperty(PDFXMLHandler.PDF_HEIGHT, new
+ * context.setProperty(PDFSVGHandler.PDF_WIDTH, new Integer((int)
+ * pos.getWidth())); context.setProperty(PDFSVGHandler.PDF_HEIGHT, new
* Integer((int) pos.getHeight())); renderXML(userAgent, context, doc,
* ns);
*/
diff --git a/src/java/org/apache/fop/render/pdf/PDFRenderer.java b/src/java/org/apache/fop/render/pdf/PDFRenderer.java
index 500baf3da..c8b188242 100644
--- a/src/java/org/apache/fop/render/pdf/PDFRenderer.java
+++ b/src/java/org/apache/fop/render/pdf/PDFRenderer.java
@@ -238,7 +238,7 @@ public class PDFRenderer extends AbstractPathOrientedRenderer {
*/
public void setUserAgent(FOUserAgent agent) {
super.setUserAgent(agent);
- PDFXMLHandler xmlHandler = new PDFXMLHandler();
+ PDFSVGHandler xmlHandler = new PDFSVGHandler();
userAgent.getXMLHandlerRegistry().addXMLHandler(xmlHandler);
}
@@ -1477,25 +1477,25 @@ public class PDFRenderer extends AbstractPathOrientedRenderer {
context = new RendererContext(this, MIME_TYPE);
context.setUserAgent(userAgent);
- context.setProperty(PDFXMLHandler.PDF_DOCUMENT, pdfDoc);
- context.setProperty(PDFXMLHandler.OUTPUT_STREAM, ostream);
- context.setProperty(PDFXMLHandler.PDF_STATE, currentState);
- context.setProperty(PDFXMLHandler.PDF_PAGE, currentPage);
- context.setProperty(PDFXMLHandler.PDF_CONTEXT,
+ context.setProperty(PDFSVGHandler.PDF_DOCUMENT, pdfDoc);
+ context.setProperty(PDFSVGHandler.OUTPUT_STREAM, ostream);
+ context.setProperty(PDFSVGHandler.PDF_STATE, currentState);
+ context.setProperty(PDFSVGHandler.PDF_PAGE, currentPage);
+ context.setProperty(PDFSVGHandler.PDF_CONTEXT,
currentContext == null ? currentPage : currentContext);
- context.setProperty(PDFXMLHandler.PDF_CONTEXT, currentContext);
- context.setProperty(PDFXMLHandler.PDF_STREAM, currentStream);
- context.setProperty(PDFXMLHandler.PDF_XPOS,
+ context.setProperty(PDFSVGHandler.PDF_CONTEXT, currentContext);
+ context.setProperty(PDFSVGHandler.PDF_STREAM, currentStream);
+ context.setProperty(PDFSVGHandler.PDF_XPOS,
new Integer(currentIPPosition + (int) pos.getX()));
- context.setProperty(PDFXMLHandler.PDF_YPOS,
+ context.setProperty(PDFSVGHandler.PDF_YPOS,
new Integer(currentBPPosition + (int) pos.getY()));
- context.setProperty(PDFXMLHandler.PDF_FONT_INFO, fontInfo);
- context.setProperty(PDFXMLHandler.PDF_FONT_NAME, currentFontName);
- context.setProperty(PDFXMLHandler.PDF_FONT_SIZE,
+ context.setProperty(PDFSVGHandler.PDF_FONT_INFO, fontInfo);
+ context.setProperty(PDFSVGHandler.PDF_FONT_NAME, currentFontName);
+ context.setProperty(PDFSVGHandler.PDF_FONT_SIZE,
new Integer(currentFontSize));
- context.setProperty(PDFXMLHandler.PDF_WIDTH,
+ context.setProperty(PDFSVGHandler.PDF_WIDTH,
new Integer((int) pos.getWidth()));
- context.setProperty(PDFXMLHandler.PDF_HEIGHT,
+ context.setProperty(PDFSVGHandler.PDF_HEIGHT,
new Integer((int) pos.getHeight()));
renderXML(context, doc, ns);
diff --git a/src/java/org/apache/fop/render/pdf/PDFXMLHandler.java b/src/java/org/apache/fop/render/pdf/PDFSVGHandler.java
index 665d359a5..545562981 100644
--- a/src/java/org/apache/fop/render/pdf/PDFXMLHandler.java
+++ b/src/java/org/apache/fop/render/pdf/PDFSVGHandler.java
@@ -56,17 +56,17 @@ import java.awt.Color;
import java.awt.geom.AffineTransform;
/**
- * PDF XML handler.
+ * PDF XML handler for SVG (uses Apache Batik).
* This handler handles XML for foreign objects when rendering to PDF.
* It renders SVG to the PDF document using the PDFGraphics2D.
* The properties from the PDF renderer are subject to change.
*/
-public class PDFXMLHandler implements XMLHandler {
+public class PDFSVGHandler implements XMLHandler {
/**
* logging instance
*/
- private Log log = LogFactory.getLog(PDFXMLHandler.class);
+ private Log log = LogFactory.getLog(PDFSVGHandler.class);
/**
* The PDF document that is being drawn into.
@@ -136,7 +136,7 @@ public class PDFXMLHandler implements XMLHandler {
/**
* Create a new PDF XML handler for use by the PDF renderer.
*/
- public PDFXMLHandler() {
+ public PDFSVGHandler() {
}
/** @see org.apache.fop.render.XMLHandler */
@@ -148,7 +148,6 @@ public class PDFXMLHandler implements XMLHandler {
if (svg.equals(ns)) {
SVGHandler svghandler = new SVGHandler();
svghandler.renderSVGDocument(context, doc, pdfi);
- } else {
}
}