You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2005/08/21 16:20:41 UTC
svn commit: r234207 - in
/xmlgraphics/fop/trunk/src/java/org/apache/fop/render:
java2d/Java2DRenderer.java pdf/PDFRenderer.java pdf/PDFSVGHandler.java
pdf/PDFXMLHandler.java
Author: jeremias
Date: Sun Aug 21 07:20:34 2005
New Revision: 234207
URL: http://svn.apache.org/viewcvs?rev=234207&view=rev
Log:
Rename PDFXMLHandler to what it really is: an SVGHandler.
Added:
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFSVGHandler.java
- copied, changed from r232959, xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFXMLHandler.java
Removed:
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFXMLHandler.java
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/java2d/Java2DRenderer.java
xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/java2d/Java2DRenderer.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/java2d/Java2DRenderer.java?rev=234207&r1=234206&r2=234207&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/java2d/Java2DRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/java2d/Java2DRenderer.java Sun Aug 21 07:20:34 2005
@@ -1050,24 +1050,24 @@
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);
*/
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java?rev=234207&r1=234206&r2=234207&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFRenderer.java Sun Aug 21 07:20:34 2005
@@ -238,7 +238,7 @@
*/
public void setUserAgent(FOUserAgent agent) {
super.setUserAgent(agent);
- PDFXMLHandler xmlHandler = new PDFXMLHandler();
+ PDFSVGHandler xmlHandler = new PDFSVGHandler();
userAgent.getXMLHandlerRegistry().addXMLHandler(xmlHandler);
}
@@ -1477,25 +1477,25 @@
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);
Copied: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFSVGHandler.java (from r232959, xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFXMLHandler.java)
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFSVGHandler.java?p2=xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFSVGHandler.java&p1=xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFXMLHandler.java&r1=232959&r2=234207&rev=234207&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFXMLHandler.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/pdf/PDFSVGHandler.java Sun Aug 21 07:20:34 2005
@@ -56,17 +56,17 @@
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 @@
/**
* 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 @@
if (svg.equals(ns)) {
SVGHandler svghandler = new SVGHandler();
svghandler.renderSVGDocument(context, doc, pdfi);
- } else {
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org