aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2002-11-06 15:07:04 +0000
committerKeiron Liddle <keiron@apache.org>2002-11-06 15:07:04 +0000
commitf86105b454926d89670e35c54c0905fd6764f5f6 (patch)
treebecb3d9d9e0e18904cee602ebba0398cbf13c1e1 /src
parentf33f5714492bf951c227cbd278dc2fe28ea59b83 (diff)
downloadxmlgraphics-fop-f86105b454926d89670e35c54c0905fd6764f5f6.tar.gz
xmlgraphics-fop-f86105b454926d89670e35c54c0905fd6764f5f6.zip
clone and serialize area traits
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195434 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/org/apache/fop/area/Area.java6
-rw-r--r--src/org/apache/fop/area/RegionViewport.java6
-rw-r--r--src/org/apache/fop/area/inline/Viewport.java3
3 files changed, 14 insertions, 1 deletions
diff --git a/src/org/apache/fop/area/Area.java b/src/org/apache/fop/area/Area.java
index 5c381d2db..9c312f988 100644
--- a/src/org/apache/fop/area/Area.java
+++ b/src/org/apache/fop/area/Area.java
@@ -105,7 +105,11 @@ public class Area implements Serializable {
private int areaClass = CLASS_NORMAL;
private int ipd;
- private HashMap props = null;
+
+ /**
+ * Traits for this area stored in a HashMap
+ */
+ protected HashMap props = null;
/**
* Get the area class of this area.
diff --git a/src/org/apache/fop/area/RegionViewport.java b/src/org/apache/fop/area/RegionViewport.java
index 0886b17fe..f368d8882 100644
--- a/src/org/apache/fop/area/RegionViewport.java
+++ b/src/org/apache/fop/area/RegionViewport.java
@@ -9,6 +9,7 @@ package org.apache.fop.area;
import java.awt.geom.Rectangle2D;
import java.io.IOException;
+import java.util.HashMap;
/**
* Region Viewport reference area.
@@ -72,6 +73,7 @@ public class RegionViewport extends Area implements Cloneable {
out.writeFloat((float) viewArea.getWidth());
out.writeFloat((float) viewArea.getHeight());
out.writeBoolean(clip);
+ out.writeObject(props);
out.writeObject(region);
}
@@ -80,6 +82,7 @@ public class RegionViewport extends Area implements Cloneable {
viewArea = new Rectangle2D.Float(in.readFloat(), in.readFloat(),
in.readFloat(), in.readFloat());
clip = in.readBoolean();
+ props = (HashMap)in.readObject();
setRegion((RegionReference) in.readObject());
}
@@ -92,6 +95,9 @@ public class RegionViewport extends Area implements Cloneable {
public Object clone() {
RegionViewport rv = new RegionViewport((Rectangle2D)viewArea.clone());
rv.region = (RegionReference)region.clone();
+ if(props != null) {
+ rv.props = (HashMap)props.clone();
+ }
return rv;
}
}
diff --git a/src/org/apache/fop/area/inline/Viewport.java b/src/org/apache/fop/area/inline/Viewport.java
index d4a507890..c3753e7fb 100644
--- a/src/org/apache/fop/area/inline/Viewport.java
+++ b/src/org/apache/fop/area/inline/Viewport.java
@@ -12,6 +12,7 @@ import org.apache.fop.render.Renderer;
import java.io.IOException;
import java.awt.geom.Rectangle2D;
+import java.util.HashMap;
/**
* Inline viewport area.
@@ -100,6 +101,7 @@ public class Viewport extends InlineArea {
out.writeFloat((float) contentPosition.getHeight());
}
out.writeBoolean(clip);
+ //out.writeObject(props);
out.writeObject(content);
}
@@ -112,6 +114,7 @@ public class Viewport extends InlineArea {
in.readFloat());
}
clip = in.readBoolean();
+ //props = (HashMap) in.readObject();
content = (Area) in.readObject();
}