diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-12-13 19:49:16 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-12-13 19:49:16 +0000 |
commit | b9c18acdd094acfc29b4619b9785b19aa83d29e1 (patch) | |
tree | 051df1d71e14a65234df479f80cdff500746295f /src/java/org/apache/fop/render/pdf | |
parent | 32521d94ac717c6f07f4d45607d1d049c839c42c (diff) | |
download | xmlgraphics-fop-b9c18acdd094acfc29b4619b9785b19aa83d29e1.tar.gz xmlgraphics-fop-b9c18acdd094acfc29b4619b9785b19aa83d29e1.zip |
startVPArea() and endVPArea() made abstract in AbstractRenderer so implementors are forced to deal with the topic.
startVPArea() in Renderers now takes an additional parameter for an optional clipping rectangle. PDF, PS and Java2D renderers now perform proper clipping on viewports if requested.
Fixed various problems in the Java2D renderer and added border and background painting where still missing. Note that there are several code parts that could be easily shared with the AbstractPathOrientedRenderer.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@356593 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/pdf')
-rw-r--r-- | src/java/org/apache/fop/render/pdf/PDFRenderer.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/render/pdf/PDFRenderer.java b/src/java/org/apache/fop/render/pdf/PDFRenderer.java index 66fdd9b03..c2e31b0c5 100644 --- a/src/java/org/apache/fop/render/pdf/PDFRenderer.java +++ b/src/java/org/apache/fop/render/pdf/PDFRenderer.java @@ -484,18 +484,23 @@ public class PDFRenderer extends AbstractPathOrientedRenderer { } /** - * @see org.apache.fop.render.AbstractRenderer#startVParea(CTM) + * @see org.apache.fop.render.AbstractRenderer#startVParea(CTM, Rectangle2D) */ - protected void startVParea(CTM ctm) { + protected void startVParea(CTM ctm, Rectangle2D clippingRect) { // Set the given CTM in the graphics state currentState.push(); currentState.setTransform( new AffineTransform(CTMHelper.toPDFArray(ctm))); saveGraphicsState(); + if (clippingRect != null) { + clipRect((float)clippingRect.getX() / 1000f, + (float)clippingRect.getY() / 1000f, + (float)clippingRect.getWidth() / 1000f, + (float)clippingRect.getHeight() / 1000f); + } // multiply with current CTM currentStream.add(CTMHelper.toPDFString(ctm) + " cm\n"); - // Set clip? } /** |