aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render/intermediate/IFSerializer.java
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2008-08-15 15:31:55 +0000
committerJeremias Maerki <jeremias@apache.org>2008-08-15 15:31:55 +0000
commitbacc153b5daf6baacb9f1b3b65d8a5ffe7ecc5d1 (patch)
tree07031919fee6b9c74a42ef5de3fc97d6fb2195d0 /src/java/org/apache/fop/render/intermediate/IFSerializer.java
parent6418e71d293be2a7f458ecef5bb85561e4ba2ad0 (diff)
downloadxmlgraphics-fop-bacc153b5daf6baacb9f1b3b65d8a5ffe7ecc5d1.tar.gz
xmlgraphics-fop-bacc153b5daf6baacb9f1b3b65d8a5ffe7ecc5d1.zip
Had to introduce "clip-rect" to handle clipping on background images, leader etc. A full viewport is probably too heavy-weight here. This is to be considered temporary pending verification with SVG and PCL implementations.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@686253 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/intermediate/IFSerializer.java')
-rw-r--r--src/java/org/apache/fop/render/intermediate/IFSerializer.java14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/java/org/apache/fop/render/intermediate/IFSerializer.java b/src/java/org/apache/fop/render/intermediate/IFSerializer.java
index 40cd9a25b..4eb7f0713 100644
--- a/src/java/org/apache/fop/render/intermediate/IFSerializer.java
+++ b/src/java/org/apache/fop/render/intermediate/IFSerializer.java
@@ -350,6 +350,20 @@ public class IFSerializer extends AbstractXMLWritingIFPainter implements IFConst
}
/** {@inheritDoc} */
+ public void clipRect(Rectangle rect) throws IFException {
+ try {
+ AttributesImpl atts = new AttributesImpl();
+ addAttribute(atts, "x", Integer.toString(rect.x));
+ addAttribute(atts, "y", Integer.toString(rect.y));
+ addAttribute(atts, "width", Integer.toString(rect.width));
+ addAttribute(atts, "height", Integer.toString(rect.height));
+ element(EL_CLIP_RECT, atts);
+ } catch (SAXException e) {
+ throw new IFException("SAX error in clipRect()", e);
+ }
+ }
+
+ /** {@inheritDoc} */
public void drawRect(Rectangle rect, Paint fill, Color stroke) throws IFException {
if (fill == null && stroke == null) {
return;