diff options
author | Adrian Cumiskey <acumiskey@apache.org> | 2008-08-14 13:37:33 +0000 |
---|---|---|
committer | Adrian Cumiskey <acumiskey@apache.org> | 2008-08-14 13:37:33 +0000 |
commit | 39f5b053cc82f71efa6014c36c0de2f36534bd19 (patch) | |
tree | db7e342c32dea5c7dcbba7258b110c60578fc8f3 /src/java/org/apache/fop/render/pdf | |
parent | 427e2d22a628b77cce5e7c22b32610b5ff23d8b2 (diff) | |
download | xmlgraphics-fop-39f5b053cc82f71efa6014c36c0de2f36534bd19.tar.gz xmlgraphics-fop-39f5b053cc82f71efa6014c36c0de2f36534bd19.zip |
Merged revisions 685573,685785,685879,685885 via svnmerge from
https://svn.eu.apache.org/repos/asf/xmlgraphics/fop/trunk
........
r685573 | jeremias | 2008-08-13 15:34:03 +0100 (Wed, 13 Aug 2008) | 1 line
Fixed border trait parsing for the area tree XML when CMYK or ICC colors were used.
........
r685785 | jeremias | 2008-08-14 07:32:52 +0100 (Thu, 14 Aug 2008) | 1 line
Removed three unused classes in the traits package.
........
r685879 | jeremias | 2008-08-14 14:03:20 +0100 (Thu, 14 Aug 2008) | 2 lines
Fixed the source for a NullPointerException when the content of an fo:leader with leader-pattern="use-content" collapses to zero width during layout.
........
r685885 | acumiskey | 2008-08-14 14:25:54 +0100 (Thu, 14 Aug 2008) | 1 line
Moved static method lightenColor() from PrintRenderer to ColorUtil. Thats one less Renderer interface dependency to worry about :).
........
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AFPGOCAResources@685891 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/pdf')
-rw-r--r-- | src/java/org/apache/fop/render/pdf/PDFRenderer.java | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/java/org/apache/fop/render/pdf/PDFRenderer.java b/src/java/org/apache/fop/render/pdf/PDFRenderer.java index 27caf86b4..61ed1ff07 100644 --- a/src/java/org/apache/fop/render/pdf/PDFRenderer.java +++ b/src/java/org/apache/fop/render/pdf/PDFRenderer.java @@ -117,6 +117,7 @@ import org.apache.fop.render.Graphics2DAdapter; import org.apache.fop.render.RendererContext; import org.apache.fop.util.CharUtilities; import org.apache.fop.util.ColorProfileUtil; +import org.apache.fop.util.ColorUtil; /** * Renderer that renders areas to PDF. @@ -939,8 +940,8 @@ public class PDFRenderer extends AbstractPathOrientedRenderer { float colFactor = (style == EN_GROOVE ? 0.4f : -0.4f); currentStream.add("[] 0 d "); if (horz) { - Color uppercol = lightenColor(col, -colFactor); - Color lowercol = lightenColor(col, colFactor); + Color uppercol = ColorUtil.lightenColor(col, -colFactor); + Color lowercol = ColorUtil.lightenColor(col, colFactor); float h3 = h / 3; currentStream.add(format(h3) + " w\n"); float ym1 = y1 + (h3 / 2); @@ -954,8 +955,8 @@ public class PDFRenderer extends AbstractPathOrientedRenderer { currentStream.add(format(x1) + " " + format(ym1 + h3 + h3) + " m " + format(x2) + " " + format(ym1 + h3 + h3) + " l S\n"); } else { - Color leftcol = lightenColor(col, -colFactor); - Color rightcol = lightenColor(col, colFactor); + Color leftcol = ColorUtil.lightenColor(col, -colFactor); + Color rightcol = ColorUtil.lightenColor(col, colFactor); float w3 = w / 3; currentStream.add(format(w3) + " w\n"); float xm1 = x1 + (w3 / 2); @@ -978,14 +979,14 @@ public class PDFRenderer extends AbstractPathOrientedRenderer { currentStream.add("[] 0 d "); Color c = col; if (horz) { - c = lightenColor(c, (startOrBefore ? 1 : -1) * colFactor); + c = ColorUtil.lightenColor(c, (startOrBefore ? 1 : -1) * colFactor); currentStream.add(format(h) + " w\n"); float ym1 = y1 + (h / 2); setColor(c, false, null); currentStream.add(format(x1) + " " + format(ym1) + " m " + format(x2) + " " + format(ym1) + " l S\n"); } else { - c = lightenColor(c, (startOrBefore ? 1 : -1) * colFactor); + c = ColorUtil.lightenColor(c, (startOrBefore ? 1 : -1) * colFactor); currentStream.add(format(w) + " w\n"); float xm1 = x1 + (w / 2); setColor(c, false, null); @@ -1773,7 +1774,7 @@ public class PDFRenderer extends AbstractPathOrientedRenderer { case EN_RIDGE: float half = area.getRuleThickness() / 2000f; - setColor(lightenColor(col, 0.6f), true, null); + setColor(ColorUtil.lightenColor(col, 0.6f), true, null); currentStream.add(format(startx) + " " + format(starty) + " m\n"); currentStream.add(format(endx) + " " + format(starty) + " l\n"); currentStream.add(format(endx) + " " + format(starty + 2 * half) + " l\n"); |