aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/image
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/image
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/image')
-rw-r--r--src/java/org/apache/fop/image/loader/batik/BatikUtil.java6
-rw-r--r--src/java/org/apache/fop/image/loader/batik/ImageConverterSVG2G2D.java10
-rw-r--r--src/java/org/apache/fop/image/loader/batik/ImageConverterWMF2G2D.java18
-rw-r--r--src/java/org/apache/fop/image/loader/batik/ImageLoaderFactorySVG.java14
-rw-r--r--src/java/org/apache/fop/image/loader/batik/ImageLoaderFactoryWMF.java14
-rw-r--r--src/java/org/apache/fop/image/loader/batik/ImageLoaderSVG.java6
-rw-r--r--src/java/org/apache/fop/image/loader/batik/ImageLoaderWMF.java6
-rw-r--r--src/java/org/apache/fop/image/loader/batik/ImageWMF.java14
-rw-r--r--src/java/org/apache/fop/image/loader/batik/PreloaderSVG.java18
-rw-r--r--src/java/org/apache/fop/image/loader/batik/PreloaderWMF.java18
10 files changed, 62 insertions, 62 deletions
diff --git a/src/java/org/apache/fop/image/loader/batik/BatikUtil.java b/src/java/org/apache/fop/image/loader/batik/BatikUtil.java
index 1ae2a9917..558c3b043 100644
--- a/src/java/org/apache/fop/image/loader/batik/BatikUtil.java
+++ b/src/java/org/apache/fop/image/loader/batik/BatikUtil.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.
@@ -37,5 +37,5 @@ public class BatikUtil {
}
return false;
}
-
+
}
diff --git a/src/java/org/apache/fop/image/loader/batik/ImageConverterSVG2G2D.java b/src/java/org/apache/fop/image/loader/batik/ImageConverterSVG2G2D.java
index be0995d8c..8ad9fea44 100644
--- a/src/java/org/apache/fop/image/loader/batik/ImageConverterSVG2G2D.java
+++ b/src/java/org/apache/fop/image/loader/batik/ImageConverterSVG2G2D.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.image.loader.batik;
import java.awt.Dimension;
@@ -51,7 +51,7 @@ import org.apache.fop.svg.SimpleSVGUserAgent;
* Note: The target flavor is "generic" Java2D. No Batik-specific bridges are hooked into the
* conversion process. Specialized renderers may want to provide specialized adapters to profit
* from target-format features (for example with PDF or PS). This converter is mainly for formats
- * which only support bitmap images or rudimentary Java2D support.
+ * which only support bitmap images or rudimentary Java2D support.
*/
public class ImageConverterSVG2G2D extends AbstractImageConverter {
@@ -126,7 +126,7 @@ public class ImageConverterSVG2G2D extends AbstractImageConverter {
//TODO Refine and pipe through to caller
log.debug(message);
}
-
+
};
}
diff --git a/src/java/org/apache/fop/image/loader/batik/ImageConverterWMF2G2D.java b/src/java/org/apache/fop/image/loader/batik/ImageConverterWMF2G2D.java
index 6babe4523..7bc8c2050 100644
--- a/src/java/org/apache/fop/image/loader/batik/ImageConverterWMF2G2D.java
+++ b/src/java/org/apache/fop/image/loader/batik/ImageConverterWMF2G2D.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.image.loader.batik;
import java.awt.Dimension;
@@ -51,7 +51,7 @@ public class ImageConverterWMF2G2D extends AbstractImageConverter {
Graphics2DImagePainter painter;
painter = new Graphics2DImagePainterWMF(wmf);
-
+
ImageGraphics2D g2dImage = new ImageGraphics2D(src.getInfo(), painter);
return g2dImage;
}
@@ -69,11 +69,11 @@ public class ImageConverterWMF2G2D extends AbstractImageConverter {
private static class Graphics2DImagePainterWMF implements Graphics2DImagePainter {
private ImageWMF wmf;
-
+
public Graphics2DImagePainterWMF(ImageWMF wmf) {
this.wmf = wmf;
}
-
+
/** {@inheritDoc} */
public Dimension getImageSize() {
return wmf.getSize().getDimensionMpt();
@@ -84,7 +84,7 @@ public class ImageConverterWMF2G2D extends AbstractImageConverter {
WMFRecordStore wmfStore = wmf.getRecordStore();
double w = area.getWidth();
double h = area.getHeight();
-
+
//Fit in paint area
g2d.translate(area.getX(), area.getY());
double sx = w / wmfStore.getWidthPixels();
@@ -101,7 +101,7 @@ public class ImageConverterWMF2G2D extends AbstractImageConverter {
log.debug("Painting WMF took " + duration + " ms.");
}
}
-
+
}
-
+
}
diff --git a/src/java/org/apache/fop/image/loader/batik/ImageLoaderFactorySVG.java b/src/java/org/apache/fop/image/loader/batik/ImageLoaderFactorySVG.java
index fa58d8e4a..9203bf7e8 100644
--- a/src/java/org/apache/fop/image/loader/batik/ImageLoaderFactorySVG.java
+++ b/src/java/org/apache/fop/image/loader/batik/ImageLoaderFactorySVG.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.
@@ -31,25 +31,25 @@ public class ImageLoaderFactorySVG extends AbstractImageLoaderFactory {
private static final ImageFlavor[] FLAVORS = new ImageFlavor[] {
ImageFlavor.XML_DOM};
-
+
private static final String[] MIMES = new String[] {
MimeConstants.MIME_SVG};
-
+
/** {@inheritDoc} */
public String[] getSupportedMIMETypes() {
return MIMES;
}
-
+
/** {@inheritDoc} */
public ImageFlavor[] getSupportedFlavors(String mime) {
return FLAVORS;
}
-
+
/** {@inheritDoc} */
public ImageLoader newImageLoader(ImageFlavor targetFlavor) {
return new ImageLoaderSVG(targetFlavor);
}
-
+
/** {@inheritDoc} */
public int getUsagePenalty(String mime, ImageFlavor flavor) {
return 0;
diff --git a/src/java/org/apache/fop/image/loader/batik/ImageLoaderFactoryWMF.java b/src/java/org/apache/fop/image/loader/batik/ImageLoaderFactoryWMF.java
index bfa004d7e..6c5384bdb 100644
--- a/src/java/org/apache/fop/image/loader/batik/ImageLoaderFactoryWMF.java
+++ b/src/java/org/apache/fop/image/loader/batik/ImageLoaderFactoryWMF.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.
@@ -30,25 +30,25 @@ public class ImageLoaderFactoryWMF extends AbstractImageLoaderFactory {
private static final ImageFlavor[] FLAVORS = new ImageFlavor[] {
ImageWMF.WMF_IMAGE};
-
+
private static final String[] MIMES = new String[] {
ImageWMF.MIME_WMF};
-
+
/** {@inheritDoc} */
public String[] getSupportedMIMETypes() {
return MIMES;
}
-
+
/** {@inheritDoc} */
public ImageFlavor[] getSupportedFlavors(String mime) {
return FLAVORS;
}
-
+
/** {@inheritDoc} */
public ImageLoader newImageLoader(ImageFlavor targetFlavor) {
return new ImageLoaderWMF(targetFlavor);
}
-
+
/** {@inheritDoc} */
public int getUsagePenalty(String mime, ImageFlavor flavor) {
return 0;
diff --git a/src/java/org/apache/fop/image/loader/batik/ImageLoaderSVG.java b/src/java/org/apache/fop/image/loader/batik/ImageLoaderSVG.java
index 64aff962b..483d6c502 100644
--- a/src/java/org/apache/fop/image/loader/batik/ImageLoaderSVG.java
+++ b/src/java/org/apache/fop/image/loader/batik/ImageLoaderSVG.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.
@@ -50,7 +50,7 @@ public class ImageLoaderSVG extends AbstractImageLoader {
}
this.targetFlavor = targetFlavor;
}
-
+
/** {@inheritDoc} */
public ImageFlavor getTargetFlavor() {
return this.targetFlavor;
diff --git a/src/java/org/apache/fop/image/loader/batik/ImageLoaderWMF.java b/src/java/org/apache/fop/image/loader/batik/ImageLoaderWMF.java
index e7f3e0f0a..bed3043c6 100644
--- a/src/java/org/apache/fop/image/loader/batik/ImageLoaderWMF.java
+++ b/src/java/org/apache/fop/image/loader/batik/ImageLoaderWMF.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.
@@ -46,7 +46,7 @@ public class ImageLoaderWMF extends AbstractImageLoader {
}
this.targetFlavor = targetFlavor;
}
-
+
/** {@inheritDoc} */
public ImageFlavor getTargetFlavor() {
return this.targetFlavor;
diff --git a/src/java/org/apache/fop/image/loader/batik/ImageWMF.java b/src/java/org/apache/fop/image/loader/batik/ImageWMF.java
index f785d27cc..a927345f9 100644
--- a/src/java/org/apache/fop/image/loader/batik/ImageWMF.java
+++ b/src/java/org/apache/fop/image/loader/batik/ImageWMF.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.
@@ -35,9 +35,9 @@ public class ImageWMF extends AbstractImage {
/** ImageFlavor for Batik's WMFRecordStore */
public static final ImageFlavor WMF_IMAGE = new ImageFlavor("WMFRecordStore");
-
+
private WMFRecordStore store;
-
+
/**
* Main constructor.
* @param info the image info object
@@ -47,7 +47,7 @@ public class ImageWMF extends AbstractImage {
super(info);
this.store = store;
}
-
+
/** {@inheritDoc} */
public ImageFlavor getFlavor() {
return WMF_IMAGE;
@@ -57,7 +57,7 @@ public class ImageWMF extends AbstractImage {
public boolean isCacheable() {
return true;
}
-
+
/**
* Returns the contained WMF record store.
* @return the WMFRecordStore
@@ -65,5 +65,5 @@ public class ImageWMF extends AbstractImage {
public WMFRecordStore getRecordStore() {
return this.store;
}
-
+
}
diff --git a/src/java/org/apache/fop/image/loader/batik/PreloaderSVG.java b/src/java/org/apache/fop/image/loader/batik/PreloaderSVG.java
index 20557a644..ce6cde9d9 100644
--- a/src/java/org/apache/fop/image/loader/batik/PreloaderSVG.java
+++ b/src/java/org/apache/fop/image/loader/batik/PreloaderSVG.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.image.loader.batik;
import java.awt.geom.AffineTransform;
@@ -59,8 +59,8 @@ public class PreloaderSVG extends AbstractImagePreloader {
private static Log log = LogFactory.getLog(PreloaderSVG.class);
private boolean batikAvailable = true;
-
- /** {@inheritDoc} */
+
+ /** {@inheritDoc} */
public ImageInfo preloadImage(String uri, Source src, ImageContext context)
throws IOException {
ImageInfo info = null;
@@ -122,7 +122,7 @@ public class PreloaderSVG extends AbstractImagePreloader {
doc = (SVGDocument) factory.createSVGDocument(src.getSystemId(), in);
}
ImageInfo info = createImageInfo(uri, context, doc);
-
+
return info;
} catch (NoClassDefFoundError ncdfe) {
if (in != null) {
@@ -154,7 +154,7 @@ public class PreloaderSVG extends AbstractImagePreloader {
private ImageInfo createImageInfo(String uri, ImageContext context, SVGDocument doc) {
Element e = doc.getRootElement();
- float pxUnitToMillimeter = 25.4f / context.getSourceResolution();
+ float pxUnitToMillimeter = 25.4f / context.getSourceResolution();
UserAgent userAg = new SimpleSVGUserAgent(pxUnitToMillimeter,
new AffineTransform()) {
@@ -162,7 +162,7 @@ public class PreloaderSVG extends AbstractImagePreloader {
public void displayMessage(String message) {
log.debug(message);
}
-
+
};
BridgeContext ctx = new BridgeContext(userAg);
UnitProcessor.Context uctx = UnitProcessor.createContext(ctx, e);
@@ -198,7 +198,7 @@ public class PreloaderSVG extends AbstractImagePreloader {
info.getCustomObjects().put(ImageInfo.ORIGINAL_IMAGE, xmlImage);
return info;
}
-
+
private boolean isSupportedSource(Source src) {
if (src instanceof DOMSource) {
DOMSource domSrc = (DOMSource)src;
diff --git a/src/java/org/apache/fop/image/loader/batik/PreloaderWMF.java b/src/java/org/apache/fop/image/loader/batik/PreloaderWMF.java
index abb740411..4e78f8193 100644
--- a/src/java/org/apache/fop/image/loader/batik/PreloaderWMF.java
+++ b/src/java/org/apache/fop/image/loader/batik/PreloaderWMF.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.image.loader.batik;
import java.io.DataInputStream;
@@ -49,8 +49,8 @@ public class PreloaderWMF extends AbstractImagePreloader {
private static Log log = LogFactory.getLog(PreloaderWMF.class);
private boolean batikAvailable = true;
-
- /** {@inheritDoc} */
+
+ /** {@inheritDoc} */
public ImageInfo preloadImage(String uri, Source src, ImageContext context)
throws IOException {
if (!ImageUtil.hasInputStream(src)) {
@@ -86,7 +86,7 @@ public class PreloaderWMF extends AbstractImagePreloader {
InputStream in = new UnclosableInputStream(ImageUtil.needInputStream(src));
try {
in.mark(4 + 1);
-
+
DataInputStream din = new DataInputStream(in);
int magic = EndianUtils.swapInteger(din.readInt());
din.reset();
@@ -97,11 +97,11 @@ public class PreloaderWMF extends AbstractImagePreloader {
WMFRecordStore wmfStore = new WMFRecordStore();
wmfStore.read(din);
IOUtils.closeQuietly(din);
-
+
int width = wmfStore.getWidthUnits();
int height = wmfStore.getHeightUnits();
int dpi = wmfStore.getMetaFileUnitsPerInch();
-
+
ImageInfo info = new ImageInfo(uri, "image/x-wmf");
ImageSize size = new ImageSize();
size.setSizeInPixels(width, height);
@@ -110,7 +110,7 @@ public class PreloaderWMF extends AbstractImagePreloader {
info.setSize(size);
ImageWMF img = new ImageWMF(info, wmfStore);
info.getCustomObjects().put(ImageInfo.ORIGINAL_IMAGE, img);
-
+
return info;
} catch (NoClassDefFoundError ncdfe) {
try {