diff options
author | Adrian Cumiskey <acumiskey@apache.org> | 2008-06-03 11:12:52 +0000 |
---|---|---|
committer | Adrian Cumiskey <acumiskey@apache.org> | 2008-06-03 11:12:52 +0000 |
commit | 46d76cd4f13d9da7216c4ce15359f6c75c2e00bb (patch) | |
tree | 920096acb894779dc021b59600dd7b98cd22e5ab /src/java/org/apache/fop/render/afp/AFPState.java | |
parent | 62c1b6c60d102e2737c19e58b39b6eccecfdd37e (diff) | |
download | xmlgraphics-fop-46d76cd4f13d9da7216c4ce15359f6c75c2e00bb.tar.gz xmlgraphics-fop-46d76cd4f13d9da7216c4ce15359f6c75c2e00bb.zip |
Moved image uri storing from AbstractGenericSVGHandler to AFPState as requested/suggested :).
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@662738 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/afp/AFPState.java')
-rw-r--r-- | src/java/org/apache/fop/render/afp/AFPState.java | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/render/afp/AFPState.java b/src/java/org/apache/fop/render/afp/AFPState.java index 5977d0de2..7c28e8bf0 100644 --- a/src/java/org/apache/fop/render/afp/AFPState.java +++ b/src/java/org/apache/fop/render/afp/AFPState.java @@ -20,7 +20,6 @@ package org.apache.fop.render.afp; import java.awt.Color; -import java.awt.geom.AffineTransform; import java.io.Serializable; import java.util.Arrays; import java.util.List; @@ -188,6 +187,27 @@ public class AFPState { } /** + * Sets the image uri of the current image being processed + * @param uri the image uri of the current image being processed + * @return true if the image uri has changed + */ + public boolean setImageUri(String uri) { + if (!uri.equals(getData().imageUri)) { + getData().imageUri = uri; + return true; + } + return false; + } + + /** + * Returns the image uri of the current image being processed + * @return the image uri of the current image being processed + */ + protected String getImageUri() { + return getData().imageUri; + } + + /** * Push the current state onto the stack. * This call should be used when the q operator is used * so that the state is known when popped. @@ -234,6 +254,7 @@ public class AFPState { return data; } + /** the state data instance */ public class Data implements Cloneable, Serializable { private static final long serialVersionUID = -1789481244175275686L; @@ -261,6 +282,9 @@ public class AFPState { /** The fonts on the current page */ private AFPPageFonts pageFonts = null; + /** The current image uri */ + private String imageUri = null; + /** {@inheritDoc} */ public Object clone() throws CloneNotSupportedException { Data obj = new Data(); @@ -272,7 +296,21 @@ public class AFPState { obj.dashArray = this.dashArray; obj.filled = this.filled; obj.pageFonts = this.pageFonts; + obj.imageUri = this.imageUri; return obj; } + + /** {@inheritDoc} */ + public String toString() { + return "color=" + color + + ", backColor=" + backColor + + ", fontName=" + fontName + + ", fontSize=" + fontSize + + ", lineWidth=" + lineWidth + + ", dashArray=" + dashArray + + ", filled=" + filled + + ", pageFonts=" + pageFonts + + ", imageUri=" + imageUri; + } } }
\ No newline at end of file |