diff options
author | Adrian Cumiskey <acumiskey@apache.org> | 2008-08-20 15:22:03 +0000 |
---|---|---|
committer | Adrian Cumiskey <acumiskey@apache.org> | 2008-08-20 15:22:03 +0000 |
commit | 0f20fb70bc3c4e6f7f3c58f3a9afc1e884769cea (patch) | |
tree | 748cb9e5665f0fa7fdfbefda70427119524855ed /src/java/org/apache/fop/render/pcl/PCLRenderer.java | |
parent | 887b2f5c3c425b4eeed4094dae38f0c4d53ac121 (diff) | |
download | xmlgraphics-fop-0f20fb70bc3c4e6f7f3c58f3a9afc1e884769cea.tar.gz xmlgraphics-fop-0f20fb70bc3c4e6f7f3c58f3a9afc1e884769cea.zip |
Merged revisions 687323,687327,687365,687369 via svnmerge from
https://svn.eu.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r687323 | maxberger | 2008-08-20 14:24:18 +0100 (Wed, 20 Aug 2008) | 1 line
valueOf is Java 1.5+ only
........
r687327 | maxberger | 2008-08-20 14:32:19 +0100 (Wed, 20 Aug 2008) | 1 line
Use retroweaver for 1.4 verification
........
r687365 | maxberger | 2008-08-20 16:00:03 +0100 (Wed, 20 Aug 2008) | 1 line
Boolean.valueOf() is available in 1.4, but retroweaver still tried to weave it
........
r687369 | acumiskey | 2008-08-20 16:13:56 +0100 (Wed, 20 Aug 2008) | 3 lines
* Updated xmlgraphics-commons-14svn.jar to reflect UnitConv additions.
* Removed UnitConv and its unit test case (now resides in commons).
* Updated all fop util package references fpr UnitConv to xmlgraphics commons util package.
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@687372 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/pcl/PCLRenderer.java')
-rw-r--r-- | src/java/org/apache/fop/render/pcl/PCLRenderer.java | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/java/org/apache/fop/render/pcl/PCLRenderer.java b/src/java/org/apache/fop/render/pcl/PCLRenderer.java index 4385ea1f2..72d698bfe 100644 --- a/src/java/org/apache/fop/render/pcl/PCLRenderer.java +++ b/src/java/org/apache/fop/render/pcl/PCLRenderer.java @@ -97,7 +97,7 @@ import org.apache.fop.render.java2d.InstalledFontCollection; import org.apache.fop.render.java2d.Java2DRenderer; import org.apache.fop.render.pcl.extensions.PCLElementMapping; import org.apache.fop.traits.BorderProps; -import org.apache.fop.util.UnitConv; +import org.apache.xmlgraphics.util.UnitConv; /* Note: * There are some commonalities with AbstractPathOrientedRenderer but it's not possible @@ -128,7 +128,7 @@ public class PCLRenderer extends PrintRenderer { protected PCLGenerator gen; private boolean ioTrouble = false; - private Stack graphicContextStack = new Stack(); + private final Stack graphicContextStack = new Stack(); private GraphicContext graphicContext = new GraphicContext(); private PCLPageDefinition currentPageDefinition; @@ -153,7 +153,7 @@ public class PCLRenderer extends PrintRenderer { * This can be used to work around problems with Apache Batik, for example, but setting * this to true will increase memory consumption. */ - private boolean useColorCanvas = false; + private final boolean useColorCanvas = false; /** * Controls whether the generation of PJL commands gets disabled. @@ -245,7 +245,7 @@ public class PCLRenderer extends PrintRenderer { /** @return the target resolution */ protected int getResolution() { - int resolution = (int)Math.round(userAgent.getTargetResolution()); + int resolution = Math.round(userAgent.getTargetResolution()); if (resolution <= 300) { return 300; } else { @@ -945,8 +945,8 @@ public class PCLRenderer extends PrintRenderer { int borderPaddingStart = bv.getBorderAndPaddingWidthStart(); int borderPaddingBefore = bv.getBorderAndPaddingWidthBefore(); //This is the content-rect - float width = (float)bv.getIPD() / 1000f; - float height = (float)bv.getBPD() / 1000f; + float width = bv.getIPD() / 1000f; + float height = bv.getBPD() / 1000f; if (bv.getPositioning() == Block.ABSOLUTE @@ -1034,7 +1034,7 @@ public class PCLRenderer extends PrintRenderer { currentIPPosition = saveIP; currentBPPosition = saveBP; - currentBPPosition += (int)(bv.getAllocBPD()); + currentBPPosition += (bv.getAllocBPD()); } //currentFontName = saveFontName; } @@ -1433,13 +1433,13 @@ public class PCLRenderer extends PrintRenderer { borderRect.width, borderRect.height); final Rectangle paintRect = new Rectangle( - (int)Math.round(borderRect.x * 1000f), - (int)Math.round(borderRect.y * 1000f), + Math.round(borderRect.x * 1000f), + Math.round(borderRect.y * 1000f), (int)Math.floor(borderRect.width * 1000f) + 1, (int)Math.floor(borderRect.height * 1000f) + 1); //Add one pixel wide safety margin around the paint area int pixelWidth = (int)Math.round(UnitConv.in2mpt(1) / userAgent.getTargetResolution()); - final int xoffset = (int)Math.round(-effBorderRect.x * 1000f) + pixelWidth; + final int xoffset = Math.round(-effBorderRect.x * 1000f) + pixelWidth; final int yoffset = pixelWidth; paintRect.x += xoffset; paintRect.y += yoffset; |