summaryrefslogtreecommitdiff
blob: 33b4ea37b9945a8fdbdd5ff204fde9f66d42c4a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
diff -u -r src.old/java/org/xhtmlrenderer/pdf/ITextFSImage.java src/java/org/xhtmlrenderer/pdf/ITextFSImage.java
--- src.old/java/org/xhtmlrenderer/pdf/ITextFSImage.java	2008-10-23 19:46:53.000000000 +0300
+++ src/java/org/xhtmlrenderer/pdf/ITextFSImage.java	2008-10-23 19:48:05.000000000 +0300
@@ -31,11 +31,11 @@
     }
 
     public int getWidth() {
-        return (int)_image.plainWidth();
+        return (int)_image.getPlainWidth();
     }
 
     public int getHeight() {
-        return (int)_image.plainHeight();
+        return (int)_image.getPlainHeight();
     }
 
     public void scale(int width, int height) {
diff -u -r src.old/java/org/xhtmlrenderer/pdf/ITextRenderer.java src/java/org/xhtmlrenderer/pdf/ITextRenderer.java
--- src.old/java/org/xhtmlrenderer/pdf/ITextRenderer.java	2008-10-23 19:46:53.000000000 +0300
+++ src/java/org/xhtmlrenderer/pdf/ITextRenderer.java	2008-10-23 19:48:56.000000000 +0300
@@ -234,7 +234,7 @@
         
         _outputDevice.start(_doc);
         _outputDevice.setWriter(writer);
-        _outputDevice.initializePage(writer.getDirectContent(), firstPageSize.height());
+        _outputDevice.initializePage(writer.getDirectContent(), firstPageSize.getHeight());
         
         _root.getLayer().assignPagePaintingPositions(c, Layer.PAGED_MODE_PRINT);
         
@@ -254,7 +254,7 @@
                 doc.setPageSize(nextPageSize);
                 doc.newPage();
                 _outputDevice.initializePage(
-                        writer.getDirectContent(), nextPageSize.height());
+                        writer.getDirectContent(), nextPageSize.getHeight());
             }
         }
         
diff -u -r src.old/java/org/xhtmlrenderer/pdf/ITextUserAgent.java src/java/org/xhtmlrenderer/pdf/ITextUserAgent.java
--- src.old/java/org/xhtmlrenderer/pdf/ITextUserAgent.java	2008-10-23 19:46:53.000000000 +0300
+++ src/java/org/xhtmlrenderer/pdf/ITextUserAgent.java	2008-10-23 19:50:00.000000000 +0300
@@ -60,8 +60,8 @@
                         PdfReader reader = _outputDevice.getReader(url);
                         PDFAsImage image = new PDFAsImage(url);
                         Rectangle rect = reader.getPageSizeWithRotation(1);
-                        image.setInitialWidth(rect.width()*_outputDevice.getDotsPerPoint());
-                        image.setInitialHeight(rect.height()*_outputDevice.getDotsPerPoint());
+                        image.setInitialWidth(rect.getWidth()*_outputDevice.getDotsPerPoint());
+                        image.setInitialHeight(rect.getHeight()*_outputDevice.getDotsPerPoint());
                         resource = new ImageResource(image);
                     } else {
 	                    Image image = Image.getInstance(url);
@@ -84,7 +84,7 @@
     
     private void scaleToOutputResolution(Image image) {
         float factor = _sharedContext.getDotsPerPixel();
-        image.scaleAbsolute(image.plainWidth() * factor, image.plainHeight() * factor);
+        image.scaleAbsolute(image.getPlainWidth() * factor, image.getPlainHeight() * factor);
     }
 
     public SharedContext getSharedContext() {