bckfnn 2004/02/10 11:28:17 Modified: src/java/org/apache/fop/render/pdf PDFRenderer.java Log: Draw the borders of a BlockViewport before setting the CTM transformation. This way the viewport is relative to the current CTM and the content of the Viewport is relative to the viewport CTM. Revision Changes Path 1.33 +19 -18 xml-fop/src/java/org/apache/fop/render/pdf/PDFRenderer.java Index: PDFRenderer.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/pdf/PDFRenderer.java,v retrieving revision 1.32 retrieving revision 1.33 diff -u -r1.32 -r1.33 --- PDFRenderer.java 4 Feb 2004 13:06:36 -0000 1.32 +++ PDFRenderer.java 10 Feb 2004 19:28:17 -0000 1.33 @@ -742,26 +742,29 @@ if (bv.getPositioning() == Block.ABSOLUTE) { - currentIPPosition = 0; - currentBPPosition = 0; - closeText(); - endTextObject(); + CTM tempctm = new CTM(containingIPPosition, containingBPPosition); + ctm = tempctm.multiply(ctm); + + 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; + + drawBackAndBorders(bv, x, y, width, height); + + endTextObject(); if (bv.getClip()) { saveGraphicsState(); - 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); - handleBlockTraits(bv); + + currentIPPosition = 0; + currentBPPosition = 0; + renderBlocks(bv, children); endVParea(); @@ -777,11 +780,7 @@ } else { if (ctm != null) { - currentIPPosition = 0; - currentBPPosition = 0; - closeText(); - endTextObject(); double[] vals = ctm.toArray(); //boolean aclock = vals[2] == 1.0; @@ -798,7 +797,6 @@ if (bv.getClip()) { if (ctm == null) { closeText(); - endTextObject(); } saveGraphicsState(); float x = (float)bv.getXOffset() / 1000f; @@ -808,10 +806,13 @@ clip(x, y, width, height); } + handleBlockTraits(bv); if (ctm != null) { + endTextObject(); startVParea(ctm); + currentIPPosition = 0; + currentBPPosition = 0; } - handleBlockTraits(bv); renderBlocks(bv, children); if (ctm != null) { endVParea();
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]