[FOray-commit] SF.net SVN: foray: [10242] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2007-10-05 17:24:53
|
Revision: 10242
http://foray.svn.sourceforge.net/foray/?rev=10242&view=rev
Author: victormote
Date: 2007-10-05 10:24:57 -0700 (Fri, 05 Oct 2007)
Log Message:
-----------
Conform to axsl method name changes and additional exceptions thrown.
Modified Paths:
--------------
trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormSvg.java
trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java
trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java
Modified: trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java
===================================================================
--- trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java 2007-10-05 16:18:09 UTC (rev 10241)
+++ trunk/foray/foray-graphic/src/java/org/foray/graphic/SVGGraphic.java 2007-10-05 17:24:57 UTC (rev 10242)
@@ -240,7 +240,7 @@
/**
* {@inheritDoc}
*/
- public void awtPaint(final Graphics2D graphics,
+ public void drawGraphics2D(final Graphics2D graphics,
final Rectangle2D.Float contentRectangle,
final Rectangle2D.Float clipRectangle, final int pageHeight) {
SVGDocument svgDocument;
@@ -372,7 +372,7 @@
/**
* {@inheritDoc}
*/
- public void drawPdfStreamContent(final OutputStream output,
+ public void drawPdf(final OutputStream output,
final GraphicPdfContext pdfContext,
final FontConsumer fontConsumer, final boolean strokeText)
throws GraphicException {
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormSvg.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormSvg.java 2007-10-05 16:18:09 UTC (rev 10241)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFXFormSvg.java 2007-10-05 17:24:57 UTC (rev 10242)
@@ -77,7 +77,7 @@
*/
protected byte[] getPdfContent() throws GraphicException {
final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
- this.graphic.drawPdfStreamContent(outputStream, this.getPDFDocument(),
+ this.graphic.drawPdf(outputStream, this.getPDFDocument(),
this.fontConsumer, this.strokeText);
return outputStream.toByteArray();
}
Modified: trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java 2007-10-05 16:18:09 UTC (rev 10241)
+++ trunk/foray/foray-render/src/java/org/foray/render/awt/AWTRenderer.java 2007-10-05 17:24:57 UTC (rev 10242)
@@ -57,6 +57,7 @@
import org.axsl.galley.Page;
import org.axsl.galley.TextArea;
import org.axsl.graphic.Graphic;
+import org.axsl.graphic.GraphicException;
import org.axsl.graphic.SvgGraphic;
import org.axsl.output.OutputException;
@@ -742,8 +743,12 @@
protected void renderSVGDocument(final SvgGraphic graphic,
final Rectangle2D.Float contentRectangle,
final Rectangle2D.Float clipRectangle) {
- graphic.awtPaint(this.graphics, contentRectangle, clipRectangle,
- this.pageHeight);
+ try {
+ graphic.drawGraphics2D(this.graphics, contentRectangle,
+ clipRectangle, this.pageHeight);
+ } catch (final GraphicException e) {
+ /* TODO: Consider logging/displaying a warning. */
+ }
}
/**
Modified: trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java 2007-10-05 16:18:09 UTC (rev 10241)
+++ trunk/foray/foray-render/src/java/org/foray/render/ps/PSRenderer.java 2007-10-05 17:24:57 UTC (rev 10242)
@@ -552,8 +552,12 @@
+ " translate");
this.write(sx * at.getScaleX() + " " + sy * at.getScaleY()
+ " scale");
- svgGraphic.drawPs(this.getOutputStream(), this.getFontConsumer(), false,
- this.enableComments);
+ try {
+ svgGraphic.drawPs(this.getOutputStream(), this.getFontConsumer(),
+ false, this.enableComments);
+ } catch (final GraphicException e) {
+ /* TODO: Consider logging a warning. */
+ }
this.write("grestore");
this.comment("% --- SVG Area end");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|