diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-01-17 10:30:55 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-01-17 10:30:55 +0000 |
commit | 81b6d06fb73d226c18499111a7431dc86838d91d (patch) | |
tree | 6e126541da1a98e5687a49886892140c5bc1e119 /src/java/org/apache/fop/render/xml/XMLRenderer.java | |
parent | f0a7615b2a0bb2fd1a46630672813d3cd0b1dd33 (diff) | |
download | xmlgraphics-fop-81b6d06fb73d226c18499111a7431dc86838d91d.tar.gz xmlgraphics-fop-81b6d06fb73d226c18499111a7431dc86838d91d.zip |
More info on blocks and block-containers
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@198270 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/xml/XMLRenderer.java')
-rw-r--r-- | src/java/org/apache/fop/render/xml/XMLRenderer.java | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/render/xml/XMLRenderer.java b/src/java/org/apache/fop/render/xml/XMLRenderer.java index 9edaf3116..85e43b9c3 100644 --- a/src/java/org/apache/fop/render/xml/XMLRenderer.java +++ b/src/java/org/apache/fop/render/xml/XMLRenderer.java @@ -455,7 +455,24 @@ public class XMLRenderer extends AbstractRenderer { addAreaAttributes(block); addTraitAttributes(block); if (block instanceof BlockViewport) { - addAttribute("is-viewport", "true"); + BlockViewport bvp = (BlockViewport)block; + if (bvp.getPositioning() == Block.ABSOLUTE) { + addAttribute("positioning", "absolute"); + } else if (bvp.getPositioning() == Block.FIXED) { + addAttribute("positioning", "fixed"); + } + addAttribute("left-position", bvp.getXOffset()); + addAttribute("top-position", bvp.getYOffset()); + } else { + if (block.getPositioning() == Block.RELATIVE) { + addAttribute("positioning", "relative"); + } + if (block.getXOffset() != 0) { + addAttribute("left-offset", block.getXOffset()); + } + if (block.getYOffset() != 0) { + addAttribute("top-offset", block.getYOffset()); + } } startElement("block", atts); super.renderBlock(block); |