xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r240261 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSRenderer.java
Date Fri, 26 Aug 2005 15:18:10 GMT
Author: jeremias
Date: Fri Aug 26 08:18:07 2005
New Revision: 240261

URL: http://svn.apache.org/viewcvs?rev=240261&view=rev
Log:
Add support for character area.

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSRenderer.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSRenderer.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSRenderer.java?rev=240261&r1=240260&r2=240261&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/ps/PSRenderer.java Fri Aug 26 08:18:07
2005
@@ -37,6 +37,8 @@
 import org.apache.fop.area.PageViewport;
 import org.apache.fop.area.RegionViewport;
 import org.apache.fop.area.Trait;
+import org.apache.fop.area.inline.AbstractTextArea;
+import org.apache.fop.area.inline.Character;
 import org.apache.fop.area.inline.ForeignObject;
 import org.apache.fop.area.inline.Image;
 import org.apache.fop.area.inline.InlineParent;
@@ -692,9 +694,24 @@
     }
 
     /**
+     * @see org.apache.fop.render.AbstractRenderer#renderCharacter(Character)
+     */
+    public void renderCharacter(Character ch) {
+        String text = ch.getChar();
+        renderText(ch, text);
+        super.renderCharacter(ch); //Updates IPD
+    }
+
+    /**
      * @see org.apache.fop.render.AbstractRenderer#renderText(TextArea)
      */
     public void renderText(TextArea area) {
+        String text = area.getTextArea();
+        renderText(area, text);
+        super.renderText(area); //Updates IPD
+    }
+    
+    private void renderText(AbstractTextArea area, String text) {
         String fontname = (String)area.getTrait(Trait.FONT_NAME);
         int fontsize = area.getTraitAsInteger(Trait.FONT_SIZE);
 
@@ -724,7 +741,6 @@
                     + " the PS renderer and not currently supported by the layout engine.");
         }
         
-        String text = area.getTextArea();
         beginTextObject();
         writeln("1 0 0 -1 " + gen.formatDouble(rx / 1000f) 
                 + " " + gen.formatDouble(bl / 1000f) + " Tm");
@@ -773,7 +789,6 @@
         writeln(sb.toString());
 
         renderTextDecoration(tf, fontsize, area, bl, rx);
-        super.renderText(area); //Updates IPD
     }
 
     /** @see org.apache.fop.render.AbstractPathOrientedRenderer#breakOutOfStateStack() */



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


Mime
View raw message