You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-commits@xmlgraphics.apache.org by ca...@apache.org on 2006/11/16 12:16:21 UTC

svn commit: r475685 [35/35] - in /xmlgraphics/batik/trunk: ./ contrib/charts/xsl/ contrib/rasterizertask/ contrib/rasterizertask/sources/org/apache/tools/ant/taskdefs/optional/ contrib/scroll/ resources/org/apache/batik/apps/svgbrowser/resources/ resou...

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/DOMTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/DOMTest.java?view=diff&rev=475685&r1=475684&r2=475685
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/DOMTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/DOMTest.java Thu Nov 16 03:16:05 2006
@@ -50,32 +50,32 @@
      * Creates the <tt>TranscoderInput</tt>.
      */
     protected TranscoderInput createTranscoderInput() {
-	DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
-	String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
-	Document doc = impl.createDocument(svgNS, "svg", null);
+        DOMImplementation impl = SVGDOMImplementation.getDOMImplementation();
+        String svgNS = SVGDOMImplementation.SVG_NAMESPACE_URI;
+        Document doc = impl.createDocument(svgNS, "svg", null);
 
-	Element root = doc.getDocumentElement();
+        Element root = doc.getDocumentElement();
 
-	root.setAttributeNS(null, "width", "400");
-	root.setAttributeNS(null, "height", "400");
+        root.setAttributeNS(null, "width", "400");
+        root.setAttributeNS(null, "height", "400");
 
-	Element r = doc.createElementNS(svgNS, "rect");
-	r.setAttributeNS(null, "x", "0");
-	r.setAttributeNS(null, "y", "0");
-	r.setAttributeNS(null, "width", "400");
-	r.setAttributeNS(null, "height", "400");
-	r.setAttributeNS(null, "style", "fill:black");
-	root.appendChild(r);
+        Element r = doc.createElementNS(svgNS, "rect");
+        r.setAttributeNS(null, "x", "0");
+        r.setAttributeNS(null, "y", "0");
+        r.setAttributeNS(null, "width", "400");
+        r.setAttributeNS(null, "height", "400");
+        r.setAttributeNS(null, "style", "fill:black");
+        root.appendChild(r);
 
-	r = doc.createElementNS(svgNS, "rect");
-	r.setAttributeNS(null, "x", "100");
-	r.setAttributeNS(null, "y", "50");
-	r.setAttributeNS(null, "width", "100");
-	r.setAttributeNS(null, "height", "50");
-	r.setAttributeNS(null, "style", "stroke:red; fill:none");
-	root.appendChild(r);
+        r = doc.createElementNS(svgNS, "rect");
+        r.setAttributeNS(null, "x", "100");
+        r.setAttributeNS(null, "y", "50");
+        r.setAttributeNS(null, "width", "100");
+        r.setAttributeNS(null, "height", "50");
+        r.setAttributeNS(null, "style", "stroke:red; fill:none");
+        root.appendChild(r);
 
-	return new TranscoderInput(doc);
+        return new TranscoderInput(doc);
     }
 
     /**

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/DefaultFontFamilyTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/DefaultFontFamilyTest.java?view=diff&rev=475685&r1=475684&r2=475685
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/DefaultFontFamilyTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/DefaultFontFamilyTest.java Thu Nov 16 03:16:05 2006
@@ -50,31 +50,31 @@
     public DefaultFontFamilyTest(String inputURI, 
                                  String refImageURI, 
                                  String defaultFontFamily) {
-	this.inputURI = inputURI;
-	this.refImageURI = refImageURI;
-	this.defaultFontFamily = defaultFontFamily;
+        this.inputURI = inputURI;
+        this.refImageURI = refImageURI;
+        this.defaultFontFamily = defaultFontFamily;
     }
 
     /**
      * Creates the <tt>TranscoderInput</tt>.
      */
     protected TranscoderInput createTranscoderInput() {
-	return new TranscoderInput(resolveURL(inputURI).toString());
+        return new TranscoderInput(resolveURL(inputURI).toString());
     }
     
     /**
      * Creates a Map that contains additional transcoding hints.
      */
     protected Map createTranscodingHints() {
-	Map hints = new HashMap(3);
-	hints.put(ImageTranscoder.KEY_DEFAULT_FONT_FAMILY, defaultFontFamily);
-	return hints;
+        Map hints = new HashMap(3);
+        hints.put(ImageTranscoder.KEY_DEFAULT_FONT_FAMILY, defaultFontFamily);
+        return hints;
     }
 
     /**
      * Returns the reference image for this test.
      */
     protected byte [] getReferenceImageData() {
-	return createBufferedImageData(resolveURL(refImageURI));
+        return createBufferedImageData(resolveURL(refImageURI));
     }
 }

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/DimensionTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/DimensionTest.java?view=diff&rev=475685&r1=475684&r2=475685
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/DimensionTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/DimensionTest.java Thu Nov 16 03:16:05 2006
@@ -53,40 +53,40 @@
      * @param height the image height
      */
     public DimensionTest(String inputURI, 
-			 String refImageURI, 
-			 Float width,
-			 Float height) {
-	this.inputURI = inputURI;
-	this.refImageURI = refImageURI;
-	this.width = width;
-	this.height = height;
+                         String refImageURI, 
+                         Float width,
+                         Float height) {
+        this.inputURI = inputURI;
+        this.refImageURI = refImageURI;
+        this.width = width;
+        this.height = height;
     }
 
     /**
      * Creates the <tt>TranscoderInput</tt>.
      */
     protected TranscoderInput createTranscoderInput() {
-	return new TranscoderInput(resolveURL(inputURI).toString());
+        return new TranscoderInput(resolveURL(inputURI).toString());
     }
     
     /**
      * Creates a Map that contains additional transcoding hints.
      */
     protected Map createTranscodingHints() {
-	Map hints = new HashMap(7);
-	if (width.floatValue() > 0) {
-	    hints.put(ImageTranscoder.KEY_WIDTH, width);
-	}
-	if (height.floatValue() > 0) {
-	    hints.put(ImageTranscoder.KEY_HEIGHT, height);
-	}
-	return hints;
+        Map hints = new HashMap(7);
+        if (width.floatValue() > 0) {
+            hints.put(ImageTranscoder.KEY_WIDTH, width);
+        }
+        if (height.floatValue() > 0) {
+            hints.put(ImageTranscoder.KEY_HEIGHT, height);
+        }
+        return hints;
     }
 
     /**
      * Returns the reference image for this test.
      */
     protected byte [] getReferenceImageData() {
-	return createBufferedImageData(resolveURL(refImageURI));
+        return createBufferedImageData(resolveURL(refImageURI));
     }
 }

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/GenericDocumentTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/GenericDocumentTest.java?view=diff&rev=475685&r1=475684&r2=475685
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/GenericDocumentTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/GenericDocumentTest.java Thu Nov 16 03:16:05 2006
@@ -50,34 +50,34 @@
      * @param refImageURI the URI of the reference image
      */
     public GenericDocumentTest(String inputURI, String refImageURI) {
-	this.inputURI    = inputURI;
-	this.refImageURI = refImageURI;
+        this.inputURI    = inputURI;
+        this.refImageURI = refImageURI;
     }
 
     /**
      * Creates the <tt>TranscoderInput</tt>.
      */
     protected TranscoderInput createTranscoderInput() {
-	try {
-	    URL url = resolveURL(inputURI);
+        try {
+            URL url = resolveURL(inputURI);
             String parser = XMLResourceDescriptor.getXMLParserClassName();
             DOMImplementation impl = 
                 GenericDOMImplementation.getDOMImplementation();
             SAXDocumentFactory f = new SAXDocumentFactory(impl, parser);
             Document doc = f.createDocument(url.toString());
-	    TranscoderInput input = new TranscoderInput(doc);
-	    input.setURI(url.toString()); // Needed for external resources
-	    return input;
-	} catch (IOException ex) {
+            TranscoderInput input = new TranscoderInput(doc);
+            input.setURI(url.toString()); // Needed for external resources
+            return input;
+        } catch (IOException ex) {
             ex.printStackTrace();
             throw new IllegalArgumentException(inputURI);
-	}
+        }
     }
 
     /**
      * Returns the reference image for this test.
      */
     protected byte [] getReferenceImageData() {
-	return createBufferedImageData(resolveURL(refImageURI));
+        return createBufferedImageData(resolveURL(refImageURI));
     }
 }

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/InputStreamTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/InputStreamTest.java?view=diff&rev=475685&r1=475684&r2=475685
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/InputStreamTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/InputStreamTest.java Thu Nov 16 03:16:05 2006
@@ -45,29 +45,29 @@
      * @param refImageURI the URI of the reference image
      */
     public InputStreamTest(String inputURI, String refImageURI) {
-	this.inputURI = inputURI;
-	this.refImageURI = refImageURI;
+        this.inputURI = inputURI;
+        this.refImageURI = refImageURI;
     }
 
     /**
      * Creates the <tt>TranscoderInput</tt>.
      */
     protected TranscoderInput createTranscoderInput() {
-	try {
-	    URL url = resolveURL(inputURI);
-	    InputStream istream = url.openStream();
-	    TranscoderInput input = new TranscoderInput(istream);
-	    input.setURI(url.toString()); // Needed for external resources
-	    return input;
-	} catch (IOException ex) {
+        try {
+            URL url = resolveURL(inputURI);
+            InputStream istream = url.openStream();
+            TranscoderInput input = new TranscoderInput(istream);
+            input.setURI(url.toString()); // Needed for external resources
+            return input;
+        } catch (IOException ex) {
             throw new IllegalArgumentException(inputURI);
-	}
+        }
     }
 
     /**
      * Returns the reference image for this test.
      */
     protected byte [] getReferenceImageData() {
-	return createBufferedImageData(resolveURL(refImageURI));
+        return createBufferedImageData(resolveURL(refImageURI));
     }
 }

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/LanguageTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/LanguageTest.java?view=diff&rev=475685&r1=475684&r2=475685
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/LanguageTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/LanguageTest.java Thu Nov 16 03:16:05 2006
@@ -51,33 +51,33 @@
      * @param language the preferred language
      */
     public LanguageTest(String inputURI, 
-			String refImageURI, 
-			String language) {
-	this.inputURI = inputURI;
-	this.refImageURI = refImageURI;
-	this.language = language;
+                        String refImageURI, 
+                        String language) {
+        this.inputURI = inputURI;
+        this.refImageURI = refImageURI;
+        this.language = language;
     }
 
     /**
      * Creates the <tt>TranscoderInput</tt>.
      */
     protected TranscoderInput createTranscoderInput() {
-	return new TranscoderInput(resolveURL(inputURI).toString());
+        return new TranscoderInput(resolveURL(inputURI).toString());
     }
     
     /**
      * Creates a Map that contains additional transcoding hints.
      */
     protected Map createTranscodingHints() {
-	Map hints = new HashMap(7);
-	hints.put(ImageTranscoder.KEY_LANGUAGE, language);
-	return hints;
+        Map hints = new HashMap(7);
+        hints.put(ImageTranscoder.KEY_LANGUAGE, language);
+        return hints;
     }
 
     /**
      * Returns the reference image for this test.
      */
     protected byte [] getReferenceImageData() {
-	return createBufferedImageData(resolveURL(refImageURI));
+        return createBufferedImageData(resolveURL(refImageURI));
     }
 }

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/MediaTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/MediaTest.java?view=diff&rev=475685&r1=475684&r2=475685
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/MediaTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/MediaTest.java Thu Nov 16 03:16:05 2006
@@ -48,31 +48,31 @@
      * @param media the CSS media
      */
     public MediaTest(String inputURI, String refImageURI, String media) {
-	this.inputURI = inputURI;
-	this.refImageURI = refImageURI;
-	this.media = media;
+        this.inputURI = inputURI;
+        this.refImageURI = refImageURI;
+        this.media = media;
     }
 
     /**
      * Creates the <tt>TranscoderInput</tt>.
      */
     protected TranscoderInput createTranscoderInput() {
-	return new TranscoderInput(resolveURL(inputURI).toString());
+        return new TranscoderInput(resolveURL(inputURI).toString());
     }
     
     /**
      * Creates a Map that contains additional transcoding hints.
      */
     protected Map createTranscodingHints() {
-	Map hints = new HashMap(3);
-	hints.put(ImageTranscoder.KEY_MEDIA, media);
-	return hints;
+        Map hints = new HashMap(3);
+        hints.put(ImageTranscoder.KEY_MEDIA, media);
+        return hints;
     }
 
     /**
      * Returns the reference image for this test.
      */
     protected byte [] getReferenceImageData() {
-	return createBufferedImageData(resolveURL(refImageURI));
+        return createBufferedImageData(resolveURL(refImageURI));
     }
 }

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/ParametrizedDOMTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/ParametrizedDOMTest.java?view=diff&rev=475685&r1=475684&r2=475685
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/ParametrizedDOMTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/ParametrizedDOMTest.java Thu Nov 16 03:16:05 2006
@@ -47,28 +47,28 @@
      * @param refImageURI the URI of the reference image
      */
     public ParametrizedDOMTest(String inputURI, String refImageURI) {
-	this.inputURI = inputURI;
-	this.refImageURI = refImageURI;
+        this.inputURI = inputURI;
+        this.refImageURI = refImageURI;
     }
 
     /**
      * Creates the <tt>TranscoderInput</tt>.
      */
     protected TranscoderInput createTranscoderInput() {
-	try {
-	    String parser = XMLResourceDescriptor.getXMLParserClassName();
-	    SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
-	    Document doc = f.createDocument(resolveURL(inputURI).toString());
-	    return new TranscoderInput(doc);
-	} catch (IOException ex) {
+        try {
+            String parser = XMLResourceDescriptor.getXMLParserClassName();
+            SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser);
+            Document doc = f.createDocument(resolveURL(inputURI).toString());
+            return new TranscoderInput(doc);
+        } catch (IOException ex) {
             throw new IllegalArgumentException(inputURI);
-	}
+        }
     }
 
     /**
      * Returns the reference image for this test.
      */
     protected byte [] getReferenceImageData() {
-	return createBufferedImageData(resolveURL(refImageURI));
+        return createBufferedImageData(resolveURL(refImageURI));
     }
 }

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/PixelToMMTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/PixelToMMTest.java?view=diff&rev=475685&r1=475684&r2=475685
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/PixelToMMTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/PixelToMMTest.java Thu Nov 16 03:16:05 2006
@@ -48,8 +48,8 @@
      * @param px2mm the pixel to mm conversion factor
      */
     public PixelToMMTest(String inputURI, 
-			 String refImageURI, 
-			 Float px2mm) {
+                         String refImageURI, 
+                         Float px2mm) {
         this.inputURI = inputURI;
         this.refImageURI = refImageURI;
         this.px2mm = px2mm;

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/ReaderTest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/ReaderTest.java?view=diff&rev=475685&r1=475684&r2=475685
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/ReaderTest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/ReaderTest.java Thu Nov 16 03:16:05 2006
@@ -46,29 +46,29 @@
      * @param refImageURI the URI of the reference image
      */
     public ReaderTest(String inputURI, String refImageURI) {
-	this.inputURI = inputURI;
-	this.refImageURI = refImageURI;
+        this.inputURI = inputURI;
+        this.refImageURI = refImageURI;
     }
 
     /**
      * Creates the <tt>TranscoderInput</tt>.
      */
     protected TranscoderInput createTranscoderInput() {
-	try {
-	    URL url = resolveURL(inputURI);
-	    Reader reader = new InputStreamReader(url.openStream());
-	    TranscoderInput input = new TranscoderInput(reader);
-	    input.setURI(url.toString()); // Needed for external resources
-	    return input;
-	} catch (IOException ex) {
+        try {
+            URL url = resolveURL(inputURI);
+            Reader reader = new InputStreamReader(url.openStream());
+            TranscoderInput input = new TranscoderInput(reader);
+            input.setURI(url.toString()); // Needed for external resources
+            return input;
+        } catch (IOException ex) {
             throw new IllegalArgumentException(inputURI);
-	}
+        }
     }
 
     /**
      * Returns the reference image for this test.
      */
     protected byte [] getReferenceImageData() {
-	return createBufferedImageData(resolveURL(refImageURI));
+        return createBufferedImageData(resolveURL(refImageURI));
     }
 }

Modified: xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/URITest.java
URL: http://svn.apache.org/viewvc/xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/URITest.java?view=diff&rev=475685&r1=475684&r2=475685
==============================================================================
--- xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/URITest.java (original)
+++ xmlgraphics/batik/trunk/test-sources/org/apache/batik/transcoder/image/URITest.java Thu Nov 16 03:16:05 2006
@@ -40,21 +40,21 @@
      * @param refImageURI the URI of the reference image
      */
     public URITest(String inputURI, String refImageURI) {
-	this.inputURI = inputURI;
-	this.refImageURI = refImageURI;
+        this.inputURI = inputURI;
+        this.refImageURI = refImageURI;
     }
 
     /**
      * Creates the <tt>TranscoderInput</tt>.
      */
     protected TranscoderInput createTranscoderInput() {
-	return new TranscoderInput(resolveURL(inputURI).toString());
+        return new TranscoderInput(resolveURL(inputURI).toString());
     }
 
     /**
      * Returns the reference image for this test.
      */
     protected byte [] getReferenceImageData() {
-	return createBufferedImageData(resolveURL(refImageURI));
+        return createBufferedImageData(resolveURL(refImageURI));
     }
 }