You are viewing a plain text version of this content. The canonical link for it is here.
Posted to batik-dev@xmlgraphics.apache.org by tk...@apache.org on 2002/04/11 10:42:22 UTC

cvs commit: xml-batik/sources/org/apache/batik/bridge GVTBuilder.java

tkormann    02/04/11 01:42:22

  Modified:    sources/org/apache/batik/bridge GVTBuilder.java
  Log:
  fix a bug in GVTBuilder.
  
  check for display must be done *after* the check to see if a
  GraphicsNodeBridge has been found
  
  Revision  Changes    Path
  1.20      +9 -11     xml-batik/sources/org/apache/batik/bridge/GVTBuilder.java
  
  Index: GVTBuilder.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/bridge/GVTBuilder.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- GVTBuilder.java	20 Mar 2002 16:34:43 -0000	1.19
  +++ GVTBuilder.java	11 Apr 2002 08:42:22 -0000	1.20
  @@ -30,7 +30,7 @@
    * This class is responsible for creating a GVT tree using an SVG DOM tree.
    *
    * @author <a href="mailto:tkormann@apache.org">Thierry Kormann</a>
  - * @version $Id: GVTBuilder.java,v 1.19 2002/03/20 16:34:43 tkormann Exp $
  + * @version $Id: GVTBuilder.java,v 1.20 2002/04/11 08:42:22 tkormann Exp $
    */
   public class GVTBuilder implements SVGConstants {
   
  @@ -103,15 +103,15 @@
        * the GVT tree
        */
       public GraphicsNode build(BridgeContext ctx, Element e) {
  -        // check the display property
  -        if (!CSSUtilities.convertDisplay(e)) {
  -            return null;
  -        }
           // get the appropriate bridge according to the specified element
           Bridge bridge = ctx.getBridge(e);
           if (bridge == null || !(bridge instanceof GraphicsNodeBridge)) {
               return null;
           }
  +        // check the display property
  +        if (!CSSUtilities.convertDisplay(e)) {
  +            return null;
  +        }
           // create the associated graphics node
           GraphicsNodeBridge gnBridge = (GraphicsNodeBridge)bridge;
           GraphicsNode gn = gnBridge.createGraphicsNode(ctx, e);
  @@ -167,15 +167,13 @@
           if (Thread.currentThread().isInterrupted()) {
               throw new InterruptedBridgeException();
           }
  -
  -        // check the display property
  -        if (e instanceof CSSStylableElement &&
  -            !CSSUtilities.convertDisplay(e)) {
  -            return;
  -        }
           // get the appropriate bridge according to the specified element
           Bridge bridge = ctx.getBridge(e);
           if (bridge == null || !(bridge instanceof GraphicsNodeBridge)) {
  +            return;
  +        }
  +        // check the display property
  +        if (!CSSUtilities.convertDisplay(e)) {
               return;
           }
           GraphicsNodeBridge gnBridge = (GraphicsNodeBridge)bridge;
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: batik-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: batik-dev-help@xml.apache.org