]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
fixes image bug where images where flipped
authorKeiron Liddle <keiron@apache.org>
Thu, 20 Jul 2000 07:42:52 +0000 (07:42 +0000)
committerKeiron Liddle <keiron@apache.org>
Thu, 20 Jul 2000 07:42:52 +0000 (07:42 +0000)
the image is now in the correct orientation

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@193529 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/render/pdf/PDFRenderer.java

index 07895446c3aa446ba5e4262e34bcc4b7b5d39bf3..6ab34ba1dba300bfa2dd5ee53eb894fa38f25478 100644 (file)
@@ -743,7 +743,8 @@ public class PDFRenderer implements Renderer {
                        FopImage img = FopImageFactory.Make(href);
                        if(img != null) {
                                int xObjectNum = this.pdfDoc.addImage(img);
-                               currentStream.add("q\n" + width + " 0 0 " +
+                               currentStream.add("q\n1 0 0 -1 " + 0
+                                         + " " + (y + height) + " cm\n" + width + " 0 0 " +
                                                  height + " " +
                                                  x + " " +
                                                  y + " cm\n" +
@@ -765,7 +766,6 @@ public class PDFRenderer implements Renderer {
                int y = this.currentYPosition;
                int w = area.getContentWidth();
                int h = area.getHeight();
-               this.currentYPosition -= h;
 
                currentStream.add("ET\n");
                /*
@@ -797,6 +797,7 @@ public class PDFRenderer implements Renderer {
 
                currentStream.add("Q\n");
                currentStream.add("BT\n");
+               this.currentYPosition -= h;
        }
 
        void handleGradient(String sp, boolean fill, GraphicImpl area)