aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/render/pdf
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2002-09-13 08:21:55 +0000
committerKeiron Liddle <keiron@apache.org>2002-09-13 08:21:55 +0000
commit6e820767d19b85e1475c6560a887bda5698120d2 (patch)
tree123e44a06a1b0c28197d91b9406ea1603d0949d5 /src/org/apache/fop/render/pdf
parentcbfb6d81293a14bee16b2a3c41d7fd72bf92ec85 (diff)
downloadxmlgraphics-fop-6e820767d19b85e1475c6560a887bda5698120d2.tar.gz
xmlgraphics-fop-6e820767d19b85e1475c6560a887bda5698120d2.zip
starting implementation of tables
fixed some more styling errors git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195177 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/render/pdf')
-rw-r--r--src/org/apache/fop/render/pdf/PDFRenderer.java37
1 files changed, 17 insertions, 20 deletions
diff --git a/src/org/apache/fop/render/pdf/PDFRenderer.java b/src/org/apache/fop/render/pdf/PDFRenderer.java
index 4565ad800..66bb16c20 100644
--- a/src/org/apache/fop/render/pdf/PDFRenderer.java
+++ b/src/org/apache/fop/render/pdf/PDFRenderer.java
@@ -360,16 +360,17 @@ public class PDFRenderer extends PrintRenderer {
currentStream.add("ET\n");
if (bv.getClip()) {
- Rectangle2D rect = bv.getBounds();
-
currentStream.add("q\n");
- float x = (float)rect.getX() / 1000f;
- float y = (float)rect.getY() / 1000f;
- float width = (float)rect.getWidth() / 1000f;
- float height = (float)rect.getHeight() / 1000f;
+ float x = (float)(bv.getXOffset() + containingIPPosition) / 1000f;
+ float y = (float)(bv.getYOffset() + containingBPPosition) / 1000f;
+ float width = (float)bv.getWidth() / 1000f;
+ float height = (float)bv.getHeight() / 1000f;
clip(x, y, width, height);
}
+ CTM tempctm = new CTM(containingIPPosition, containingBPPosition);
+ ctm = tempctm.multiply(ctm);
+
startVParea(ctm);
renderBlocks(children);
endVParea();
@@ -385,8 +386,6 @@ public class PDFRenderer extends PrintRenderer {
currentBPPosition = saveBP;
} else {
- Rectangle2D rect = bv.getBounds();
-
if (ctm != null) {
currentIPPosition = 0;
currentBPPosition = 0;
@@ -396,20 +395,20 @@ public class PDFRenderer extends PrintRenderer {
double[] vals = ctm.toArray();
boolean aclock = vals[2] == 1.0;
if (vals[2] == 1.0) {
- ctm = ctm.translate(-saveBP - rect.getHeight(), -saveIP);
+ ctm = ctm.translate(-saveBP - bv.getHeight(), -saveIP);
} else if (vals[0] == -1.0) {
- ctm = ctm.translate(-saveIP - rect.getWidth(), -saveBP - rect.getHeight());
+ ctm = ctm.translate(-saveIP - bv.getWidth(), -saveBP - bv.getHeight());
} else {
- ctm = ctm.translate(saveBP, saveIP - rect.getWidth());
+ ctm = ctm.translate(saveBP, saveIP - bv.getWidth());
}
}
if (bv.getClip()) {
currentStream.add("q\n");
- float x = (float)rect.getX() / 1000f;
- float y = (float)rect.getY() / 1000f;
- float width = (float)rect.getWidth() / 1000f;
- float height = (float)rect.getHeight() / 1000f;
+ float x = (float)bv.getXOffset() / 1000f;
+ float y = (float)bv.getYOffset() / 1000f;
+ float width = (float)bv.getWidth() / 1000f;
+ float height = (float)bv.getHeight() / 1000f;
clip(x, y, width, height);
}
@@ -430,11 +429,9 @@ public class PDFRenderer extends PrintRenderer {
// clip if necessary
- if (rect != null) {
- currentIPPosition = saveIP;
- currentBPPosition = saveBP;
- currentBPPosition += (int)(rect.getHeight());
- }
+ currentIPPosition = saveIP;
+ currentBPPosition = saveBP;
+ currentBPPosition += (int)(bv.getHeight());
}
}