You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2008/07/25 14:46:22 UTC

svn commit: r679781 [26/34] - in /xmlgraphics/fop/branches/Temp_AreaTreeNewDesign: ./ examples/embedding/java/embedding/ examples/embedding/java/embedding/events/ examples/embedding/java/embedding/intermediate/ examples/embedding/java/embedding/model/ ...

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/print/PageableRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/print/PageableRenderer.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/print/PageableRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/print/PageableRenderer.java Fri Jul 25 05:44:20 2008
@@ -57,8 +57,8 @@
      * datatype: a positive Integer
      */
     public static final String END_PAGE = "end-page";
-    
-    
+
+
     /** first valid page number (1-based) */
     protected int startNumber = 0;
     /** last valid page number (1-based) */
@@ -68,17 +68,17 @@
     protected PagesMode mode = PagesMode.ALL;
 
     private PageFilter pageFilter;
-    
+
     /**
      * Creates a new PageableRenderer.
      */
     public PageableRenderer() {
     }
-    
+
     /** {@inheritDoc} */
     public void setUserAgent(FOUserAgent agent) {
         super.setUserAgent(agent);
-        
+
         Map rendererOptions = agent.getRendererOptions();
         processOptions(rendererOptions);
         this.pageFilter = new DefaultPageFilter();
@@ -97,7 +97,7 @@
                         + " must be an 'all', 'even', 'odd' or a PagesMode instance.");
             }
         }
-        
+
         o = rendererOptions.get(PageableRenderer.START_PAGE);
         if (o != null) {
             this.startNumber = getPositiveInteger(o);
@@ -132,7 +132,7 @@
                     "Value must be a positive integer");
         }
     }
-    
+
     /** {@inheritDoc} */
     public void stopRenderer() throws IOException {
         super.stopRenderer();
@@ -149,13 +149,13 @@
             super.rememberPage(pageViewport);
         }
     }
-    
+
     private interface PageFilter {
         boolean isValid(PageViewport page);
     }
 
     private class DefaultPageFilter implements PageFilter {
-        
+
         public boolean isValid(PageViewport page) {
             int pageNum = page.getPageIndex() + 1;
             assert pageNum >= 0;
@@ -171,7 +171,7 @@
             return true;
         }
     }
-    
+
     /** {@inheritDoc} */
     public PageFormat getPageFormat(int pageIndex)
             throws IndexOutOfBoundsException {
@@ -179,15 +179,15 @@
             if (pageIndex >= getNumberOfPages()) {
                 return null;
             }
-    
+
             PageFormat pageFormat = new PageFormat();
-    
+
             Paper paper = new Paper();
-    
+
             Rectangle2D dim = getPageViewport(pageIndex).getViewArea();
             double width = dim.getWidth();
             double height = dim.getHeight();
-    
+
             // if the width is greater than the height assume landscape mode
             // and swap the width and height values in the paper format
             if (width > height) {

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/print/PagesMode.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/print/PagesMode.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/print/PagesMode.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/print/PagesMode.java Fri Jul 25 05:44:20 2008
@@ -28,7 +28,7 @@
     public static final PagesMode EVEN = new PagesMode("even");
     /** the odd pages mode */
     public static final PagesMode ODD = new PagesMode("odd");
-    
+
     private String name;
 
     /**
@@ -43,7 +43,7 @@
     public String getName() {
         return this.name;
     }
-    
+
     /**
      * Returns a PagesMode instance by name.
      * @param name the name of the pages mode
@@ -60,10 +60,10 @@
             throw new IllegalArgumentException("Invalid value for PagesMode: " + name);
         }
     }
-    
+
     /** {@inheritDoc} */
     public String toString() {
         return "PagesMode:" + name;
     }
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/print/PrintRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/print/PrintRenderer.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/print/PrintRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/print/PrintRenderer.java Fri Jul 25 05:44:20 2008
@@ -39,14 +39,14 @@
      * datatype: java.awt.print.PrinterJob
      */
     public static final String PRINTER_JOB = "printerjob";
-  
+
     /**
      * Printing parameter: the number of copies of the document to be printed,
      * datatype: a positive Integer
      */
     public static final String COPIES = "copies";
-    
-    
+
+
     private int copies = 1;
 
     private PrinterJob printerJob;
@@ -57,7 +57,7 @@
      */
     public PrintRenderer() {
     }
-    
+
     /**
      * Creates a new PrintRenderer and allows you to pass in a specific PrinterJob instance
      * that this renderer should work with.
@@ -69,7 +69,7 @@
         this.printerJob = printerJob;
         printerJob.setPageable(this);
     }
-    
+
     private void initializePrinterJob() {
         if (this.printerJob == null) {
             printerJob = PrinterJob.getPrinterJob();
@@ -88,9 +88,9 @@
     /** {@inheritDoc} */
     public void setUserAgent(FOUserAgent agent) {
         super.setUserAgent(agent);
-        
+
         Map rendererOptions = agent.getRendererOptions();
-        
+
         Object printerJobO = rendererOptions.get(PrintRenderer.PRINTER_JOB);
         if (printerJobO != null) {
             if (!(printerJobO instanceof PrinterJob)) {
@@ -118,7 +118,7 @@
     public int getEndNumber() {
         return endNumber;
     }
-    
+
     /**
      * Sets the number of the last page to be printed.
      * @param end The ending page number
@@ -126,12 +126,12 @@
     public void setEndPage(int end) {
         this.endNumber = end;
     }
-    
+
     /** @return the starting page number */
     public int getStartPage() {
         return startNumber;
     }
-    
+
     /**
      * Sets the number of the first page to be printed.
      * @param start The starting page number
@@ -139,7 +139,7 @@
     public void setStartPage(int start) {
         this.startNumber = start;
     }
-    
+
     /** {@inheritDoc} */
     public void stopRenderer() throws IOException {
         super.stopRenderer();

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/print/PrintRendererMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/print/PrintRendererMaker.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/print/PrintRendererMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/print/PrintRendererMaker.java Fri Jul 25 05:44:20 2008
@@ -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.
@@ -32,7 +32,7 @@
 public class PrintRendererMaker extends AbstractRendererMaker {
 
     private static final String[] MIMES = new String[] {MimeConstants.MIME_FOP_PRINT};
-    
+
     /**{@inheritDoc} */
     public Renderer makeRenderer(FOUserAgent userAgent) {
         return new PrintRenderer();

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/AbstractPSTranscoder.java Fri Jul 25 05:44:20 2008
@@ -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.

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/EPSTranscoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/EPSTranscoder.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/EPSTranscoder.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/EPSTranscoder.java Fri Jul 25 05:44:20 2008
@@ -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.ps;
 
 import org.apache.xmlgraphics.java2d.ps.AbstractPSDocumentGraphics2D;

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/ImageEncoderCCITTFax.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/ImageEncoderCCITTFax.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/ImageEncoderCCITTFax.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/ImageEncoderCCITTFax.java Fri Jul 25 05:44:20 2008
@@ -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,7 +31,7 @@
  * ImageEncoder implementation for CCITT encoded images.
  */
 public class ImageEncoderCCITTFax implements ImageEncoder {
-    
+
     private final ImageRawCCITTFax ccitt;
 
     /**
@@ -66,7 +66,7 @@
             throw new IllegalStateException(
                     "Invalid compression scheme: " + compression);
         }
-        
+
         return dict.toString() + " /CCITTFaxDecode";
     }
 }
\ No newline at end of file

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/ImageEncoderJPEG.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/ImageEncoderJPEG.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/ImageEncoderJPEG.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/ImageEncoderJPEG.java Fri Jul 25 05:44:20 2008
@@ -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.

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSEventProducer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSEventProducer.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSEventProducer.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSEventProducer.java Fri Jul 25 05:44:20 2008
@@ -31,7 +31,7 @@
 
     /** Provider class for the event producer. */
     class Provider {
-        
+
         /**
          * Returns an event producer.
          * @param broadcaster the event broadcaster to use
@@ -50,9 +50,9 @@
         public EventModel createEventModel() {
             return loadModel(getClass(), "event-model.xml");
         }
-        
+
     }
-    
+
     /**
      * A PostScript dictionary could not be parsed.
      * @param source the event source
@@ -61,5 +61,5 @@
      * @event.severity ERROR
      */
     void postscriptDictionaryParseError(Object source, String content, Exception e);
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSEventProducer.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSEventProducer.xml?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSEventProducer.xml (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSEventProducer.xml Fri Jul 25 05:44:20 2008
@@ -1,4 +1,3 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<catalogue xml:lang="en">
+<?xml version="1.0" encoding="UTF-8"?><catalogue xml:lang="en">
   <message key="org.apache.fop.render.ps.PSEventProducer.postscriptDictionaryParseError">Failed to parse dictionary string. Reason: {e}, content = "{content}"</message>
 </catalogue>

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSFontUtils.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSFontUtils.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSFontUtils.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSFontUtils.java Fri Jul 25 05:44:20 2008
@@ -55,7 +55,7 @@
 
     /** logging instance */
     protected static Log log = LogFactory.getLog(PSFontUtils.class);
-    
+
     /**
      * Generates the PostScript code for the font dictionary.
      * @param gen PostScript generator to use for output
@@ -63,11 +63,11 @@
      * @return a Map of PSResource instances representing all defined fonts (key: font key)
      * @throws IOException in case of an I/O problem
      */
-    public static Map writeFontDict(PSGenerator gen, FontInfo fontInfo) 
+    public static Map writeFontDict(PSGenerator gen, FontInfo fontInfo)
                 throws IOException {
         return writeFontDict(gen, fontInfo, fontInfo.getFonts());
     }
-    
+
     /**
      * Generates the PostScript code for the font dictionary.
      * @param gen PostScript generator to use for output
@@ -76,7 +76,7 @@
      * @return a Map of PSResource instances representing all defined fonts (key: font key)
      * @throws IOException in case of an I/O problem
      */
-    public static Map writeFontDict(PSGenerator gen, FontInfo fontInfo, Map fonts) 
+    public static Map writeFontDict(PSGenerator gen, FontInfo fontInfo, Map fonts)
                 throws IOException {
         gen.commentln("%FOPBeginFontDict");
 
@@ -88,7 +88,7 @@
             PSResource fontRes = new PSResource(PSResource.TYPE_FONT, tf.getFontName());
             fontResources.put(key, fontRes);
             embedFont(gen, tf, fontRes);
-            
+
             if (tf instanceof SingleByteFont) {
                 SingleByteFont sbf = (SingleByteFont)tf;
                 for (int i = 0, c = sbf.getAdditionalEncodingCount(); i < c; i++) {
@@ -108,12 +108,12 @@
 
     private static void reencodeFonts(PSGenerator gen, Map fonts) throws IOException {
         ResourceTracker tracker = gen.getResourceTracker();
-        
+
         if (!tracker.isResourceSupplied(WINANSI_ENCODING_RESOURCE)) {
             defineWinAnsiEncoding(gen);
         }
         gen.commentln("%FOPBeginFontReencode");
-        
+
         //Rewrite font encodings
         Iterator iter = fonts.keySet().iterator();
         while (iter.hasNext()) {
@@ -133,7 +133,7 @@
                 //ignore (no encoding redefinition)
             } else {
                 if (tf instanceof Base14Font) {
-                    //Our Base 14 fonts don't use the default encoding 
+                    //Our Base 14 fonts don't use the default encoding
                     redefineFontEncoding(gen, tf.getFontName(), tf.getEncodingName());
                 }
             }
@@ -149,7 +149,7 @@
         if (tf == null) {
             //This is to avoid an NPE if a malconfigured font is in the configuration but not
             //used in the document. If it were used, we wouldn't get this far.
-            String fallbackKey = fontInfo.getInternalFontKey(Font.DEFAULT_FONT); 
+            String fallbackKey = fontInfo.getInternalFontKey(Font.DEFAULT_FONT);
             tf = (Typeface)fonts.get(fallbackKey);
         }
         return tf;
@@ -162,7 +162,7 @@
      * @param fontRes the PSResource associated with the font
      * @throws IOException In case of an I/O error
      */
-    public static void embedFont(PSGenerator gen, Typeface tf, PSResource fontRes) 
+    public static void embedFont(PSGenerator gen, Typeface tf, PSResource fontRes)
                 throws IOException {
         boolean embeddedFont = false;
         if (FontType.TYPE1 == tf.getFontType()) {
@@ -171,7 +171,7 @@
                 if (isEmbeddable(cf)) {
                     InputStream in = getInputStreamOnFont(gen, cf);
                     if (in != null) {
-                        gen.writeDSCComment(DSCConstants.BEGIN_RESOURCE, 
+                        gen.writeDSCComment(DSCConstants.BEGIN_RESOURCE,
                                 fontRes);
                         embedType1Font(gen, in);
                         gen.writeDSCComment(DSCConstants.END_RESOURCE);
@@ -193,8 +193,8 @@
     private static boolean isEmbeddable(CustomFont font) {
         return font.isEmbeddable();
     }
-    
-    private static InputStream getInputStreamOnFont(PSGenerator gen, CustomFont font) 
+
+    private static InputStream getInputStreamOnFont(PSGenerator gen, CustomFont font)
                 throws IOException {
         if (isEmbeddable(font)) {
             Source source = font.getEmbedFileSource();
@@ -239,7 +239,7 @@
      * @param fonts the set of fonts to work with
      * @return a Map of PSResource instances representing all defined fonts (key: font key)
      */
-    public static Map determineSuppliedFonts(ResourceTracker resTracker, 
+    public static Map determineSuppliedFonts(ResourceTracker resTracker,
             FontInfo fontInfo, Map fonts) {
         Map fontResources = new java.util.HashMap();
         Iterator iter = fonts.keySet().iterator();
@@ -337,5 +337,5 @@
         gen.getResourceTracker().registerSuppliedResource(res);
         return res;
     }
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSGraphics2DAdapter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSGraphics2DAdapter.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSGraphics2DAdapter.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSGraphics2DAdapter.java Fri Jul 25 05:44:20 2008
@@ -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.ps;
 
 import java.awt.Dimension;
@@ -46,7 +46,7 @@
     public PSGraphics2DAdapter(PSRenderer renderer) {
         this(renderer.gen, true);
     }
-    
+
     /**
      * Constructor for use without a PSRenderer instance.
      * @param gen the PostScript generator
@@ -56,16 +56,16 @@
         this.gen = gen;
         this.clip = clip;
     }
-    
+
     /** {@inheritDoc} */
-    public void paintImage(Graphics2DImagePainter painter, 
+    public void paintImage(Graphics2DImagePainter painter,
             RendererContext context,
             int x, int y, int width, int height) throws IOException {
         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;
@@ -82,7 +82,7 @@
             gen.defineRect(fx, fy, fwidth, fheight);
             gen.writeln("clip");
         }
-        
+
         // transform so that the coordinates (0,0) is from the top left
         // and positive is down and to the right. (0,0) is where the
         // viewBox puts it.

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSImageFormResource.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSImageFormResource.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSImageFormResource.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSImageFormResource.java Fri Jul 25 05:44:20 2008
@@ -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.
@@ -28,7 +28,7 @@
 public class PSImageFormResource extends PSResource {
 
     private String uri;
-    
+
     /**
      * Create a new Form Resource.
      * @param id An ID for the form
@@ -37,7 +37,7 @@
     public PSImageFormResource(int id, String uri) {
         this("FOPForm:" + Integer.toString(id), uri);
     }
-    
+
     /**
     /**
      * Create a new Form Resource.
@@ -48,7 +48,7 @@
         super(PSResource.TYPE_FORM, name);
         this.uri = uri;
     }
-    
+
     /**
      * Returns the image URI.
      * @return the image URI
@@ -56,5 +56,5 @@
     public String getImageURI() {
         return this.uri;
     }
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSImageUtils.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSImageUtils.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSImageUtils.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSImageUtils.java Fri Jul 25 05:44:20 2008
@@ -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.ps;
 
 /**

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRenderer.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRenderer.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRenderer.java Fri Jul 25 05:44:20 2008
@@ -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.
@@ -121,7 +121,7 @@
  * <br>
  * This renderer inserts FOP-specific comments into the PostScript stream which
  * may help certain users to do certain types of post-processing of the output.
- * These comments all start with "%FOP". 
+ * These comments all start with "%FOP".
  *
  * @author <a href="mailto:fop-dev@xmlgraphics.apache.org">Apache FOP Development Team</a>
  * @version $Id$
@@ -150,7 +150,7 @@
     private OutputStream outputStream;
     /** the temporary file in case of two-pass processing */
     private File tempFile;
-    
+
     /** The PostScript generator used to output the PostScript */
     protected PSGenerator gen;
     /** Determines whether the PS file is generated in two passes to minimize file size */
@@ -181,13 +181,13 @@
 
     /** Is used to determine the document's bounding box */
     private Rectangle2D documentBoundingBox;
-    
+
     /** This is a collection holding all document header comments */
     private Collection headerComments;
 
     /** This is a collection holding all document footer comments */
     private Collection footerComments;
-    
+
     /** {@inheritDoc} */
     public void setUserAgent(FOUserAgent agent) {
         super.setUserAgent(agent);
@@ -215,7 +215,7 @@
             throw new IllegalArgumentException("Boolean or \"true\" or \"false\" expected.");
         }
     }
-    
+
     private int intValueOf(Object obj) {
         if (obj instanceof Integer) {
             return ((Integer)obj).intValue();
@@ -225,11 +225,11 @@
             throw new IllegalArgumentException("Integer or String with a number expected.");
         }
     }
-    
+
     /**
      * Sets the landscape mode for this renderer.
      * @param value false will normally generate a "pseudo-portrait" page, true will rotate
-     *              a "wider-than-long" page by 90 degrees. 
+     *              a "wider-than-long" page by 90 degrees.
      */
     public void setAutoRotateLandscape(boolean value) {
         this.autoRotateLandscape = value;
@@ -251,7 +251,7 @@
             throw new IllegalArgumentException("Only language levels 2 or 3 are allowed/supported");
         }
     }
-    
+
     /**
      * Return the PostScript language level that the renderer produces.
      * @return the language level
@@ -259,12 +259,12 @@
     public int getLanguageLevel() {
         return this.languageLevel;
     }
-    
+
     /**
      * Sets the resource optimization mode. If set to true, the renderer does two passes to
      * only embed the necessary resources in the PostScript file. This is slower, but produces
      * smaller files.
-     * @param value true to enable the resource optimization 
+     * @param value true to enable the resource optimization
      */
     public void setOptimizeResources(boolean value) {
         this.twoPassGeneration = value;
@@ -335,7 +335,7 @@
     protected void clip() {
         writeln("clip newpath");
     }
-    
+
     /** {@inheritDoc} */
     protected void clipRect(float x, float y, float width, float height) {
         try {
@@ -350,27 +350,27 @@
     protected void moveTo(float x, float y) {
         writeln(gen.formatDouble(x) + " " + gen.formatDouble(y) + " M");
     }
-    
+
     /**
-     * Moves the current point by (x, y) relative to the current position, 
-     * omitting any connecting line segment. 
+     * Moves the current point by (x, y) relative to the current position,
+     * omitting any connecting line segment.
      * @param x x coordinate
      * @param y y coordinate
      */
     protected void rmoveTo(float x, float y) {
         writeln(gen.formatDouble(x) + " " + gen.formatDouble(y) + " RM");
     }
-    
+
     /** {@inheritDoc} */
     protected void lineTo(float x, float y) {
         writeln(gen.formatDouble(x) + " " + gen.formatDouble(y) + " lineto");
     }
-    
+
     /** {@inheritDoc} */
     protected void closePath() {
         writeln("cp");
     }
-    
+
     /** {@inheritDoc} */
     protected void fillRect(float x, float y, float width, float height) {
         if (width != 0 && height != 0) {
@@ -400,7 +400,7 @@
     protected boolean isImageInlined(String uri) {
         return !isOptimizeResources() || uri == null || "".equals(uri);
     }
-    
+
     /**
      * Indicates whether an image should be inlined or added as a PostScript form.
      * @param info the ImageInfo object of the image
@@ -410,7 +410,7 @@
         if (isImageInlined(info.getOriginalURI())) {
             return true;
         }
-        
+
         if (!isOptimizeResources()) {
             throw new IllegalStateException("Must not get here if form support is enabled");
         }
@@ -423,7 +423,7 @@
                     info, inlineFlavors);
         ImageProviderPipeline inlineChoice = manager.choosePipeline(inlineCandidates);
         ImageFlavor inlineFlavor = (inlineChoice != null ? inlineChoice.getTargetFlavor() : null);
-        
+
         //Investigate choice for form mode
         ImageFlavor[] formFlavors = getFormFlavors();
         ImageProviderPipeline[] formCandidates
@@ -431,11 +431,11 @@
                     info, formFlavors);
         ImageProviderPipeline formChoice = manager.choosePipeline(formCandidates);
         ImageFlavor formFlavor = (formChoice != null ? formChoice.getTargetFlavor() : null);
-        
+
         //Inline if form is not supported or if a better choice is available with inline mode
         return formFlavor == null || !formFlavor.equals(inlineFlavor);
     }
-    
+
     /** {@inheritDoc} */
     protected void drawImage(String uri, Rectangle2D pos, Map foreignAttributes) {
         endTextObject();
@@ -445,7 +445,7 @@
         if (log.isDebugEnabled()) {
             log.debug("Handling image: " + uri);
         }
-        
+
         ImageManager manager = getUserAgent().getFactory().getImageManager();
         ImageInfo info = null;
         try {
@@ -453,7 +453,7 @@
             info = manager.getImageInfo(uri, sessionContext);
             int width = (int)pos.getWidth();
             int height = (int)pos.getHeight();
-            
+
             //millipoints --> points for PostScript
             float ptx = x / 1000f;
             float pty = y / 1000f;
@@ -468,7 +468,7 @@
                 Map hints = ImageUtil.getDefaultHints(sessionContext);
                 org.apache.xmlgraphics.image.loader.Image img = manager.getImage(
                         info, getInlineFlavors(), hints, sessionContext);
-                
+
                 //...and embed as inline image
                 if (img instanceof ImageGraphics2D) {
                     ImageGraphics2D imageG2D = (ImageGraphics2D)img;
@@ -488,7 +488,7 @@
                     final ImageRawStream raw = (ImageRawStream)img;
                     if (raw instanceof ImageRawEPS) {
                         ImageRawEPS eps = (ImageRawEPS)raw;
-                        Rectangle2D bbox = eps.getBoundingBox(); 
+                        Rectangle2D bbox = eps.getBoundingBox();
                         InputStream in = raw.createInputStream();
                         try {
                             PSImageUtils.renderEPS(in, uri,
@@ -525,9 +525,9 @@
                     log.debug("Image " + info + " is embedded as a form later");
                 }
                 //Don't load image at this time, just put a form placeholder in the stream
-                PSResource form = getFormForImage(uri);   
+                PSResource form = getFormForImage(uri);
                 Rectangle2D targetRect = new Rectangle2D.Double(ptx, pty, ptw, pth);
-                PSImageUtils.paintForm(form, info.getSize().getDimensionPt(), targetRect, gen);   
+                PSImageUtils.paintForm(form, info.getSize().getDimensionPt(), targetRect, gen);
             }
 
         } catch (ImageException ie) {
@@ -586,7 +586,7 @@
     }
 
     /** {@inheritDoc} */
-    public void paintImage(RenderedImage image, RendererContext context, 
+    public void paintImage(RenderedImage image, RendererContext context,
             int x, int y, int width, int height) throws IOException {
         float fx = (float)x / 1000f;
         x += currentIPPosition / 1000f;
@@ -606,12 +606,12 @@
      * @param endy the y end position
      */
     private void drawLine(float startx, float starty, float endx, float endy) {
-        writeln(gen.formatDouble(startx) + " " 
-                + gen.formatDouble(starty) + " M " 
-                + gen.formatDouble(endx) + " " 
+        writeln(gen.formatDouble(startx) + " "
+                + gen.formatDouble(starty) + " M "
+                + gen.formatDouble(endx) + " "
                 + gen.formatDouble(endy) + " lineto stroke newpath");
     }
-    
+
     /** Saves the graphics state of the rendering engine. */
     public void saveGraphicsState() {
         endTextObject();
@@ -673,7 +673,7 @@
             handleIOTrouble(ioe);
         }
     }
-    
+
     private String getPostScriptNameForFontKey(String key) {
         int pos = key.indexOf('_');
         String postFix = null;
@@ -695,7 +695,7 @@
             return tf.getFontName() + postFix;
         }
     }
-    
+
     /**
      * Returns the PSResource for the given font key.
      * @param key the font key ("F*")
@@ -706,7 +706,7 @@
         if (this.fontResources != null) {
             res = (PSResource)this.fontResources.get(key);
         } else {
-            this.fontResources = new java.util.HashMap(); 
+            this.fontResources = new java.util.HashMap();
         }
         if (res == null) {
             res = new PSResource(PSResource.TYPE_FONT, getPostScriptNameForFontKey(key));
@@ -714,7 +714,7 @@
         }
         return res;
     }
-    
+
     /**
      * Changes the currently used font.
      * @param key key of the font ("F*")
@@ -742,15 +742,15 @@
                 || area.hasTrait(Trait.BORDER_AFTER)
                 || area.hasTrait(Trait.BORDER_START)
                 || area.hasTrait(Trait.BORDER_END)) {
-            comment("%FOPBeginBackgroundAndBorder: " 
+            comment("%FOPBeginBackgroundAndBorder: "
                     + startx + " " + starty + " " + width + " " + height);
             super.drawBackAndBorders(area, startx, starty, width, height);
-            comment("%FOPEndBackgroundAndBorder"); 
+            comment("%FOPEndBackgroundAndBorder");
         }
     }
-    
+
     /** {@inheritDoc} */
-    protected void drawBorderLine(float x1, float y1, float x2, float y2, 
+    protected void drawBorderLine(float x1, float y1, float x2, float y2,
             boolean horz, boolean startOrBefore, int style, Color col) {
         try {
             float w = x2 - x1;
@@ -760,7 +760,7 @@
                 return;
             }
             switch (style) {
-                case Constants.EN_DASHED: 
+                case Constants.EN_DASHED:
                     useColor(col);
                     if (horz) {
                         float unit = Math.abs(2 * h);
@@ -902,14 +902,14 @@
             handleIOTrouble(ioe);
         }
     }
-    
+
     /** {@inheritDoc} */
     public void startRenderer(OutputStream outputStream)
                 throws IOException {
         log.debug("Rendering areas to PostScript...");
 
         this.outputStream = outputStream;
-        OutputStream out; 
+        OutputStream out;
         if (isOptimizeResources()) {
             this.tempFile = File.createTempFile("fop", null);
             out = new java.io.FileOutputStream(this.tempFile);
@@ -917,7 +917,7 @@
         } else {
             out = this.outputStream;
         }
-        
+
         //Setup for PostScript generation
         this.gen = new PSGenerator(out) {
             /** Need to subclass PSGenerator to have better URI resolution */
@@ -944,7 +944,7 @@
         gen.writeDSCComment(DSCConstants.BBOX, DSCConstants.ATEND);
         gen.writeDSCComment(DSCConstants.HIRES_BBOX, DSCConstants.ATEND);
         this.documentBoundingBox = new Rectangle2D.Double();
-        gen.writeDSCComment(DSCConstants.DOCUMENT_SUPPLIED_RESOURCES, 
+        gen.writeDSCComment(DSCConstants.DOCUMENT_SUPPLIED_RESOURCES,
                 new Object[] {DSCConstants.ATEND});
         if (headerComments != null) {
             for (Iterator iter = headerComments.iterator(); iter.hasNext();) {
@@ -988,7 +988,7 @@
             PSResource res = (PSResource)this.fontResources.get(key);
             gen.notifyResourceUsage(res);
         }*/
-        
+
         //Write trailer
         gen.writeDSCComment(DSCConstants.TRAILER);
         if (footerComments != null) {
@@ -1016,7 +1016,7 @@
             pageDeviceDictionary.clear();
         }
     }
-    
+
     /**
      * Used for two-pass production. This will rewrite the PostScript file from the temporary
      * file while adding all needed resources.
@@ -1030,7 +1030,7 @@
         in = new java.io.BufferedInputStream(in);
         try {
             try {
-                ResourceHandler.process(this.userAgent, in, this.outputStream, 
+                ResourceHandler.process(this.userAgent, in, this.outputStream,
                         this.fontInfo, resTracker, this.formResources,
                         this.currentPageNumber, this.documentBoundingBox);
                 this.outputStream.flush();
@@ -1100,7 +1100,7 @@
         }
         super.processOffDocumentItem(oDI);
     }
-    
+
     /**
      * Formats and writes a List of PSSetupCode instances to the output stream.
      * @param setupCodeList a List of PSSetupCode instances
@@ -1111,8 +1111,8 @@
             Iterator i = setupCodeList.iterator();
             while (i.hasNext()) {
                 PSSetupCode setupCode = (PSSetupCode)i.next();
-                gen.commentln("%FOPBegin" + type + ": (" 
-                        + (setupCode.getName() != null ? setupCode.getName() : "") 
+                gen.commentln("%FOPBegin" + type + ": ("
+                        + (setupCode.getName() != null ? setupCode.getName() : "")
                         + ")");
                 LineNumberReader reader = new LineNumberReader(
                         new java.io.StringReader(setupCode.getContent()));
@@ -1137,9 +1137,9 @@
         if (this.currentPageNumber == 0) {
             writeHeader();
         }
-        
+
         this.currentPageNumber++;
-        
+
         gen.getResourceTracker().notifyStartNewPage();
         gen.getResourceTracker().notifyResourceUsageOnPage(PSProcSets.STD_PROCSET);
         gen.writeDSCComment(DSCConstants.PAGE, new Object[]
@@ -1159,7 +1159,7 @@
             pageSizes.add(new Long(Math.round(pageHeight)));
         }
         pageDeviceDictionary.put("/PageSize", pageSizes);
-        
+
         if (page.hasExtensionAttachments()) {
             for (Iterator iter = page.getExtensionAttachments().iterator();
                 iter.hasNext();) {
@@ -1245,7 +1245,7 @@
             if (safeSetPageDevice) {
                 content += " SSPD";
             } else {
-                content += " setpagedevice"; 
+                content += " setpagedevice";
             }
             writeEnclosedExtensionAttachment(new PSSetPageDevice(content));
         }
@@ -1256,8 +1256,8 @@
         }
         concatMatrix(1, 0, 0, -1, 0, pageHeight);
 
-        gen.writeDSCComment(DSCConstants.END_PAGE_SETUP);            
-    
+        gen.writeDSCComment(DSCConstants.END_PAGE_SETUP);
+
         //Process page
         super.renderPage(page);
 
@@ -1287,7 +1287,7 @@
             comment("%FOPEndRegionViewport");
         }
     }
-    
+
     /** Indicates the beginning of a text object. */
     protected void beginTextObject() {
         if (!inTextMode) {
@@ -1327,16 +1327,16 @@
                 handleIOTrouble(ioe);
             }
         }
-        
+
         beginTextObject();
-        writeln("1 0 0 -1 " + gen.formatDouble(rx / 1000f) 
+        writeln("1 0 0 -1 " + gen.formatDouble(rx / 1000f)
                 + " " + gen.formatDouble(bl / 1000f) + " Tm");
-        
+
         super.renderText(area); //Updates IPD
 
         renderTextDecoration(tf, fontsize, area, bl, rx);
     }
-    
+
     /** {@inheritDoc} */
     protected void renderWord(WordArea word) {
         renderText((TextArea)word.getParentArea(), word.getWord(), word.getLetterAdjustArray());
@@ -1349,9 +1349,9 @@
         String s = space.getSpace();
         char sp = s.charAt(0);
         Font font = getFontFromArea(textArea);
-        
-        int tws = (space.isAdjustable() 
-                ? ((TextArea) space.getParentArea()).getTextWordSpaceAdjust() 
+
+        int tws = (space.isAdjustable()
+                ? ((TextArea) space.getParentArea()).getTextWordSpaceAdjust()
                         + 2 * textArea.getTextLetterSpaceAdjust()
                 : 0);
 
@@ -1366,7 +1366,7 @@
         }
         return tf;
     }
-    
+
     private void renderText(AbstractTextArea area, String text, int[] letterAdjust) {
         String fontkey = getInternalFontNameForArea(area);
         int fontSize = area.getTraitAsInteger(Trait.FONT_SIZE);
@@ -1411,8 +1411,8 @@
         int initialSize = text.length();
         initialSize += initialSize / 2;
         StringBuffer sb = new StringBuffer(initialSize);
-        if (letterAdjust == null 
-                && area.getTextLetterSpaceAdjust() == 0 
+        if (letterAdjust == null
+                && area.getTextLetterSpaceAdjust() == 0
                 && area.getTextWordSpaceAdjust() == 0) {
             sb.append("(");
             for (int i = start; i < end; i++) {
@@ -1437,7 +1437,7 @@
                 }
                 int cw = tf.getWidth(mapped, fontsize) / 1000;
                 int ladj = (letterAdjust != null && i < end - 1 ? letterAdjust[i + 1] : 0);
-                int tls = (i < end - 1 ? area.getTextLetterSpaceAdjust() : 0); 
+                int tls = (i < end - 1 ? area.getTextLetterSpaceAdjust() : 0);
                 offsets[i - start] = cw + ladj + tls + wordSpace;
                 PSGenerator.escapeChar(codepoint, sb);
             }
@@ -1479,7 +1479,7 @@
             return null;
         }
     }
-    
+
     /** {@inheritDoc} */
     protected void restoreStateStackAfterBreakOut(List breakOutList) {
         try {
@@ -1496,16 +1496,16 @@
             handleIOTrouble(ioe);
         }
     }
-    
+
     /**
-     * {@inheritDoc} 
+     * {@inheritDoc}
      */
     protected void startVParea(CTM ctm, Rectangle2D clippingRect) {
         saveGraphicsState();
         if (clippingRect != null) {
-            clipRect((float)clippingRect.getX() / 1000f, 
-                    (float)clippingRect.getY() / 1000f, 
-                    (float)clippingRect.getWidth() / 1000f, 
+            clipRect((float)clippingRect.getX() / 1000f,
+                    (float)clippingRect.getY() / 1000f,
+                    (float)clippingRect.getWidth() / 1000f,
                     (float)clippingRect.getHeight() / 1000f);
         }
         // multiply with current CTM
@@ -1528,12 +1528,12 @@
         super.renderBlockViewport(bv, children);
         comment("%FOPEndBlockViewport");
     }
-    
+
     /** {@inheritDoc} */
     protected void renderInlineParent(InlineParent ip) {
         super.renderInlineParent(ip);
     }
-    
+
     /**
      * {@inheritDoc}
      */
@@ -1545,7 +1545,7 @@
         int style = area.getRuleStyle();
         float startx = (currentIPPosition + area.getBorderAndPaddingWidthStart()) / 1000f;
         float starty = (currentBPPosition + area.getOffset()) / 1000f;
-        float endx = (currentIPPosition + area.getBorderAndPaddingWidthStart() 
+        float endx = (currentIPPosition + area.getBorderAndPaddingWidthStart()
                         + area.getIPD()) / 1000f;
         float ruleThickness = area.getRuleThickness() / 1000f;
         Color col = (Color)area.getTrait(Trait.COLOR);
@@ -1555,7 +1555,7 @@
                 case EN_SOLID:
                 case EN_DASHED:
                 case EN_DOUBLE:
-                    drawBorderLine(startx, starty, endx, starty + ruleThickness, 
+                    drawBorderLine(startx, starty, endx, starty + ruleThickness,
                             true, true, style, col);
                     break;
                 case EN_DOTTED:
@@ -1563,13 +1563,13 @@
                     //This displaces the dots to the right by half a dot's width
                     //TODO There's room for improvement here
                     gen.concatMatrix(1, 0, 0, 1, ruleThickness / 2, 0);
-                    drawBorderLine(startx, starty, endx, starty + ruleThickness, 
+                    drawBorderLine(startx, starty, endx, starty + ruleThickness,
                             true, true, style, col);
                     break;
                 case EN_GROOVE:
                 case EN_RIDGE:
                     float half = area.getRuleThickness() / 2000f;
-    
+
                     gen.useColor(lightenColor(col, 0.6f));
                     moveTo(startx, starty);
                     lineTo(endx, starty);
@@ -1606,7 +1606,7 @@
     }
 
     /**
-     * {@inheritDoc} 
+     * {@inheritDoc}
      */
     public void renderImage(Image image, Rectangle2D pos) {
         drawImage(image.getURL(), pos);
@@ -1615,7 +1615,7 @@
     /**
      * {@inheritDoc}
      */
-    protected RendererContext createRendererContext(int x, int y, int width, int height, 
+    protected RendererContext createRendererContext(int x, int y, int width, int height,
             Map foreignAttributes) {
         RendererContext context = super.createRendererContext(
                 x, y, width, height, foreignAttributes);
@@ -1631,7 +1631,7 @@
 
     /**
      * Formats and writes a PSExtensionAttachment to the output stream.
-     * 
+     *
      * @param attachment an PSExtensionAttachment instance
      */
     private void writeEnclosedExtensionAttachment(PSExtensionAttachment attachment)
@@ -1661,7 +1661,7 @@
     /**
      * Formats and writes a Collection of PSExtensionAttachment instances to
      * the output stream.
-     * 
+     *
      * @param attachmentCollection
      *            a Collection of PSExtensionAttachment instances
      */
@@ -1677,15 +1677,15 @@
             iter.remove();
         }
     }
-    
+
     /**
      * Sets whether or not the safe set page device macro should be used
      * (as opposed to directly invoking setpagedevice) when setting the
      * postscript page device.
-     * 
+     *
      * This option is a useful option when you want to guard against the possibility
-     * of invalid/unsupported postscript key/values being placed in the page device. 
-     * 
+     * of invalid/unsupported postscript key/values being placed in the page device.
+     *
      * @param safeSetPageDevice setting to false and the renderer will make a
      * standard "setpagedevice" call, setting to true will make a safe set page
      * device macro call (default is false).
@@ -1701,14 +1701,14 @@
      * It can cause problems (unwanted PostScript subsystem initgraphics/erasepage calls)
      * on some printers when the pagedevice is set.  If this causes problems on a
      * particular implementation then use this setting with a 'false' value to try and
-     * minimize the number of setpagedevice calls in the postscript document output. 
+     * minimize the number of setpagedevice calls in the postscript document output.
      * <p>
      * Set this value to false if you experience unwanted blank pages in your
      * postscript output.
      * @param dscCompliant boolean value (default is true)
      */
     public void setDSCCompliant(boolean dscCompliant) {
-        this.dscCompliant = dscCompliant;        
+        this.dscCompliant = dscCompliant;
     }
 
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRendererConfigurator.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRendererConfigurator.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRendererConfigurator.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRendererConfigurator.java Fri Jul 25 05:44:20 2008
@@ -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.
@@ -27,7 +27,7 @@
 import org.apache.xmlgraphics.ps.PSGenerator;
 
 /**
- * Postscript renderer config 
+ * Postscript renderer config
  */
 public class PSRendererConfigurator extends PrintRendererConfigurator {
 
@@ -50,7 +50,7 @@
             super.configure(renderer);
 
             PSRenderer psRenderer = (PSRenderer)renderer;
-            
+
             psRenderer.setAutoRotateLandscape(
                 cfg.getChild("auto-rotate-landscape").getValueAsBoolean(false));
             Configuration child;

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRendererContextConstants.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRendererContextConstants.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRendererContextConstants.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRendererContextConstants.java Fri Jul 25 05:44:20 2008
@@ -32,5 +32,5 @@
     /** The font information for the PostScript renderer. */
     public static final String PS_FONT_INFO = "psFontInfo";
 
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRendererMaker.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRendererMaker.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRendererMaker.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSRendererMaker.java Fri Jul 25 05:44:20 2008
@@ -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,7 +31,7 @@
 public class PSRendererMaker extends AbstractRendererMaker {
 
     private static final String[] MIMES = new String[] {MimeConstants.MIME_POSTSCRIPT};
-    
+
     /** {@inheritDoc} */
     public Renderer makeRenderer(FOUserAgent userAgent) {
         return new PSRenderer();

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSSVGHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSSVGHandler.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSSVGHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSSVGHandler.java Fri Jul 25 05:44:20 2008
@@ -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.
@@ -246,7 +246,7 @@
             nativeTextHandler = new NativeTextHandler(graphics, psInfo.getFontInfo());
             graphics.setCustomTextHandler(nativeTextHandler);
             PSTextPainter textPainter = new PSTextPainter(nativeTextHandler);
-            ctx.setTextPainter(textPainter);            
+            ctx.setTextPainter(textPainter);
             PSTextElementBridge tBridge = new PSTextElementBridge(textPainter);
             ctx.putBridge(tBridge);
         }
@@ -279,10 +279,10 @@
              * an fo:block-container
              */
             gen.writeln("newpath");
-            gen.defineRect(xOffset / 1000f, yOffset / 1000f, 
+            gen.defineRect(xOffset / 1000f, yOffset / 1000f,
                     psInfo.getWidth() / 1000f, psInfo.getHeight() / 1000f);
             gen.writeln("clip");
-            
+
             // transform so that the coordinates (0,0) is from the top left
             // and positive is down and to the right. (0,0) is where the
             // viewBox puts it.
@@ -323,6 +323,6 @@
     public boolean supportsRenderer(Renderer renderer) {
         return (renderer instanceof PSRenderer);
     }
-    
+
 }
 

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSSupportedFlavors.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSSupportedFlavors.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSSupportedFlavors.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSSupportedFlavors.java Fri Jul 25 05:44:20 2008
@@ -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.ps;
 
 import org.apache.xmlgraphics.image.loader.ImageFlavor;
@@ -31,8 +31,8 @@
                                                  {ImageFlavor.RAW_EPS,
                                                   ImageFlavor.RAW_CCITTFAX,
                                                   ImageFlavor.GRAPHICS2D,
-                                                  ImageFlavor.BUFFERED_IMAGE, 
-                                                  ImageFlavor.RENDERED_IMAGE, 
+                                                  ImageFlavor.BUFFERED_IMAGE,
+                                                  ImageFlavor.RENDERED_IMAGE,
                                                   ImageFlavor.XML_DOM};
 
     /** The flavors supported inline with PostScript level 3 and higher. */
@@ -41,17 +41,17 @@
                                                   ImageFlavor.RAW_JPEG,
                                                   ImageFlavor.RAW_CCITTFAX,
                                                   ImageFlavor.GRAPHICS2D,
-                                                  ImageFlavor.BUFFERED_IMAGE, 
-                                                  ImageFlavor.RENDERED_IMAGE, 
+                                                  ImageFlavor.BUFFERED_IMAGE,
+                                                  ImageFlavor.RENDERED_IMAGE,
                                                   ImageFlavor.XML_DOM};
-                   
+
     /** The flavors supported as forms with PostScript level 2. */
     ImageFlavor[] LEVEL_2_FLAVORS_FORM = new ImageFlavor[]
                                                  {//ImageFlavor.RAW_EPS,
                                                   ImageFlavor.RAW_CCITTFAX,
                                                   ImageFlavor.GRAPHICS2D,
-                                                  ImageFlavor.BUFFERED_IMAGE, 
-                                                  ImageFlavor.RENDERED_IMAGE/*, 
+                                                  ImageFlavor.BUFFERED_IMAGE,
+                                                  ImageFlavor.RENDERED_IMAGE/*,
                                                   ImageFlavor.XML_DOM*/};
 
     /** The flavors supported as forms with PostScript level 3 or higher. */
@@ -60,8 +60,8 @@
                                                   ImageFlavor.RAW_JPEG,
                                                   ImageFlavor.RAW_CCITTFAX,
                                                   ImageFlavor.GRAPHICS2D,
-                                                  ImageFlavor.BUFFERED_IMAGE, 
-                                                  ImageFlavor.RENDERED_IMAGE/*, 
+                                                  ImageFlavor.BUFFERED_IMAGE,
+                                                  ImageFlavor.RENDERED_IMAGE/*,
                                                   ImageFlavor.XML_DOM*/};
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSTextElementBridge.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSTextElementBridge.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSTextElementBridge.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSTextElementBridge.java Fri Jul 25 05:44:20 2008
@@ -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.
@@ -36,7 +36,7 @@
  * @version $Id$
  */
 public class PSTextElementBridge extends SVGTextElementBridge {
-    
+
     private PSTextPainter textPainter;
 
     /**

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSTextPainter.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSTextPainter.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSTextPainter.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSTextPainter.java Fri Jul 25 05:44:20 2008
@@ -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.
@@ -70,10 +70,10 @@
  * @version $Id$
  */
 public class PSTextPainter implements TextPainter {
-    
+
     /** the logger for this class */
     protected Log log = LogFactory.getLog(PSTextPainter.class);
-    
+
     private NativeTextHandler nativeTextHandler;
     private FontInfo fontInfo;
 
@@ -81,7 +81,7 @@
      * Use the stroking text painter to get the bounds and shape.
      * Also used as a fallback to draw the string with strokes.
      */
-    protected static final TextPainter 
+    protected static final TextPainter
         PROXY_PAINTER = StrokingTextPainter.getInstance();
 
     /**
@@ -102,19 +102,19 @@
     public void paint(TextNode node, Graphics2D g2d) {
         String txt = node.getText();
         Point2D loc = node.getLocation();
-    
+
         if (hasUnsupportedAttributes(node)) {
             PROXY_PAINTER.paint(node, g2d);
         } else {
             paintTextRuns(node.getTextRuns(), g2d, loc);
         }
     }
-    
-    
+
+
     private boolean hasUnsupportedAttributes(TextNode node) {
         Iterator i = node.getTextRuns().iterator();
         while (i.hasNext()) {
-            StrokingTextPainter.TextRun 
+            StrokingTextPainter.TextRun
                     run = (StrokingTextPainter.TextRun)i.next();
             AttributedCharacterIterator aci = run.getACI();
             boolean hasUnsupported = hasUnsupportedAttributes(aci);
@@ -127,17 +127,17 @@
 
     private boolean hasUnsupportedAttributes(AttributedCharacterIterator aci) {
         boolean hasunsupported = false;
-        
+
         String text = getText(aci);
         Font font = makeFont(aci);
         if (hasUnsupportedGlyphs(text, font)) {
             log.trace("-> Unsupported glyphs found");
             hasunsupported = true;
         }
-        
+
         TextPaintInfo tpi = (TextPaintInfo) aci.getAttribute(
             GVTAttributedCharacterIterator.TextAttribute.PAINT_INFO);
-        if ((tpi != null) 
+        if ((tpi != null)
                 && ((tpi.strokeStroke != null && tpi.strokePaint != null)
                     || (tpi.strikethroughStroke != null)
                     || (tpi.underlineStroke != null)
@@ -169,7 +169,7 @@
             log.trace("-> word spacing found");
             hasunsupported = true;
         }
-        
+
         Object lengthAdjust = aci.getAttribute(
                             GVTAttributedCharacterIterator.TextAttribute.LENGTH_ADJUST);
         if (lengthAdjust != null) {
@@ -179,7 +179,7 @@
 
         Object writeMod = aci.getAttribute(
                 GVTAttributedCharacterIterator.TextAttribute.WRITING_MODE);
-        if (writeMod != null 
+        if (writeMod != null
             && !GVTAttributedCharacterIterator.TextAttribute.WRITING_MODE_LTR.equals(
                   writeMod)) {
             log.trace("-> Unsupported writing modes found");
@@ -193,7 +193,7 @@
             log.trace("-> vertical orientation found");
             hasunsupported = true;
         }
-        
+
         Object rcDel = aci.getAttribute(
                 GVTAttributedCharacterIterator.TextAttribute.TEXT_COMPOUND_DELIMITER);
         //Batik 1.6 returns null here which makes it impossible to determine whether this can
@@ -202,7 +202,7 @@
             log.trace("-> spans found");
             hasunsupported = true; //Filter spans
         }
-        
+
         if (hasunsupported) {
             log.trace("Unsupported attributes found in ACI, using StrokingTextPainter");
         }
@@ -219,7 +219,7 @@
         Point2D currentloc = loc;
         Iterator i = textRuns.iterator();
         while (i.hasNext()) {
-            StrokingTextPainter.TextRun 
+            StrokingTextPainter.TextRun
                     run = (StrokingTextPainter.TextRun)i.next();
             currentloc = paintTextRun(run, g2d, currentloc);
         }
@@ -251,7 +251,7 @@
     }
 
     /**
-     * Paint an ACI on a Graphics2D at a given location. The method has to 
+     * Paint an ACI on a Graphics2D at a given location. The method has to
      * update the location after painting.
      * @param aci ACI to paint
      * @param g2d Graphics2D to paint on
@@ -260,18 +260,18 @@
      */
     protected Point2D paintACI(AttributedCharacterIterator aci, Graphics2D g2d, Point2D loc) {
         //ACIUtils.dumpAttrs(aci);
-        
+
         aci.first();
 
         updateLocationFromACI(aci, loc);
 
         TextPaintInfo tpi = (TextPaintInfo) aci.getAttribute(
             GVTAttributedCharacterIterator.TextAttribute.PAINT_INFO);
-        
+
         if (tpi == null) {
             return loc;
         }
-        
+
         TextNode.Anchor anchor = (TextNode.Anchor)aci.getAttribute(
                 GVTAttributedCharacterIterator.TextAttribute.ANCHOR_TYPE);
 
@@ -315,7 +315,7 @@
                 default: //nop
             }
         }
-        
+
         drawPrimitiveString(g2d, loc, font, txt, tx);
         loc.setLocation(loc.getX() + (double)advance, loc.getY());
         return loc;
@@ -354,25 +354,25 @@
         }
         if (ypos != null) {
             loc.setLocation(loc.getX(), ypos.doubleValue());
-        } 
+        }
         if (dxpos != null) {
             loc.setLocation(loc.getX() + dxpos.doubleValue(), loc.getY());
-        } 
+        }
         if (dypos != null) {
             loc.setLocation(loc.getX(), loc.getY() + dypos.doubleValue());
-        } 
+        }
     }
 
     private String getStyle(AttributedCharacterIterator aci) {
         Float posture = (Float)aci.getAttribute(TextAttribute.POSTURE);
         return ((posture != null) && (posture.floatValue() > 0.0))
-                       ? "italic" 
+                       ? "italic"
                        : "normal";
     }
 
     private int getWeight(AttributedCharacterIterator aci) {
         Float taWeight = (Float)aci.getAttribute(TextAttribute.WEIGHT);
-        return ((taWeight != null) &&  (taWeight.floatValue() > 1.0)) 
+        return ((taWeight != null) &&  (taWeight.floatValue() > 1.0))
                        ? Font.WEIGHT_BOLD
                        : Font.WEIGHT_NORMAL;
     }
@@ -479,8 +479,8 @@
      * @return the bounds of the text
      */
     public Rectangle2D getBounds2D(TextNode node) {
-        /* (todo) getBounds2D() is too slow 
-         * because it uses the StrokingTextPainter. We should implement this 
+        /* (todo) getBounds2D() is too slow
+         * because it uses the StrokingTextPainter. We should implement this
          * method ourselves. */
         return PROXY_PAINTER.getBounds2D(node);
     }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSTranscoder.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSTranscoder.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSTranscoder.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/PSTranscoder.java Fri Jul 25 05:44:20 2008
@@ -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.

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/ResourceHandler.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/ResourceHandler.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/ResourceHandler.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/ResourceHandler.java Fri Jul 25 05:44:20 2008
@@ -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.
@@ -94,18 +94,18 @@
      * @throws DSCException If there's an error in the DSC structure of the PS file
      * @throws IOException In case of an I/O error
      */
-    public static void process(FOUserAgent userAgent, InputStream in, OutputStream out, 
+    public static void process(FOUserAgent userAgent, InputStream in, OutputStream out,
             FontInfo fontInfo, ResourceTracker resTracker, Map formResources,
             int pageCount, Rectangle2D documentBoundingBox)
                     throws DSCException, IOException {
         DSCParser parser = new DSCParser(in);
         PSGenerator gen = new PSGenerator(out);
         parser.setNestedDocumentHandler(new DefaultNestedDocumentHandler(gen));
-        
+
         //Skip DSC header
         DSCHeaderComment header = DSCTools.checkAndSkipDSC30Header(parser);
         header.generate(gen);
-        
+
         parser.setFilter(new DSCFilter() {
             private final Set filtered = new java.util.HashSet();
             {
@@ -141,15 +141,15 @@
 
                 PSFontUtils.determineSuppliedFonts(resTracker, fontInfo, fontInfo.getUsedFonts());
                 registerSuppliedForms(resTracker, formResources);
-                
+
                 //Supplied Resources
-                DSCCommentDocumentSuppliedResources supplied 
+                DSCCommentDocumentSuppliedResources supplied
                     = new DSCCommentDocumentSuppliedResources(
                             resTracker.getDocumentSuppliedResources());
                 supplied.generate(gen);
-                
+
                 //Needed Resources
-                DSCCommentDocumentNeededResources needed 
+                DSCCommentDocumentNeededResources needed
                     = new DSCCommentDocumentNeededResources(
                             resTracker.getDocumentNeededResources());
                 needed.generate(gen);
@@ -167,7 +167,7 @@
             }
             event.generate(gen);
         }
-        
+
         //Skip to the FOPFontSetup
         PostScriptComment fontSetupPlaceholder = parser.nextPSComment("FOPFontSetup", gen);
         if (fontSetupPlaceholder == null) {
@@ -181,7 +181,7 @@
         if (pageOrTrailer == null) {
             throw new DSCException("Page expected, but none found");
         }
-        
+
         //Process individual pages (and skip as necessary)
         while (true) {
             DSCCommentPage page = (DSCCommentPage)pageOrTrailer;
@@ -194,7 +194,7 @@
                 break;
             }
         }
-        
+
         //Write the rest
         while (parser.hasNext()) {
             DSCEvent event = parser.nextEvent();
@@ -218,7 +218,7 @@
         }
     }
 
-    private static void generateForms(ResourceTracker resTracker, FOUserAgent userAgent, 
+    private static void generateForms(ResourceTracker resTracker, FOUserAgent userAgent,
             Map formResources, PSGenerator gen) throws IOException {
         if (formResources == null) {
             return;
@@ -227,13 +227,13 @@
         while (iter.hasNext()) {
             PSImageFormResource form = (PSImageFormResource)iter.next();
             final String uri = form.getImageURI();
-            
+
             ImageManager manager = userAgent.getFactory().getImageManager();
             ImageInfo info = null;
             try {
                 ImageSessionContext sessionContext = userAgent.getImageSessionContext();
                 info = manager.getImageInfo(uri, sessionContext);
-                
+
                 ImageFlavor[] flavors;
                 if (gen.getPSLevel() >= 3) {
                     flavors = LEVEL_3_FLAVORS_FORM;
@@ -243,7 +243,7 @@
                 Map hints = ImageUtil.getDefaultHints(sessionContext);
                 org.apache.xmlgraphics.image.loader.Image img = manager.getImage(
                         info, flavors, hints, sessionContext);
-                
+
                 String imageDescription = info.getMimeType() + " " + info.getOriginalURI();
                 final Dimension2D dimensionsPt = info.getSize().getDimensionPt();
                 final Dimension2D dimensionsMpt = info.getSize().getDimensionMpt();
@@ -261,12 +261,12 @@
                             PSGraphics2DAdapter adapter = new PSGraphics2DAdapter(gen, false);
                             adapter.paintImage(imageG2D.getGraphics2DImagePainter(),
                                     null,
-                                    0, 0, 
+                                    0, 0,
                                     (int)Math.round(dimensionsMpt.getWidth()),
                                     (int)Math.round(dimensionsMpt.getHeight()));
                             gen.writeln("EndEPSF");
                         }
-                        
+
                     };
                     formGen.generate(gen);
                 } else if (img instanceof ImageRendered) {
@@ -349,9 +349,9 @@
                 gen.writeln("1 0 lineto");
                 gen.writeln("stroke");
             }
-            
+
         };
         return formGen;
     }
-    
+
 }

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/AbstractPSCommentElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/AbstractPSCommentElement.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/AbstractPSCommentElement.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/AbstractPSCommentElement.java Fri Jul 25 05:44:20 2008
@@ -30,17 +30,17 @@
 
     /**
      * Default constructor
-     * 
+     *
      * @param parent parent of this node
      * @see org.apache.fop.fo.FONode#FONode(FONode)
      */
     public AbstractPSCommentElement(FONode parent) {
         super(parent);
-    }    
-    
+    }
+
     /**
      * @throws FOPException if there's a problem during processing
-     * @see org.apache.fop.fo.FONode#startOfNode() 
+     * @see org.apache.fop.fo.FONode#startOfNode()
      */
     protected void startOfNode() throws FOPException {
         if (parent.getNameId() != Constants.FO_DECLARATIONS

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionElement.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionElement.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionElement.java Fri Jul 25 05:44:20 2008
@@ -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.ps.extensions;
 
 // FOP
@@ -37,10 +37,10 @@
      * extension attachment
      */
     protected PSExtensionAttachment attachment;
-    
+
     /**
      * Default constructor
-     * 
+     *
      * @param parent parent of this node
      * @see org.apache.fop.fo.FONode#FONode(FONode)
      */
@@ -50,14 +50,14 @@
 
     /**
      * Blocks XSL FO's from having non-FO parents.
-     * 
+     *
      * @param loc location in the FO source file
      * @param nsURI namespace of incoming node
      * @param localName (e.g. "table" for "fo:table")
      * @throws ValidationException if incoming node not valid for parent
      * @see org.apache.fop.fo.FONode#validateChildNode(Locator, String, String)
      */
-    protected void validateChildNode(Locator loc, String nsURI, String localName) 
+    protected void validateChildNode(Locator loc, String nsURI, String localName)
                 throws ValidationException {
         if (FO_URI.equals(nsURI)) {
             invalidChildError(loc, nsURI, localName);
@@ -69,7 +69,7 @@
      * @param data array of characters containing text to be added
      * @param start starting array element to add
      * @param length of data array to add
-     * @param pList currently applicable PropertyList 
+     * @param pList currently applicable PropertyList
      * @param locator location in fo source file.
      * @see org.apache.fop.fo.FONode#addCharacters(char[], int, int, PropertyList, Locator)
      */
@@ -92,7 +92,7 @@
     public String getNamespaceURI() {
         return PSExtensionElementMapping.NAMESPACE;
     }
-    
+
     /**
      * @return a String representation of this object
      * @see org.apache.fop.fo.FONode#getNormalNamespacePrefix()
@@ -112,7 +112,7 @@
             missingChildElementError("#PCDATA");
         }
     }
-    
+
     /**
      * @return the extension attachment if one is created by the extension element, null otherwise.
      * @see org.apache.fop.fo.FONode#getExtensionAttachment()
@@ -123,7 +123,7 @@
         }
         return this.attachment;
     }
-    
+
     /**
      * Instantiates extension attachment object
      * @return extension attachment

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionObject.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionObject.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionObject.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/AbstractPSExtensionObject.java Fri Jul 25 05:44:20 2008
@@ -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.ps.extensions;
 
 // FOP
@@ -35,7 +35,7 @@
 public abstract class AbstractPSExtensionObject extends FONode {
 
     private PSSetupCode setupCode = new PSSetupCode();
-    
+
     /**
      * Main constructor.
      * @param parent the parent node
@@ -46,7 +46,7 @@
     }
 
     /** {@inheritDoc} */
-    protected void validateChildNode(Locator loc, String nsURI, String localName) 
+    protected void validateChildNode(Locator loc, String nsURI, String localName)
                 throws ValidationException {
         if (FO_URI.equals(nsURI)) {
             invalidChildError(loc, nsURI, localName);
@@ -69,14 +69,14 @@
     public String getNamespaceURI() {
         return PSExtensionElementMapping.NAMESPACE;
     }
-    
+
     /**{@inheritDoc} */
     public String getNormalNamespacePrefix() {
         return "ps";
     }
 
     /** {@inheritDoc} */
-    public void processNode(String elementName, Locator locator, 
+    public void processNode(String elementName, Locator locator,
                             Attributes attlist, PropertyList propertyList)
                                 throws FOPException {
         String name = attlist.getValue("name");
@@ -88,12 +88,12 @@
     /** {@inheritDoc} */
     protected void endOfNode() throws FOPException {
         super.endOfNode();
-        String s = setupCode.getContent(); 
+        String s = setupCode.getContent();
         if (s == null || s.length() == 0) {
             missingChildElementError("#PCDATA");
         }
     }
-    
+
     /** {@inheritDoc} */
     public ExtensionAttachment getExtensionAttachment() {
         return this.setupCode;

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/PSCommentAfterElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/PSCommentAfterElement.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/PSCommentAfterElement.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/PSCommentAfterElement.java Fri Jul 25 05:44:20 2008
@@ -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.
@@ -39,7 +39,7 @@
     }
 
     /**
-     * @return local name 
+     * @return local name
      * @see org.apache.fop.fo.FONode#getLocalName()
      */
     public String getLocalName() {

Modified: xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/PSCommentBeforeElement.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/PSCommentBeforeElement.java?rev=679781&r1=679780&r2=679781&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/PSCommentBeforeElement.java (original)
+++ xmlgraphics/fop/branches/Temp_AreaTreeNewDesign/src/java/org/apache/fop/render/ps/extensions/PSCommentBeforeElement.java Fri Jul 25 05:44:20 2008
@@ -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.
@@ -51,5 +51,5 @@
      */
     protected ExtensionAttachment instantiateExtensionAttachment() {
         return new PSCommentBefore();
-    }    
+    }
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org