diff options
author | Jeremias Maerki <jeremias@apache.org> | 2008-11-19 20:13:48 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2008-11-19 20:13:48 +0000 |
commit | be4dc692db093ec6b8039d7e61804e28f1709db4 (patch) | |
tree | aa484221fc31f715fcc9e386afb978e31de8b3a0 /src/java/org/apache/fop/render/pcl | |
parent | dfeb96c655c3e361b5fdf6f0cecbf46adab01a72 (diff) | |
download | xmlgraphics-fop-be4dc692db093ec6b8039d7e61804e28f1709db4.tar.gz xmlgraphics-fop-be4dc692db093ec6b8039d7e61804e28f1709db4.zip |
Added page master name to IFDocumentHandler.startPage() method.
Wired together the support for out-of-order rendering (only applicable to PDF) when the intermediate format is not used (in-memory rendering).
Fixed a logical bug in IFRenderer that caused some unneeded code. Glyph adjustments (kerning, letter/word space...) were not done right. All painters fixed/adjusted accordingly.
Started implementation of the PostScript painter: Supports only text and filled rectangles so far. Work in progress...
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign@719051 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/pcl')
-rw-r--r-- | src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java | 2 | ||||
-rw-r--r-- | src/java/org/apache/fop/render/pcl/PCLPainter.java | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java b/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java index 20dc3cac2..3e9201da4 100644 --- a/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java +++ b/src/java/org/apache/fop/render/pcl/PCLDocumentHandler.java @@ -173,7 +173,7 @@ public class PCLDocumentHandler extends AbstractBinaryWritingIFDocumentHandler } /** {@inheritDoc} */ - public void startPage(int index, String name, Dimension size) throws IFException { + public void startPage(int index, String name, String pageMasterName, Dimension size) throws IFException { try { //TODO Add support for paper-source and duplex-mode diff --git a/src/java/org/apache/fop/render/pcl/PCLPainter.java b/src/java/org/apache/fop/render/pcl/PCLPainter.java index b709c28f3..784aca941 100644 --- a/src/java/org/apache/fop/render/pcl/PCLPainter.java +++ b/src/java/org/apache/fop/render/pcl/PCLPainter.java @@ -414,7 +414,7 @@ public class PCLPainter extends AbstractIFPainter implements PCLConstants { glyphAdjust += dx[i + 1]; } - width += cw - glyphAdjust; + width += cw + glyphAdjust; } int extraWidth = font.getFontSize() / 3; boundingRect.setSize( @@ -447,14 +447,14 @@ public class PCLPainter extends AbstractIFPainter implements PCLConstants { g2d.setBackground(Color.LIGHT_GRAY); g2d.clearRect(0, 0, (int)area.getWidth(), (int)area.getHeight()); } - g2d.translate(0, -y + baselineOffset); + g2d.translate(-x, -y + baselineOffset); if (DEBUG) { Rectangle rect = new Rectangle(x, y - maxAscent, 3000, maxAscent); g2d.draw(rect); rect = new Rectangle(x, y - ascent, 2000, ascent); g2d.draw(rect); - rect = new Rectangle(x, y, 1000, - descent); + rect = new Rectangle(x, y, 1000, -descent); g2d.draw(rect); } Java2DPainter painter = new Java2DPainter(g2d, |