aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/render/pdf/PDFGraphics2DAdapter.java
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2008-07-24 09:35:34 +0000
committerVincent Hennebert <vhennebert@apache.org>2008-07-24 09:35:34 +0000
commit92df262a0778ee539c849454be2810621dac1b7e (patch)
treed5be9359cbacb91dffcab6f1a6ecfe61e9db2c6b /src/java/org/apache/fop/render/pdf/PDFGraphics2DAdapter.java
parent30e2ce5bee38cbc32758e0b65fa7f98f3db76baa (diff)
downloadxmlgraphics-fop-92df262a0778ee539c849454be2810621dac1b7e.tar.gz
xmlgraphics-fop-92df262a0778ee539c849454be2810621dac1b7e.zip
Fed up with all those trailing whitespaces. Let's remove them all (once... and for all?)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@679326 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/render/pdf/PDFGraphics2DAdapter.java')
-rw-r--r--src/java/org/apache/fop/render/pdf/PDFGraphics2DAdapter.java24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/java/org/apache/fop/render/pdf/PDFGraphics2DAdapter.java b/src/java/org/apache/fop/render/pdf/PDFGraphics2DAdapter.java
index c47b944d0..b61ebc346 100644
--- a/src/java/org/apache/fop/render/pdf/PDFGraphics2DAdapter.java
+++ b/src/java/org/apache/fop/render/pdf/PDFGraphics2DAdapter.java
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -16,7 +16,7 @@
*/
/* $Id$ */
-
+
package org.apache.fop.render.pdf;
import java.awt.Color;
@@ -49,18 +49,18 @@ public class PDFGraphics2DAdapter extends AbstractGraphics2DAdapter {
public PDFGraphics2DAdapter(PDFRenderer renderer) {
this.renderer = renderer;
}
-
+
/** {@inheritDoc} */
public void paintImage(Graphics2DImagePainter painter,
RendererContext context,
int x, int y, int width, int height) throws IOException {
-
+
PDFSVGHandler.PDFInfo pdfInfo = PDFSVGHandler.getPDFInfo(context);
float fwidth = width / 1000f;
float fheight = height / 1000f;
float fx = x / 1000f;
float fy = y / 1000f;
-
+
// get the 'width' and 'height' attributes of the SVG document
Dimension dim = painter.getImageSize();
float imw = (float)dim.getWidth() / 1000f;
@@ -72,7 +72,7 @@ public class PDFGraphics2DAdapter extends AbstractGraphics2DAdapter {
renderer.saveGraphicsState();
renderer.setColor(Color.black, false, null);
renderer.setColor(Color.black, true, null);
-
+
//TODO Clip to the image area.
// transform so that the coordinates (0,0) is from the top left
@@ -86,13 +86,13 @@ public class PDFGraphics2DAdapter extends AbstractGraphics2DAdapter {
if (pdfInfo.pdfContext == null) {
pdfInfo.pdfContext = pdfInfo.pdfPage;
}
- PDFGraphics2D graphics = new PDFGraphics2D(textAsShapes,
+ PDFGraphics2D graphics = new PDFGraphics2D(textAsShapes,
pdfInfo.fi, pdfInfo.pdfDoc,
pdfInfo.pdfContext, pdfInfo.pdfPage.referencePDF(),
pdfInfo.currentFontName,
pdfInfo.currentFontSize);
graphics.setGraphicContext(new org.apache.xmlgraphics.java2d.GraphicContext());
-
+
AffineTransform transform = new AffineTransform();
transform.translate(fx, fy);
pdfInfo.pdfState.concatenate(transform);
@@ -105,7 +105,7 @@ public class PDFGraphics2DAdapter extends AbstractGraphics2DAdapter {
RendererContextWrapper ctx = RendererContext.wrapRendererContext(context);
BufferedImage bi = paintToBufferedImage(painter, ctx, resolution, false, false);
- float scale = PDFRenderer.NORMAL_PDF_RESOLUTION
+ float scale = PDFRenderer.NORMAL_PDF_RESOLUTION
/ context.getUserAgent().getTargetResolution();
graphics.drawImage(bi, new AffineTransform(scale, 0, 0, scale, 0, 0), null);
} else {
@@ -121,9 +121,9 @@ public class PDFGraphics2DAdapter extends AbstractGraphics2DAdapter {
/** {@inheritDoc} */
protected void setRenderingHintsForBufferedImage(Graphics2D g2d) {
super.setRenderingHintsForBufferedImage(g2d);
- g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
+ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING,
RenderingHints.VALUE_ANTIALIAS_ON);
- g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
+ g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING,
RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
}