[FOray-commit] SF.net SVN: foray: [9837] trunk/foray
Modular XSL-FO Implementation for Java.
Status: Alpha
Brought to you by:
victormote
|
From: <vic...@us...> - 2007-06-22 21:24:41
|
Revision: 9837
http://svn.sourceforge.net/foray/?rev=9837&view=rev
Author: victormote
Date: 2007-06-22 14:24:42 -0700 (Fri, 22 Jun 2007)
Log Message:
-----------
1. Conform to axsl changes removing the resetGraphicsState() method from PDFDocument.
2. Move management of the graphics state from the document to the content stream.
Modified Paths:
--------------
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFContentStream.java
trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java
trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFContentStream.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFContentStream.java 2007-06-22 20:59:07 UTC (rev 9836)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFContentStream.java 2007-06-22 21:24:42 UTC (rev 9837)
@@ -49,7 +49,8 @@
public class PDFContentStream extends PDFStream
implements org.axsl.pdfW.PDFContentStream {
- /** The page this content stream is attached to. */
+ /** The current graphics state. */
+ private PDFGraphicsState currentGraphicsState = new PDFGraphicsState();
/** State variable indicating whether a text object is currently open. */
private boolean textObjectOpen = false;
@@ -67,7 +68,7 @@
* @return The graphic state.
*/
private PDFGraphicsState getGS() {
- return this.getPDFDocument().getCurrentGraphicsState();
+ return this.currentGraphicsState;
}
/**
Modified: trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java
===================================================================
--- trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java 2007-06-22 20:59:07 UTC (rev 9836)
+++ trunk/foray/foray-pdf/src/java/org/foray/pdf/object/PDFDocument.java 2007-06-22 21:24:42 UTC (rev 9837)
@@ -36,8 +36,6 @@
package org.foray.pdf.object;
-import org.foray.pdf.PDFGraphicsState;
-
import org.axsl.fontR.Font;
import org.axsl.fontR.FontUse;
import org.axsl.pdfW.PDFPage;
@@ -136,9 +134,6 @@
/** The colorspace for this document. */
private ColorSpace colorspace = ColorSpace.getInstance(ColorSpace.CS_sRGB);
- /** The current graphic state for this document. */
- private PDFGraphicsState currentGraphicsState;
-
/** The counter for Pattern name numbering. */
private int lastPatternAssigned = 0;
@@ -222,9 +217,6 @@
this.info = new PDFInfo(this);
registerIndirectObjectLast(this.info);
- // Make the current Graphics State
- this.currentGraphicsState = new PDFGraphicsState();
-
this.defaultBorderStyle = new PDFBorderStyle(this, 0,
PDFBorderStyle.Style.SOLID);
}
@@ -586,14 +578,6 @@
}
/**
- * Return the graphics state associated with this document.
- * @return The graphics state.
- */
- public PDFGraphicsState getCurrentGraphicsState() {
- return this.currentGraphicsState;
- }
-
- /**
* If a PDFXObject has already been created for a given URL, return that
* PDFXObject so that it can be reused.
* @param url The URL for whom a PDFXObject is sought.
@@ -705,13 +689,6 @@
/**
* {@inheritDoc}
*/
- public void resetGraphicsState() {
- this.getCurrentGraphicsState().reset();
- }
-
- /**
- * {@inheritDoc}
- */
public PDFEncryption createPDFEncryption() {
if (this.encryption == null) {
this.encryption = new org.foray.pdf.object.PDFEncryption(this);
Modified: trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java
===================================================================
--- trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java 2007-06-22 20:59:07 UTC (rev 9836)
+++ trunk/foray/foray-render/src/java/org/foray/render/pdf/PDFRenderer.java 2007-06-22 21:24:42 UTC (rev 9837)
@@ -434,7 +434,6 @@
currentPage = this.pdfDoc.createPDFPage(
Math.round(w / WKConstants.MILLIPOINTS_PER_POINT),
Math.round(h / WKConstants.MILLIPOINTS_PER_POINT));
- this.getPDFDocument().resetGraphicsState();
renderRegions(page);
getContentStream().close();
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|