tkormann    02/03/21 05:41:31

  Modified:    sources/org/apache/batik/bridge SVGTextElementBridge.java
               test-resources/org/apache/batik/test samplesRendering.xml
  Added:       test-references/samples/tests/spec/scripting
                        textProperties.png
  Log:
  remove a bug just introduced
  add new reference image and add textProperties.svg to regard
  remove trace
  
  Revision  Changes    Path
  1.56      +8 -5      
xml-batik/sources/org/apache/batik/bridge/SVGTextElementBridge.java
  
  Index: SVGTextElementBridge.java
  ===================================================================
  RCS file: 
/home/cvs/xml-batik/sources/org/apache/batik/bridge/SVGTextElementBridge.java,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- SVGTextElementBridge.java 21 Mar 2002 12:58:03 -0000      1.55
  +++ SVGTextElementBridge.java 21 Mar 2002 13:41:31 -0000      1.56
  @@ -69,7 +69,7 @@
    *
    * @author <a href="[EMAIL PROTECTED]">Stephane Hillion</a>
    * @author <a href="[EMAIL PROTECTED]">Bill Haneman</a>
  - * @version $Id: SVGTextElementBridge.java,v 1.55 2002/03/21 12:58:03 tkormann Exp $
  + * @version $Id: SVGTextElementBridge.java,v 1.56 2002/03/21 13:41:31 tkormann Exp $
    */
   public class SVGTextElementBridge extends AbstractGraphicsNodeBridge {
   
  @@ -179,14 +179,16 @@
           if (ctx.isDynamic()) {
               layoutedText = new AttributedString(as.getIterator());
           }
  +        TextNode tn = (TextNode)node;
  +        tn.setAttributedCharacterIterator(as.getIterator());
   
           // now add the painting attributes, cannot do it before this because
           // some of the Paint objects need to know the bounds of the text
           // and this isn't know until the text node aci is set
           TextDecoration textDecoration = 
  -            getTextDecoration(e, (TextNode)node, new TextDecoration(), ctx);
  -        addPaintAttributes(as, e, (TextNode)node, textDecoration, ctx);
  -        ((TextNode)node).setAttributedCharacterIterator(as.getIterator());
  +            getTextDecoration(e, tn, new TextDecoration(), ctx);
  +        addPaintAttributes(as, e, tn, textDecoration, ctx);
  +        tn.setAttributedCharacterIterator(as.getIterator());
   
           super.buildGraphicsNode(ctx, e, node);
       }
  @@ -245,6 +247,7 @@
                       addGlyphPositionAttributes(as, e, ctx);
                       layoutedText = new AttributedString(as.getIterator());
                       TextNode tn = (TextNode)node;
  +                    tn.setAttributedCharacterIterator(as.getIterator());
                       TextDecoration textDecoration = 
                           getTextDecoration(e, tn, new TextDecoration(), ctx);
                       addPaintAttributes(as, e, tn, textDecoration, ctx);
  @@ -276,10 +279,10 @@
           case SVGCSSEngine.TEXT_DECORATION_INDEX: {
               if (!hasNewACI) {
                   hasNewACI = true;
  -                System.out.println(node+" "+property);
                   AttributedString as = 
                       new AttributedString(layoutedText.getIterator());
                   TextNode tn = (TextNode)node;
  +                tn.setAttributedCharacterIterator(as.getIterator());
                   TextDecoration textDecoration = 
                       getTextDecoration(e, tn, new TextDecoration(), ctx);
                   addPaintAttributes(as, e, tn, textDecoration, ctx);
  
  
  
  1.1                  
xml-batik/test-references/samples/tests/spec/scripting/textProperties.png
  
        <<Binary file>>
  
  
  1.63      +2 -1      
xml-batik/test-resources/org/apache/batik/test/samplesRendering.xml
  
  Index: samplesRendering.xml
  ===================================================================
  RCS file: 
/home/cvs/xml-batik/test-resources/org/apache/batik/test/samplesRendering.xml,v
  retrieving revision 1.62
  retrieving revision 1.63
  diff -u -r1.62 -r1.63
  --- samplesRendering.xml      20 Mar 2002 16:39:39 -0000      1.62
  +++ samplesRendering.xml      21 Mar 2002 13:41:31 -0000      1.63
  @@ -8,7 +8,7 @@
   
   <!-- ========================================================================= -->
   <!-- @author [EMAIL PROTECTED]                                         -->
  -<!-- @version $Id: samplesRendering.xml,v 1.62 2002/03/20 16:39:39 tkormann Exp $ 
-->
  +<!-- @version $Id: samplesRendering.xml,v 1.63 2002/03/21 13:41:31 tkormann Exp $ 
-->
   <!-- ========================================================================= -->
   <testSuite id="samplesRendering" name="samples and samples/test Rendering" 
class="org.apache.batik.test.svg.SamplesRenderingTest">
   
  @@ -269,6 +269,7 @@
           <test id="samples/tests/spec/scripting/xyModifOnLoad.svg" />
           <test id="samples/tests/spec/scripting/fill.svg" />
           <test id="samples/tests/spec/scripting/visibility.svg" />
  +        <test id="samples/tests/spec/scripting/textProperties.svg" />
       </testGroup>
   
   </testSuite>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to