aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render/print/PrintRenderer.java
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-06-30 11:55:46 +0000
committerJeremias Maerki <jeremias@apache.org>2005-06-30 11:55:46 +0000
commit109c667f80e72c278fdaab7c2c090e601fdc2927 (patch)
tree9ec2410f3bd2be034802d9f775aecfedadf16117 /src/java/org/apache/fop/render/print/PrintRenderer.java
parent5253023d0f25f9e497c89eda3a014cc50bce4013 (diff)
downloadxmlgraphics-fop-109c667f80e72c278fdaab7c2c090e601fdc2927.tar.gz
xmlgraphics-fop-109c667f80e72c278fdaab7c2c090e601fdc2927.zip
Bugzilla #35561
Print quality improvement especially for printing. The implementations don't create a bitmap image anymore, but draw directly. Submitted by: Richard Wheeldon <richardw@geoquip-rnd.demon.co.uk> git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@202539 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/print/PrintRenderer.java')
-rw-r--r--src/java/org/apache/fop/render/print/PrintRenderer.java29
1 files changed, 4 insertions, 25 deletions
diff --git a/src/java/org/apache/fop/render/print/PrintRenderer.java b/src/java/org/apache/fop/render/print/PrintRenderer.java
index bb52ac2ff..e604445ee 100644
--- a/src/java/org/apache/fop/render/print/PrintRenderer.java
+++ b/src/java/org/apache/fop/render/print/PrintRenderer.java
@@ -18,10 +18,7 @@
package org.apache.fop.render.print;
-import java.awt.Graphics;
-import java.awt.Graphics2D;
import java.awt.geom.Rectangle2D;
-import java.awt.image.BufferedImage;
import java.awt.print.PageFormat;
import java.awt.print.Pageable;
import java.awt.print.Paper;
@@ -36,8 +33,11 @@ import org.apache.fop.render.java2d.Java2DRenderer;
/**
* Renderer that prints through java.awt.PrintJob.
+ * The actual printing is handled by Java2DRenderer
+ * since both PrintRenderer and AWTRenderer need to
+ * support printing.
*/
-public class PrintRenderer extends Java2DRenderer implements Pageable, Printable {
+public class PrintRenderer extends Java2DRenderer implements Pageable {
private static final int EVEN_AND_ALL = 0;
@@ -140,27 +140,6 @@ public class PrintRenderer extends Java2DRenderer implements Pageable, Printable
return vec;
}
- public int print(Graphics g, PageFormat pageFormat, int pageIndex)
- throws PrinterException {
- if (pageIndex >= getNumberOfPages()) {
- return NO_SUCH_PAGE;
- }
-
- Graphics2D g2 = (Graphics2D) g;
-
- BufferedImage image;
- try {
- image = getPageImage(pageIndex);
- } catch (FOPException e) {
- e.printStackTrace();
- return NO_SUCH_PAGE;
- }
-
- g2.drawImage(image, null, 0, 0);
-
- return PAGE_EXISTS;
- }
-
/** @see java.awt.print.Pageable#getPageFormat(int) */
public PageFormat getPageFormat(int pageIndex)
throws IndexOutOfBoundsException {