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 ac...@apache.org on 2008/11/20 17:38:47 UTC

svn commit: r719274 [2/2] - in /xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop: afp/ afp/goca/ afp/ioca/ afp/modca/ afp/modca/triplets/ afp/svg/ afp/util/ pdf/ render/afp/ render/pdf/ svg/ util/

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetLineType.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetLineType.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetLineType.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetLineType.java Thu Nov 20 08:38:44 2008
@@ -22,14 +22,10 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.fop.afp.modca.AbstractNamedAFPObject;
-import org.apache.fop.afp.modca.StructuredDataObject;
-
 /**
  * Sets the value of the current line type attribute when stroking GOCA shapes (structured fields)
  */
-public class GraphicsSetLineType extends AbstractNamedAFPObject
-implements StructuredDataObject {
+public class GraphicsSetLineType extends AbstractGraphicsDrawingOrder {
 
     /** the default line type */
     public static final byte DEFAULT = 0x00; // normally SOLID
@@ -78,7 +74,7 @@
     /** {@inheritDoc} */
     public void writeToStream(OutputStream os) throws IOException {
         byte[] data = new byte[] {
-            0x18, // GSLW order code
+            getOrderCode(), // GSLW order code
             type // line type
         };
         os.write(data);
@@ -93,4 +89,9 @@
     public String toString() {
         return "GraphicsSetLineType{type=" + TYPES[type] + "}";
     }
+
+    /** {@inheritDoc} */
+    byte getOrderCode() {
+        return 0x18;
+    }
 }
\ No newline at end of file

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetLineWidth.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetLineWidth.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetLineWidth.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetLineWidth.java Thu Nov 20 08:38:44 2008
@@ -22,13 +22,10 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.fop.afp.modca.AbstractNamedAFPObject;
-import org.apache.fop.afp.modca.StructuredDataObject;
-
 /**
  * Sets the line width to use when stroking GOCA shapes (structured fields)
  */
-public class GraphicsSetLineWidth extends AbstractNamedAFPObject implements StructuredDataObject {
+public class GraphicsSetLineWidth extends AbstractGraphicsDrawingOrder {
 
     /** line width multiplier */
     private int multiplier = 1;
@@ -50,7 +47,7 @@
     /** {@inheritDoc} */
     public void writeToStream(OutputStream os) throws IOException {
         byte[] data = new byte[] {
-           0x19, // GSLW order code
+           getOrderCode(), // GSLW order code
            (byte)multiplier // MH (line-width)
         };
         os.write(data);
@@ -60,4 +57,9 @@
     public String toString() {
         return "GraphicsSetLineWidth{multiplier=" + multiplier + "}";
     }
+
+    /** {@inheritDoc} */
+    byte getOrderCode() {
+        return 0x19;
+    }
 }
\ No newline at end of file

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetMix.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetMix.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetMix.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetMix.java Thu Nov 20 08:38:44 2008
@@ -22,9 +22,10 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.fop.afp.modca.AbstractNamedAFPObject;
-
-public class GraphicsSetMix extends AbstractNamedAFPObject {
+/**
+ * Sets the foreground mix mode.
+ */
+public class GraphicsSetMix extends AbstractGraphicsDrawingOrder {
 
     public static final byte MODE_DEFAULT = 0x00;
     public static final byte MODE_OVERPAINT = 0x02;
@@ -55,4 +56,14 @@
         return "GraphicsSetMix{mode=" + mode + "}";
     }
 
+    /** {@inheritDoc} */
+    byte getOrderCode() {
+        return 0x0C;
+    }
+
+    /** {@inheritDoc} */
+    public int getDataLength() {
+        return 2;
+    }
+
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetPatternSymbol.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetPatternSymbol.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetPatternSymbol.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetPatternSymbol.java Thu Nov 20 08:38:44 2008
@@ -22,14 +22,10 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.fop.afp.modca.AbstractNamedAFPObject;
-import org.apache.fop.afp.modca.StructuredDataObject;
-
 /**
  * Sets the pattern symbol to use when filling following GOCA structured fields
  */
-public class GraphicsSetPatternSymbol extends AbstractNamedAFPObject
-implements StructuredDataObject {
+public class GraphicsSetPatternSymbol extends AbstractGraphicsDrawingOrder {
 
     /** dotted density 1 */
     public static final byte DOTTED_DENSITY_1 = 0x01;
@@ -83,15 +79,15 @@
     public static final byte BLANK = 0x40; // processed same as NO_FILL
 
     /** the graphics pattern symbol to use */
-    private final byte symbol;
+    private final byte pattern;
 
     /**
      * Main constructor
      *
      * @param symb the pattern symbol to use
      */
-    public GraphicsSetPatternSymbol(byte symb) {
-        this.symbol = symb;
+    public GraphicsSetPatternSymbol(byte pattern) {
+        this.pattern = pattern;
     }
 
     /** {@inheritDoc} */
@@ -102,8 +98,8 @@
     /** {@inheritDoc} */
     public void writeToStream(OutputStream os) throws IOException {
         byte[] data = new byte[] {
-            0x28, // GSPT order code
-            symbol
+            getOrderCode(), // GSPT order code
+            pattern
         };
         os.write(data);
     }
@@ -111,6 +107,11 @@
     /** {@inheritDoc} */
     public String toString() {
         return "GraphicsSetPatternSymbol(fill="
-            + (symbol == SOLID_FILL ? true : false)  + ")";
+            + (pattern == SOLID_FILL ? true : false)  + ")";
+    }
+
+    /** {@inheritDoc} */
+    byte getOrderCode() {
+        return 0x28;
     }
 }
\ No newline at end of file

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java Thu Nov 20 08:38:44 2008
@@ -24,14 +24,10 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
-import org.apache.fop.afp.modca.AbstractNamedAFPObject;
-import org.apache.fop.afp.modca.StructuredDataObject;
-
 /**
  * Sets the current processing color for the following GOCA structured fields
  */
-public class GraphicsSetProcessColor extends AbstractNamedAFPObject
-implements StructuredDataObject {
+public class GraphicsSetProcessColor extends AbstractGraphicsDrawingOrder {
 
     private final Color color;
 

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageCellPosition.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageCellPosition.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageCellPosition.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageCellPosition.java Thu Nov 20 08:38:44 2008
@@ -31,38 +31,27 @@
  */
 public class ImageCellPosition extends AbstractAFPObject {
 
-    /**
-     * Offset of image cell in X direction
-     */
+    /** offset of image cell in X direction */
     private int xOffset = 0;
 
-    /**
-     * Offset of image cell in Y direction
-     */
+    /** offset of image cell in Y direction */
     private int yOffset = 0;
 
-    /**
-     * Size of image cell in X direction
-     */
+    /** size of image cell in X direction */
     private final byte[] xSize = new byte[] {(byte)0xFF, (byte)0xFF};
 
-    /**
-     * Size of image cell in Y direction
-     */
+    /** size of image cell in Y direction */
     private final byte[] ySize = new byte[] {(byte)0xFF, (byte)0xFF};
 
-    /**
-     * Size of fill rectangle in X direction
-     */
+    /** size of fill rectangle in X direction */
     private final byte[] xFillSize = new byte[] {(byte)0xFF, (byte)0xFF};
 
-    /**
-     * Size of fill rectangle in Y direction
-     */
+    /** size of fill rectangle in Y direction */
     private final byte[] yFillSize = new byte[] {(byte)0xFF, (byte)0xFF};
 
     /**
-     * Constructor for the ImageCellPosition
+     * Main Constructor
+     *
      * @param x The offset of image cell in X direction
      * @param y The offset of image cell in Y direction
      */

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageContent.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageContent.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageContent.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageContent.java Thu Nov 20 08:38:44 2008
@@ -53,38 +53,26 @@
      */
     public static final byte COMPID_G3_MMR = (byte)0x82;
 
-    /**
-     * The image size parameter
-     */
+    /** the image size parameter */
     private ImageSizeParameter imageSizeParameter = null;
 
-    /**
-     * The image encoding
-     */
+    /** the image encoding */
     private byte encoding = (byte)0x03;
 
-    /**
-     * The image ide size
-     */
+    /** the image ide size */
     private byte size = 1;
 
-    /**
-     * The image compression
-     */
+    /** the image compression */
     private byte compression = (byte)0xC0;
 
-    /**
-     * The image color model
-     */
+    /** the image color model */
     private byte colorModel = (byte)0x01;
 
-    /**
-     * The image data
-     */
+    /** the image data */
     private byte[] data;
 
     /**
-     * Constructor for the image content
+     * Main Constructor
      */
     public ImageContent() {
     }
@@ -169,7 +157,7 @@
                 0x00  // length
             };
             final int lengthOffset = 2;
-            writeChunksToStream(this.data, dataHeader, lengthOffset, MAX_DATA_LEN, os);
+            writeChunksToStream(data, dataHeader, lengthOffset, MAX_DATA_LEN, os);
         }
     }
 

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageInputDescriptor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageInputDescriptor.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageInputDescriptor.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageInputDescriptor.java Thu Nov 20 08:38:44 2008
@@ -32,12 +32,9 @@
  */
 public class ImageInputDescriptor extends AbstractAFPObject {
 
-    /**
-     * The resolution of the raster image (default 240)
-     */
+    /** the resolution of the raster image (default 240) */
     private int resolution = 240;
 
-
     /** {@inheritDoc} */
     public void writeToStream(OutputStream os) throws IOException {
 

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageOutputControl.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageOutputControl.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageOutputControl.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageOutputControl.java Thu Nov 20 08:38:44 2008
@@ -33,9 +33,7 @@
  */
 public class ImageOutputControl extends AbstractAFPObject {
 
-    /**
-     * The orientation of the image
-     */
+    /** the orientation of the image */
     private int orientation = 0;
 
     /**
@@ -50,9 +48,7 @@
      */
     private int yCoord = 0;
 
-    /**
-     * Map an image point to a single presentation device
-     */
+    /** map an image point to a single presentation device */
     private boolean singlePoint = true;
 
     /**

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageRasterData.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageRasterData.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageRasterData.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/ioca/ImageRasterData.java Thu Nov 20 08:38:44 2008
@@ -23,8 +23,6 @@
 import java.io.OutputStream;
 
 import org.apache.fop.afp.modca.AbstractAFPObject;
-import org.apache.fop.afp.modca.AbstractAFPObject.Category;
-import org.apache.fop.afp.modca.AbstractAFPObject.Type;
 import org.apache.fop.afp.util.BinaryUtils;
 
 /**
@@ -49,13 +47,12 @@
  */
 public class ImageRasterData extends AbstractAFPObject {
 
-    /**
-     * The image raster data
-     */
+    /** the image raster data */
     private final byte[] rasterData;
 
     /**
      * Constructor for the image raster data object
+     *
      * @param data The raster image data
      */
     public ImageRasterData(byte[] data) {

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractAFPObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractAFPObject.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractAFPObject.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractAFPObject.java Thu Nov 20 08:38:44 2008
@@ -82,13 +82,13 @@
     }
 
     /**
-     * Help method to write a set of AFPObjects to the AFP datastream.
+     * Writes a collection of Streamable to the AFP Datastream.
      *
      * @param objects a list of AFPObjects
      * @param os The stream to write to
      * @throws java.io.IOException an I/O exception of some sort has occurred.
      */
-    protected void writeObjects(Collection/*<AbstractAFPObject>*/ objects, OutputStream os)
+    protected void writeObjects(Collection/*<Streamable>*/ objects, OutputStream os)
         throws IOException {
         if (objects != null && objects.size() > 0) {
             Iterator it = objects.iterator();
@@ -103,14 +103,14 @@
     }
 
     /**
-     * Reads data chunks from an inputstream
-     * and then formats them with a structured header to a given outputstream
+     * Reads data chunks from an InputStream
+     * and then formats them with a structured header to a given OutputStream
      *
      * @param dataHeader the header data
      * @param lengthOffset offset of length field in data chunk
      * @param maxChunkLength the maximum chunk length
-     * @param inputStream the inputstream to read from
-     * @param outputStream the outputstream to write to
+     * @param inputStream the InputStream to read from
+     * @param outputStream the OutputStream to write to
      * @throws IOException thrown if an I/O exception of some sort has occurred.
      */
     protected static void copyChunks(byte[] dataHeader, int lengthOffset,

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractDataObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractDataObject.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractDataObject.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractDataObject.java Thu Nov 20 08:38:44 2008
@@ -26,13 +26,15 @@
 import org.apache.fop.afp.AFPObjectAreaInfo;
 import org.apache.fop.afp.AFPResourceInfo;
 import org.apache.fop.afp.AFPResourceLevel;
+import org.apache.fop.afp.Completable;
 import org.apache.fop.afp.Factory;
+import org.apache.fop.afp.Startable;
 
 /**
  * Abstract base class used by the ImageObject and GraphicsObject which both
  * have define an ObjectEnvironmentGroup
  */
-public abstract class AbstractDataObject extends AbstractNamedAFPObject {
+public abstract class AbstractDataObject extends AbstractNamedAFPObject implements Startable, Completable {
 
     /** the object environment group */
     protected ObjectEnvironmentGroup objectEnvironmentGroup = null;
@@ -40,6 +42,12 @@
     /** the object factory */
     protected final Factory factory;
 
+    /** the completion status of this object */
+    private boolean complete;
+
+    /** the starting status of this object */
+    private boolean started;
+
     /**
      * Named constructor
      *
@@ -98,11 +106,34 @@
     }
 
     /** {@inheritDoc} */
+    protected void writeStart(OutputStream os) throws IOException {
+        setStarted(true);
+    }
+
+    /** {@inheritDoc} */
     protected void writeContent(OutputStream os) throws IOException {
-        super.writeContent(os); // write triplets
         if (objectEnvironmentGroup != null) {
             objectEnvironmentGroup.writeToStream(os);
         }
     }
 
+    /** {@inheritDoc} */
+    public void setStarted(boolean started) {
+        this.started = started;
+    }
+
+    /** {@inheritDoc} */
+    public boolean isStarted() {
+        return this.started;
+    }
+
+    /** {@inheritDoc} */
+    public void setComplete(boolean complete) {
+        this.complete = complete;
+    }
+
+    /** {@inheritDoc} */
+    public boolean isComplete() {
+        return this.complete;
+    }
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractNamedAFPObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractNamedAFPObject.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractNamedAFPObject.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractNamedAFPObject.java Thu Nov 20 08:38:44 2008
@@ -66,7 +66,7 @@
      *
      * @return the name as a byte array in EBCIDIC encoding
      */
-    protected byte[] getNameBytes() {
+    public byte[] getNameBytes() {
         int afpNameLen = getNameLength();
         int nameLen = name.length();
         if (nameLen < afpNameLen) {
@@ -103,7 +103,16 @@
      * @return the name of this object
      */
     public String getName() {
-        return name;
+        return this.name;
+    }
+
+    /**
+     * Sets the name of this object
+     *
+     * @param name the object name
+     */
+    public void setName(String name) {
+        this.name = name;
     }
 
     /** {@inheritDoc} */

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractPageObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractPageObject.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractPageObject.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractPageObject.java Thu Nov 20 08:38:44 2008
@@ -25,6 +25,7 @@
 
 import org.apache.fop.afp.AFPLineDataInfo;
 import org.apache.fop.afp.AFPTextDataInfo;
+import org.apache.fop.afp.Completable;
 import org.apache.fop.afp.Factory;
 import org.apache.fop.afp.fonts.AFPFont;
 
@@ -48,7 +49,7 @@
  * in page state.
  *
  */
-public abstract class AbstractPageObject extends AbstractNamedAFPObject {
+public abstract class AbstractPageObject extends AbstractNamedAFPObject implements Completable {
 
     /** The active environment group for the page */
     protected ActiveEnvironmentGroup activeEnvironmentGroup = null;
@@ -183,7 +184,7 @@
         if (currentPresentationTextObject != null) {
             currentPresentationTextObject.endControlSequence();
         }
-        complete = true;
+        setComplete(true);
     }
 
     /**
@@ -294,15 +295,6 @@
     }
 
     /**
-     * Returns an indication if the page is complete
-     *
-     * @return whether this page is complete
-     */
-    public boolean isComplete() {
-        return complete;
-    }
-
-    /**
      * Returns the height of the page
      *
      * @return the height of the page
@@ -343,4 +335,14 @@
     public void addObject(Object obj) {
         objects.add(obj);
     }
+
+    /** {@inheritDoc} */
+    public void setComplete(boolean complete) {
+        this.complete = complete;
+    }
+
+    /** {@inheritDoc} */
+    public boolean isComplete() {
+        return this.complete;
+    }
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractResourceGroupContainer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractResourceGroupContainer.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractResourceGroupContainer.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractResourceGroupContainer.java Thu Nov 20 08:38:44 2008
@@ -24,6 +24,7 @@
 import java.util.Collection;
 import java.util.Iterator;
 
+import org.apache.fop.afp.Completable;
 import org.apache.fop.afp.Factory;
 import org.apache.fop.afp.Streamable;
 
@@ -109,7 +110,7 @@
      *
      * @return the resource group in this resource group container
      */
-    protected ResourceGroup getResourceGroup() {
+    public ResourceGroup getResourceGroup() {
         if (resourceGroup == null) {
             resourceGroup = factory.createResourceGroup();
         }
@@ -162,6 +163,6 @@
      * @return true if this object can be written
      */
     protected boolean canWrite(AbstractAFPObject obj) {
-        return obj instanceof AbstractPageObject && ((AbstractPageObject)obj).isComplete();
+        return obj instanceof AbstractPageObject && ((Completable)obj).isComplete();
     }
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractTripletStructuredObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractTripletStructuredObject.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractTripletStructuredObject.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/AbstractTripletStructuredObject.java Thu Nov 20 08:38:44 2008
@@ -31,6 +31,9 @@
 import org.apache.fop.afp.modca.triplets.FullyQualifiedNameTriplet;
 import org.apache.fop.afp.modca.triplets.ObjectClassificationTriplet;
 
+/**
+ * A MODCA structured object base class providing support for Triplets
+ */
 public class AbstractTripletStructuredObject extends AbstractStructuredObject {
 
     /** list of object triplets */

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/Document.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/Document.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/Document.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/Document.java Thu Nov 20 08:38:44 2008
@@ -69,11 +69,7 @@
         complete = true;
     }
 
-    /**
-     * Returns an indication if the page group is complete
-     *
-     * @return whether or not this page group is complete
-     */
+    /** {@inheritDoc} */
     public boolean isComplete() {
         return complete;
     }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/GraphicsObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/GraphicsObject.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/GraphicsObject.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/GraphicsObject.java Thu Nov 20 08:38:44 2008
@@ -22,18 +22,24 @@
 import java.awt.Color;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.util.Iterator;
 import java.util.List;
 
 import org.apache.fop.afp.AFPDataObjectInfo;
 import org.apache.fop.afp.AFPObjectAreaInfo;
+import org.apache.fop.afp.Completable;
 import org.apache.fop.afp.Factory;
+import org.apache.fop.afp.StructuredData;
+import org.apache.fop.afp.goca.GraphicsAreaBegin;
+import org.apache.fop.afp.goca.GraphicsAreaEnd;
 import org.apache.fop.afp.goca.GraphicsBox;
+import org.apache.fop.afp.goca.GraphicsChainedSegment;
+import org.apache.fop.afp.goca.GraphicsCharacterString;
 import org.apache.fop.afp.goca.GraphicsData;
 import org.apache.fop.afp.goca.GraphicsFillet;
-import org.apache.fop.afp.goca.GraphicsFilletRelative;
 import org.apache.fop.afp.goca.GraphicsFullArc;
+import org.apache.fop.afp.goca.GraphicsImage;
 import org.apache.fop.afp.goca.GraphicsLine;
-import org.apache.fop.afp.goca.GraphicsLineRelative;
 import org.apache.fop.afp.goca.GraphicsSetArcParameters;
 import org.apache.fop.afp.goca.GraphicsSetCharacterSet;
 import org.apache.fop.afp.goca.GraphicsSetCurrentPosition;
@@ -41,7 +47,6 @@
 import org.apache.fop.afp.goca.GraphicsSetLineWidth;
 import org.apache.fop.afp.goca.GraphicsSetPatternSymbol;
 import org.apache.fop.afp.goca.GraphicsSetProcessColor;
-import org.apache.fop.afp.goca.GraphicsString;
 
 /**
  * Top-level GOCA graphics object.
@@ -51,12 +56,27 @@
 public class GraphicsObject extends AbstractDataObject {
 
     /** The graphics data */
-    private GraphicsData data = null;
+    private GraphicsData currentData = null;
 
     /** list of objects contained within this container */
     protected List/*<GraphicsDrawingOrder>*/ objects
         = new java.util.ArrayList/*<GraphicsDrawingOrder>*/();
 
+    /** the current color */
+    private Color currentColor;
+
+    /** the current line type */
+    private byte currentLineType;
+
+    /** the current line width */
+    private int currentLineWidth;
+
+    /** the current fill pattern */
+    private byte currentPatternSymbol;
+
+    /** the current character set */
+    private int currentCharacterSet;
+
     /**
      * Default constructor
      *
@@ -85,13 +105,18 @@
     }
 
     /** {@inheritDoc} */
-    public void addObject(StructuredDataObject drawingOrder) {
-        if (data == null
-                || (data.getDataLength() + drawingOrder.getDataLength())
-                >= GraphicsData.MAX_DATA_LEN) {
+    public void addObject(StructuredData object) {
+        if (currentData == null) {
             newData();
+        } else if (currentData.getDataLength() + object.getDataLength()
+                >= GraphicsData.MAX_DATA_LEN) {
+            // graphics data full so transfer current incomplete segment to new data
+            GraphicsChainedSegment currentSegment
+                = (GraphicsChainedSegment)currentData.removeCurrentSegment();
+            currentSegment.setName(newData().createSegmentName());
+            currentData.addSegment(currentSegment);
         }
-        data.addObject(drawingOrder);
+        currentData.addObject(object);
     }
 
     /**
@@ -100,10 +125,10 @@
      * @return the current graphics data
      */
     private GraphicsData getData() {
-        if (this.data == null) {
+        if (this.currentData == null) {
             return newData();
         }
-        return this.data;
+        return this.currentData;
     }
 
     /**
@@ -112,9 +137,12 @@
      * @return a newly created graphics data
      */
     private GraphicsData newData() {
-        this.data = factory.createGraphicsData();
-        objects.add(data);
-        return data;
+        if (currentData != null) {
+            currentData.setComplete(true);
+        }
+        this.currentData = factory.createGraphicsData();
+        objects.add(currentData);
+        return currentData;
     }
 
     /**
@@ -123,7 +151,10 @@
      * @param color the active color to use
      */
     public void setColor(Color color) {
-        addObject(new GraphicsSetProcessColor(color));
+        if (!color.equals(currentColor)) {
+            this.currentColor = color;
+            addObject(new GraphicsSetProcessColor(color));
+        }
     }
 
     /**
@@ -138,43 +169,60 @@
     /**
      * Sets the line width
      *
-     * @param multiplier the line width multiplier
+     * @param lineWidth the line width multiplier
      */
-    public void setLineWidth(int multiplier) {
-        GraphicsSetLineWidth graphicsSetLineWidth = new GraphicsSetLineWidth(multiplier);
-        addObject(graphicsSetLineWidth);
+    public void setLineWidth(int lineWidth) {
+        if (lineWidth != currentLineWidth) {
+            currentLineWidth = lineWidth;
+            addObject(new GraphicsSetLineWidth(lineWidth));
+        }
     }
 
     /**
      * Sets the line type
      *
-     * @param type the line type
+     * @param lineType the line type
      */
-    public void setLineType(byte type) {
-        GraphicsSetLineType graphicsSetLineType = new GraphicsSetLineType(type);
-        addObject(graphicsSetLineType);
+    public void setLineType(byte lineType) {
+        if (lineType != currentLineType) {
+            currentLineType = lineType;
+            addObject(new GraphicsSetLineType(lineType));
+        }
     }
 
     /**
-     * Sets whether to fill the next shape
+     * Sets whether the following shape is to be filled
      *
-     * @param fill whether to fill the next shape
+     * @param fill true if the following shape is to be filled
      */
     public void setFill(boolean fill) {
-        GraphicsSetPatternSymbol graphicsSetPattern = new GraphicsSetPatternSymbol(
-                fill ? GraphicsSetPatternSymbol.SOLID_FILL
-                     : GraphicsSetPatternSymbol.NO_FILL
-        );
-        addObject(graphicsSetPattern);
+        setPatternSymbol(fill ?
+                GraphicsSetPatternSymbol.SOLID_FILL :
+                    GraphicsSetPatternSymbol.NO_FILL);
+    }
+
+    /**
+     * Sets the fill pattern of the next shape
+     *
+     * @param the fill pattern of the next shape
+     */
+    public void setPatternSymbol(byte patternSymbol) {
+        if (currentPatternSymbol != patternSymbol) {
+            currentPatternSymbol = patternSymbol;
+            addObject(new GraphicsSetPatternSymbol(patternSymbol));
+        }
     }
 
     /**
      * Sets the character set to use
      *
-     * @param fontReference the character set (font) reference
+     * @param characterSet the character set (font) reference
      */
-    public void setCharacterSet(int fontReference) {
-        addObject(new GraphicsSetCharacterSet(fontReference));
+    public void setCharacterSet(int characterSet) {
+        if (currentCharacterSet != characterSet) {
+            currentCharacterSet = characterSet;
+            addObject(new GraphicsSetCharacterSet(characterSet));
+        }
     }
 
     /**
@@ -193,11 +241,7 @@
      * @param relative relative true for a line at current position (relative to)
      */
     public void addLine(int[] coords, boolean relative) {
-        if (relative) {
-            addObject(new GraphicsLineRelative(coords));
-        } else {
-            addObject(new GraphicsLine(coords));
-        }
+        addObject(new GraphicsLine(coords, relative));
     }
 
     /**
@@ -222,14 +266,10 @@
      * Adds a fillet (curve) at the given coordinates
      *
      * @param coords the x/y coordinates
-     * @param relative relative true for a fillet at current position (relative to)
+     * @param relative relative true for a fillet (curve) at current position (relative to)
      */
     public void addFillet(int[] coords, boolean relative) {
-        if (relative) {
-            addObject(new GraphicsFilletRelative(coords));
-        } else {
-            addObject(new GraphicsFillet(coords));
-        }
+        addObject(new GraphicsFillet(coords, relative));
     }
 
     /**
@@ -245,7 +285,7 @@
     }
 
     /**
-     * Adds an arc
+     * Adds a full arc
      *
      * @param x the x coordinate
      * @param y the y coordinate
@@ -256,18 +296,18 @@
         addObject(new GraphicsFullArc(x, y, mh, mhr));
     }
 
-//    /**
-//     * Adds an image
-//     *
-//     * @param x the x coordinate
-//     * @param y the y coordinate
-//     * @param width the image width
-//     * @param height the image height
-//     * @param imgData the image data
-//     */
-//    public void addImage(int x, int y, int width, int height, byte[] imgData) {
-//        addObject(new GraphicsImage(x, y, width, height, imgData));
-//    }
+    /**
+     * Adds an image
+     *
+     * @param x the x coordinate
+     * @param y the y coordinate
+     * @param width the image width
+     * @param height the image height
+     * @param imgData the image data
+     */
+    public void addImage(int x, int y, int width, int height, byte[] imgData) {
+        addObject(new GraphicsImage(x, y, width, height, imgData));
+    }
 
     /**
      * Adds a string
@@ -277,26 +317,21 @@
      * @param y the y coordinate
      */
     public void addString(String str, int x, int y) {
-        addObject(new GraphicsString(str, x, y));
+        addObject(new GraphicsCharacterString(str, x, y));
     }
 
     /**
      * Begins a graphics area (start of fill)
      */
     public void beginArea() {
-        if (data == null) {
-            newData();
-        }
-        data.beginArea();
+        addObject(new GraphicsAreaBegin());
     }
 
     /**
      * Ends a graphics area (end of fill)
      */
     public void endArea() {
-        if (data != null) {
-            data.endArea();
-        }
+        addObject(new GraphicsAreaEnd());
     }
 
     /** {@inheritDoc} */
@@ -312,7 +347,18 @@
     }
 
     /** {@inheritDoc} */
+    public void setComplete(boolean complete) {
+        Iterator it = objects.iterator();
+        while (it.hasNext()) {
+            Completable completedObject = (Completable)it.next();
+            completedObject.setComplete(true);
+        }
+        super.setComplete(complete);
+    }
+
+    /** {@inheritDoc} */
     protected void writeStart(OutputStream os) throws IOException {
+        super.writeStart(os);
         byte[] data = new byte[17];
         copySF(data, Type.BEGIN, Category.GRAPHICS);
         os.write(data);
@@ -321,7 +367,7 @@
     /** {@inheritDoc} */
     protected void writeContent(OutputStream os) throws IOException {
         super.writeContent(os);
-        super.writeObjects(objects, os);
+        writeObjects(objects, os);
     }
 
     /** {@inheritDoc} */

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/MapCodedFont.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/MapCodedFont.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/MapCodedFont.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/MapCodedFont.java Thu Nov 20 08:38:44 2008
@@ -43,14 +43,12 @@
  */
 public class MapCodedFont extends AbstractStructuredObject {
 
-    /**
-     * The collection of map coded fonts (maximum of 254)
-     */
+    /** the collection of map coded fonts (maximum of 254) */
     private final List/*<FontDefinition>*/ fontList
         = new java.util.ArrayList/*<FontDefinition>*/();
 
     /**
-     * Constructor for the MapCodedFont
+     * Main constructor
      */
     public MapCodedFont() {
     }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/ObjectEnvironmentGroup.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/ObjectEnvironmentGroup.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/ObjectEnvironmentGroup.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/ObjectEnvironmentGroup.java Thu Nov 20 08:38:44 2008
@@ -38,13 +38,13 @@
 public final class ObjectEnvironmentGroup extends AbstractNamedAFPObject {
 
     /** the PresentationEnvironmentControl for the object environment group */
-    private PresentationEnvironmentControl presentationEnvironmentControl = null;
+    private PresentationEnvironmentControl presentationEnvironmentControl;
 
     /** the ObjectAreaDescriptor for the object environment group */
-    private ObjectAreaDescriptor objectAreaDescriptor = null;
+    private ObjectAreaDescriptor objectAreaDescriptor;
 
     /** the ObjectAreaPosition for the object environment group */
-    private ObjectAreaPosition objectAreaPosition = null;
+    private ObjectAreaPosition objectAreaPosition;
 
     /** the DataDescriptor for the object environment group */
     private AbstractDescriptor dataDescriptor;
@@ -95,6 +95,8 @@
         data[2] = len[1];
 
         os.write(data);
+
+        writeTriplets(os);
     }
 
     /** {@inheritDoc} */

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/PageGroup.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/PageGroup.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/PageGroup.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/PageGroup.java Thu Nov 20 08:38:44 2008
@@ -74,7 +74,7 @@
     /**
      * Method to mark the end of the page group.
      */
-    protected void endPageGroup() {
+    public void endPageGroup() {
         complete = true;
     }
 

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/ResourceEnvironmentGroup.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/ResourceEnvironmentGroup.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/ResourceEnvironmentGroup.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/ResourceEnvironmentGroup.java Thu Nov 20 08:38:44 2008
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -23,34 +23,27 @@
 import java.io.OutputStream;
 import java.util.List;
 
+import org.apache.fop.afp.Completable;
+
 /**
  * A Resource Environment Group contains a set of resources for a document
  * or for a group of pages in a document.
  */
-public class ResourceEnvironmentGroup extends AbstractEnvironmentGroup {
-    /**
-     * Default name for the resource group
-     */
+public class ResourceEnvironmentGroup extends AbstractEnvironmentGroup implements Completable {
+
+    /** default name for the resource group */
     private static final String DEFAULT_NAME = "REG00001";
 
-    /**
-     * The maps data resources contained in this resource environment group
-     */
+    /** the maps data resources contained in this resource environment group */
     private List/*<MapDataResource>*/ mapDataResources = null;
-    
-    /**
-     * The maps page overlays contained in this resource environment group
-     */
+
+    /** the maps page overlays contained in this resource environment group */
     private List mapPageOverlays = null;
-    
-    /**
-     * The pre-process presentation objects contained in this resource environment group
-     */
+
+    /** the pre-process presentation objects contained in this resource environment group */
     private List/*<PreprocessPresentationObject>*/ preProcessPresentationObjects = null;
 
-    /**
-     * The resource environment group state
-     */
+    /** the resource environment group state */
     private boolean complete = false;
 
     /**
@@ -100,16 +93,7 @@
 //        createOverlay(obj.get);
 //        getPreprocessPresentationObjects().add(new PreprocessPresentationObject(obj));
 //    }
-        
-    /**
-     * Returns an indication if the resource environment group is complete
-     * 
-     * @return whether or not this resource environment group is complete or not
-     */
-    public boolean isComplete() {
-        return complete;
-    }
-    
+
     /** {@inheritDoc} */
     protected void writeStart(OutputStream os) throws IOException {
         byte[] data = new byte[17];
@@ -131,4 +115,14 @@
         writeObjects(preProcessPresentationObjects, os);
     }
 
+    /** {@inheritDoc} */
+    public void setComplete(boolean complete) {
+        this.complete = complete;
+    }
+
+    /** {@inheritDoc} */
+    public boolean isComplete() {
+        return complete;
+    }
+
 }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/StreamedResourceGroup.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/StreamedResourceGroup.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/StreamedResourceGroup.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/StreamedResourceGroup.java Thu Nov 20 08:38:44 2008
@@ -22,10 +22,12 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
+import org.apache.fop.afp.Completable;
+
 /**
  * A print-file resource group
  */
-public class StreamedResourceGroup extends ResourceGroup {
+public class StreamedResourceGroup extends ResourceGroup implements Completable {
     /** the outputstream to write to */
     private final OutputStream os;
 
@@ -73,15 +75,6 @@
     }
 
     /**
-     * Returns true if this resource group is complete
-     *
-     * @return true if this resource group is complete
-     */
-    public boolean isComplete() {
-        return this.complete;
-    }
-
-    /**
      * Returns the outputstream
      *
      * @return the outputstream
@@ -89,4 +82,15 @@
     public OutputStream getOutputStream() {
         return this.os;
     }
+
+    /** {@inheritDoc} */
+    public void setComplete(boolean complete) {
+        this.complete = complete;
+    }
+
+    /** {@inheritDoc} */
+    public boolean isComplete() {
+        return this.complete;
+    }
+
 }
\ No newline at end of file

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/triplets/AbstractTriplet.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/triplets/AbstractTriplet.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/triplets/AbstractTriplet.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/triplets/AbstractTriplet.java Thu Nov 20 08:38:44 2008
@@ -20,12 +20,12 @@
 package org.apache.fop.afp.modca.triplets;
 
 import org.apache.fop.afp.Streamable;
-import org.apache.fop.afp.modca.StructuredDataObject;
+import org.apache.fop.afp.StructuredData;
 
 /**
  * A simple implementation of a MOD:CA triplet
  */
-public abstract class AbstractTriplet implements Streamable, StructuredDataObject {
+public abstract class AbstractTriplet implements Streamable, StructuredData {
     public static final byte CODED_GRAPHIC_CHARACTER_SET_GLOBAL_IDENTIFIER = 0x01;
 
     /** Triplet identifiers */

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/triplets/DescriptorPositionTriplet.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/triplets/DescriptorPositionTriplet.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/triplets/DescriptorPositionTriplet.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/triplets/DescriptorPositionTriplet.java Thu Nov 20 08:38:44 2008
@@ -22,6 +22,9 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
+/**
+ * Associates an ObjectAreaPosition with and ObjectAreaDescriptor structured field
+ */
 public class DescriptorPositionTriplet extends AbstractTriplet {
 
     private final byte oapId;

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/triplets/ResourceObjectTypeTriplet.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/triplets/ResourceObjectTypeTriplet.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/triplets/ResourceObjectTypeTriplet.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/modca/triplets/ResourceObjectTypeTriplet.java Thu Nov 20 08:38:44 2008
@@ -22,7 +22,7 @@
 import java.io.IOException;
 import java.io.OutputStream;
 
-/** resource object type triplet */
+/** A Resource Object Type Triplet */
 public class ResourceObjectTypeTriplet extends AbstractTriplet {
 
     private static final byte RESOURCE_OBJECT = 0x21;

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/svg/AFPBridgeContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/svg/AFPBridgeContext.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/svg/AFPBridgeContext.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/svg/AFPBridgeContext.java Thu Nov 20 08:38:44 2008
@@ -31,6 +31,9 @@
 import org.apache.xmlgraphics.image.loader.ImageManager;
 import org.apache.xmlgraphics.image.loader.ImageSessionContext;
 
+/**
+ * An AFP specific implementation of a Batik BridgeContext
+ */
 public class AFPBridgeContext extends AbstractFOPBridgeContext {
 
     private final AFPGraphics2D g2d;

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/svg/AFPImageElementBridge.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/svg/AFPImageElementBridge.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/svg/AFPImageElementBridge.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/svg/AFPImageElementBridge.java Thu Nov 20 08:38:44 2008
@@ -22,6 +22,9 @@
 import org.apache.fop.svg.AbstractFOPImageElementBridge;
 import org.apache.xmlgraphics.image.loader.ImageFlavor;
 
+/**
+ * An AFP specific implementation of a Batik SVGImageElementBridge
+ */
 public class AFPImageElementBridge extends AbstractFOPImageElementBridge {
 
     private final ImageFlavor[] supportedFlavors = new ImageFlavor[]

Added: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/svg/package.html
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/svg/package.html?rev=719274&view=auto
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/svg/package.html (added)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/svg/package.html Thu Nov 20 08:38:44 2008
@@ -0,0 +1,23 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id: package.html 643433 2008-04-01 15:08:24Z acumiskey $ -->
+<HTML>
+<TITLE>org.apache.fop.afp.modca.svg Package</TITLE>
+<BODY>
+<P>Contains a collection of AFP specific Batik bridges.</P>
+</BODY>
+</HTML>
\ No newline at end of file

Added: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/util/package.html
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/util/package.html?rev=719274&view=auto
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/util/package.html (added)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/afp/util/package.html Thu Nov 20 08:38:44 2008
@@ -0,0 +1,23 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<!-- $Id: package.html 643433 2008-04-01 15:08:24Z acumiskey $ -->
+<HTML>
+<TITLE>org.apache.fop.afp.modca.triplets Package</TITLE>
+<BODY>
+<P>Contains a collection of useful AFP utility classes.</P>
+</BODY>
+</HTML>
\ No newline at end of file

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFPaintingState.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFPaintingState.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFPaintingState.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/pdf/PDFPaintingState.java Thu Nov 20 08:38:44 2008
@@ -170,7 +170,7 @@
      * This call should be used when the q operator is used
      * so that the state is known when popped.
      */
-    public void push() {
+    public void save() {
         AbstractData data = getData();
         AbstractData copy = (AbstractData)data.clone();
         data.clearTransform();

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPGraphics2DAdapter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPGraphics2DAdapter.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPGraphics2DAdapter.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPGraphics2DAdapter.java Thu Nov 20 08:38:44 2008
@@ -61,7 +61,7 @@
         final boolean textAsShapes = false;
         AFPGraphics2D g2d = afpInfo.createGraphics2D(textAsShapes);
 
-        paintingState.push();
+        paintingState.save();
 
         //Fallback solution: Paint to a BufferedImage
         if (afpInfo.paintAsBitmap()) {
@@ -95,7 +95,7 @@
             resourceManager.createObject(graphicsObjectInfo);
         }
 
-        paintingState.pop();
+        paintingState.restore();
     }
 
     /** {@inheritDoc} */

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPInfo.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPInfo.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPInfo.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPInfo.java Thu Nov 20 08:38:44 2008
@@ -215,10 +215,10 @@
     /**
      * Sets the AFP state
      *
-     * @param state the AFP state
+     * @param paintingState the AFP state
      */
-    public void setPaintingState(AFPPaintingState state) {
-        this.paintingState = state;
+    public void setPaintingState(AFPPaintingState paintingState) {
+        this.paintingState = paintingState;
     }
 
     /**

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPRenderer.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPRenderer.java Thu Nov 20 08:38:44 2008
@@ -41,13 +41,13 @@
 import org.apache.fop.afp.AFPResourceManager;
 import org.apache.fop.afp.AFPTextDataInfo;
 import org.apache.fop.afp.AFPUnitConverter;
-import org.apache.fop.afp.BorderPaintInfo;
-import org.apache.fop.afp.RectanglePaintInfo;
+import org.apache.fop.afp.BorderPaintingInfo;
+import org.apache.fop.afp.DataStream;
+import org.apache.fop.afp.RectanglePaintingInfo;
 import org.apache.fop.afp.fonts.AFPFont;
 import org.apache.fop.afp.fonts.AFPFontAttributes;
 import org.apache.fop.afp.fonts.AFPFontCollection;
 import org.apache.fop.afp.fonts.AFPPageFonts;
-import org.apache.fop.afp.modca.DataStream;
 import org.apache.fop.afp.modca.PageObject;
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
@@ -171,9 +171,9 @@
      */
     public AFPRenderer() {
         super();
+        this.imageHandlerRegistry = new AFPImageHandlerRegistry();
         this.resourceManager = new AFPResourceManager();
         this.paintingState = new AFPPaintingState();
-        this.imageHandlerRegistry = new AFPImageHandlerRegistry();
         this.unitConv = paintingState.getUnitConverter();
     }
 
@@ -335,13 +335,13 @@
     /** {@inheritDoc} */
     public void drawBorderLine(float x1, float y1, float x2, float y2,
             boolean horz, boolean startOrBefore, int style, Color col) {
-        BorderPaintInfo borderPaintInfo = new BorderPaintInfo(x1, y1, x2, y2, horz, style, col);
+        BorderPaintingInfo borderPaintInfo = new BorderPaintingInfo(x1, y1, x2, y2, horz, style, col);
         borderPainter.paint(borderPaintInfo);
     }
 
     /** {@inheritDoc} */
     public void fillRect(float x, float y, float width, float height) {
-        RectanglePaintInfo rectanglePaintInfo = new RectanglePaintInfo(x, y, width, height);
+        RectanglePaintingInfo rectanglePaintInfo = new RectanglePaintingInfo(x, y, width, height);
         rectanglePainter.paint(rectanglePaintInfo);
     }
 
@@ -485,23 +485,23 @@
     /** {@inheritDoc} */
     public void restoreStateStackAfterBreakOut(List breakOutList) {
         log.debug("Block.FIXED --> restoring context after break-out");
-        paintingState.pushAll(breakOutList);
+        paintingState.saveAll(breakOutList);
     }
 
     /** {@inheritDoc} */
     protected List breakOutOfStateStack() {
         log.debug("Block.FIXED --> break out");
-        return paintingState.popAll();
+        return paintingState.restoreAll();
     }
 
     /** {@inheritDoc} */
     public void saveGraphicsState() {
-        paintingState.push();
+        paintingState.save();
     }
 
     /** {@inheritDoc} */
     public void restoreGraphicsState() {
-        paintingState.pop();
+        paintingState.restore();
     }
 
     /** {@inheritDoc} */

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPSVGHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPSVGHandler.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPSVGHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/afp/AFPSVGHandler.java Thu Nov 20 08:38:44 2008
@@ -125,7 +125,7 @@
         int height = afpInfo.getHeight();
         int resolution = afpInfo.getResolution();
 
-        paintingState.push(); // save
+        paintingState.save(); // save
 
         AFPObjectAreaInfo objectAreaInfo
             = createObjectAreaInfo(paintingState, x, y, width, height, resolution);
@@ -140,7 +140,7 @@
         AFPResourceManager resourceManager = afpInfo.getResourceManager();
         resourceManager.createObject(graphicsObjectInfo);
 
-        paintingState.pop(); // resume
+        paintingState.restore(); // resume
     }
 
     private AFPObjectAreaInfo createObjectAreaInfo(AFPPaintingState paintingState,

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/pdf/PDFRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/pdf/PDFRenderer.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/pdf/PDFRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/pdf/PDFRenderer.java Thu Nov 20 08:38:44 2008
@@ -640,7 +640,7 @@
     /** {@inheritDoc} */
     protected void saveGraphicsState() {
         endTextObject();
-        paintingState.push();
+        paintingState.save();
         currentStream.add("q\n");
     }
 
@@ -648,7 +648,7 @@
         endTextObject();
         currentStream.add("Q\n");
         if (popState) {
-            paintingState.pop();
+            paintingState.restore();
         }
     }
 
@@ -1099,7 +1099,7 @@
         AbstractPaintingState.AbstractData data;
         while (true) {
             data = paintingState.getData();
-            if (paintingState.pop() == null) {
+            if (paintingState.restore() == null) {
                 break;
             }
             if (breakOutList.size() == 0) {
@@ -1747,7 +1747,7 @@
     public void renderLeader(Leader area) {
         renderInlineAreaBackAndBorders(area);
 
-        paintingState.push();
+        paintingState.save();
         saveGraphicsState();
         int style = area.getRuleStyle();
         float startx = (currentIPPosition + area.getBorderAndPaddingWidthStart()) / 1000f;
@@ -1805,7 +1805,7 @@
         }
 
         restoreGraphicsState();
-        paintingState.pop();
+        paintingState.restore();
         beginTextObject();
         super.renderLeader(area);
     }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/pdf/PDFSVGHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/pdf/PDFSVGHandler.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/pdf/PDFSVGHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/render/pdf/PDFSVGHandler.java Thu Nov 20 08:38:44 2008
@@ -243,7 +243,7 @@
         pdfInfo.currentStream.add("%SVG start\n");
 
         //Save state and update coordinate system for the SVG image
-        pdfInfo.pdfPaintingState.push();
+        pdfInfo.pdfPaintingState.save();
         pdfInfo.pdfPaintingState.concatenate(imageTransform);
 
         //Now that we have the complete transformation matrix for the image, we can update the
@@ -262,7 +262,7 @@
                     context.getUserAgent().getEventBroadcaster());
             eventProducer.svgRenderingError(this, e, getDocumentURI(doc));
         }
-        pdfInfo.pdfPaintingState.pop();
+        pdfInfo.pdfPaintingState.restore();
         renderer.restoreGraphicsState();
         pdfInfo.currentStream.add("%SVG end\n");
     }

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/AbstractFOPBridgeContext.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/AbstractFOPBridgeContext.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/AbstractFOPBridgeContext.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/AbstractFOPBridgeContext.java Thu Nov 20 08:38:44 2008
@@ -30,6 +30,9 @@
 import org.apache.xmlgraphics.image.loader.ImageManager;
 import org.apache.xmlgraphics.image.loader.ImageSessionContext;
 
+/**
+ * A FOP base implementation of a Batik BridgeContext.
+ */
 public abstract class AbstractFOPBridgeContext extends BridgeContext {
 
     /** The font list. */

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFGraphics2D.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFGraphics2D.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFGraphics2D.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/svg/PDFGraphics2D.java Thu Nov 20 08:38:44 2008
@@ -608,7 +608,7 @@
 
         if (newClip || newTransform) {
             currentStream.write("q\n");
-            paintingState.push();
+            paintingState.save();
             if (newTransform) {
                 concatMatrix(tranvals);
             }
@@ -634,7 +634,7 @@
 
                 if (newClip || newTransform) {
                     currentStream.write("Q\n");
-                    paintingState.pop();
+                    paintingState.restore();
                 }
                 return;
             }
@@ -646,7 +646,7 @@
         doDrawing(false, true, false);
         if (newClip || newTransform) {
             currentStream.write("Q\n");
-            paintingState.pop();
+            paintingState.restore();
         }
     }
 
@@ -1614,7 +1614,7 @@
 
         if (newClip || newTransform) {
             currentStream.write("q\n");
-            paintingState.push();
+            paintingState.save();
             if (newTransform) {
                 concatMatrix(tranvals);
             }
@@ -1638,7 +1638,7 @@
 
                 if (newClip || newTransform) {
                     currentStream.write("Q\n");
-                    paintingState.pop();
+                    paintingState.restore();
                 }
                 return;
             }
@@ -1651,7 +1651,7 @@
                   iter.getWindingRule() == PathIterator.WIND_EVEN_ODD);
         if (newClip || newTransform) {
             currentStream.write("Q\n");
-            paintingState.pop();
+            paintingState.restore();
         }
     }
 

Modified: xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/util/AbstractPaintingState.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/util/AbstractPaintingState.java?rev=719274&r1=719273&r2=719274&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/util/AbstractPaintingState.java (original)
+++ xmlgraphics/fop/branches/Temp_AFPGOCAResources/src/java/org/apache/fop/util/AbstractPaintingState.java Thu Nov 20 08:38:44 2008
@@ -28,9 +28,8 @@
 import java.util.List;
 import java.util.Stack;
 
-
 /**
- * A base class which holds information about the current rendering state.
+ * A base class which holds information about the current painting state.
  */
 public abstract class AbstractPaintingState implements Cloneable, Serializable {
 
@@ -278,23 +277,23 @@
 
 
     /**
-     * Push the current painting state onto the stack.
+     * Save the current painting state.
+     * This pushes the current painting state onto the stack.
      * This call should be used when the Q operator is used
      * so that the state is known when popped.
      */
-    public void push() {
+    public void save() {
         AbstractData copy = (AbstractData)getData().clone();
         stateStack.push(copy);
     }
 
     /**
-     * Pop the painting state from the stack and set current values to popped state.
-     * This should be called when a Q operator is used so
-     * the state is restored to the correct values.
+     * Restore the current painting state.
+     * This pops the painting state from the stack and sets current values to popped state.
      *
      * @return the restored state, null if the stack is empty
      */
-    public AbstractData pop() {
+    public AbstractData restore() {
         if (!stateStack.isEmpty()) {
             setData((AbstractData)stateStack.pop());
             return this.data;
@@ -304,30 +303,32 @@
     }
 
     /**
-     * Pushes all painting state data in the given list to the stack
+     * Save all painting state data.
+     * This pushes all painting state data in the given list to the stack
      *
      * @param dataList a state data list
      */
-    public void pushAll(List/*<AbstractData>*/ dataList) {
+    public void saveAll(List/*<AbstractData>*/ dataList) {
         Iterator it = dataList.iterator();
         while (it.hasNext()) {
             // save current data on stack
-            push();
+            save();
             setData((AbstractData)it.next());
         }
     }
 
     /**
-     * Pops all painting state data from the stack
+     * Restore all painting state data.
+     * This pops all painting state data from the stack
      *
      * @return a list of state data popped from the stack
      */
-    public List/*<AbstractData>*/ popAll() {
+    public List/*<AbstractData>*/ restoreAll() {
         List/*<AbstractData>*/ dataList = new java.util.ArrayList/*<AbstractData>*/();
         AbstractData data;
         while (true) {
             data = getData();
-            if (pop() == null) {
+            if (restore() == null) {
                 break;
             }
             // insert because of stack-popping



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org