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 2001/02/05 17:37:58 UTC

cvs commit: xml-batik/sources/org/apache/batik/gvt AbstractGraphicsNode.java CompositeGraphicsNode.java GraphicsNode.java

tkormann    01/02/05 08:37:57

  Modified:    sources/org/apache/batik/gvt AbstractGraphicsNode.java
                        CompositeGraphicsNode.java GraphicsNode.java
  Log:
  add the renderingClone method that might be used later.
  
  This method creates a deep clone of a GVT tree but shares the various
  attributes.
  
  After some benchs, it's much faster to clone the whole GVT tree rather
  than rendering the tree. So the renderer and the scripting module will share
  a LOCK just between the modification and the cloning process.
  
  Just a first idea to explore.
  
  Revision  Changes    Path
  1.10      +5 -1      xml-batik/sources/org/apache/batik/gvt/AbstractGraphicsNode.java
  
  Index: AbstractGraphicsNode.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/gvt/AbstractGraphicsNode.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- AbstractGraphicsNode.java	2001/02/05 15:55:25	1.9
  +++ AbstractGraphicsNode.java	2001/02/05 16:37:50	1.10
  @@ -48,7 +48,7 @@
    * @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
    * @author <a href="mailto:etissandier@ilog.fr">Emmanuel Tissandier</a>
    * @author <a href="mailto:Thomas.DeWeeese@Kodak.com">Thomas DeWeese</a>
  - * @version $Id: AbstractGraphicsNode.java,v 1.9 2001/02/05 15:55:25 tkormann Exp $
  + * @version $Id: AbstractGraphicsNode.java,v 1.10 2001/02/05 16:37:50 tkormann Exp $
    */
   public abstract class AbstractGraphicsNode implements GraphicsNode, Cloneable {
   
  @@ -828,7 +828,11 @@
       }
   
       /**
  +     * Returns a deep clone of this graphics node.
        *
  +     * <b>Warning</b>: All attributes of this graphics node are shared
  +     * between the original node and its copy. This method does not
  +     * perform any synchronization.
        */
       public GraphicsNode renderingClone() {
           try {
  
  
  
  1.10      +6 -1      xml-batik/sources/org/apache/batik/gvt/CompositeGraphicsNode.java
  
  Index: CompositeGraphicsNode.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/gvt/CompositeGraphicsNode.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- CompositeGraphicsNode.java	2001/02/05 15:55:25	1.9
  +++ CompositeGraphicsNode.java	2001/02/05 16:37:52	1.10
  @@ -32,7 +32,7 @@
    * A CompositeGraphicsNode is a graphics node that can contain graphics nodes.
    *
    * @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
  - * @version $Id: CompositeGraphicsNode.java,v 1.9 2001/02/05 15:55:25 tkormann Exp $
  + * @version $Id: CompositeGraphicsNode.java,v 1.10 2001/02/05 16:37:52 tkormann Exp $
    */
   public class CompositeGraphicsNode extends AbstractGraphicsNode
           implements List {
  @@ -389,7 +389,12 @@
       }
   
       /**
  +     * Returns a deep clone of this graphics node. This method clones
  +     * this node and its children.
        *
  +     * <b>Warning</b>: All attributes of this graphics node are shared
  +     * between the original node and its copy. This method does not
  +     * perform any synchronization.
        */
       public GraphicsNode renderingClone() {
           CompositeGraphicsNode n =
  
  
  
  1.20      +5 -1      xml-batik/sources/org/apache/batik/gvt/GraphicsNode.java
  
  Index: GraphicsNode.java
  ===================================================================
  RCS file: /home/cvs/xml-batik/sources/org/apache/batik/gvt/GraphicsNode.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- GraphicsNode.java	2001/02/05 15:55:25	1.19
  +++ GraphicsNode.java	2001/02/05 16:37:53	1.20
  @@ -33,7 +33,7 @@
    *
    * @author <a href="mailto:Thierry.Kormann@sophia.inria.fr">Thierry Kormann</a>
    * @author <a href="mailto:etissandier@ilog.fr">Emmanuel Tissandier</a>
  - * @version $Id: GraphicsNode.java,v 1.19 2001/02/05 15:55:25 tkormann Exp $
  + * @version $Id: GraphicsNode.java,v 1.20 2001/02/05 16:37:53 tkormann Exp $
    */
   public interface GraphicsNode {
   
  @@ -340,7 +340,11 @@
       Shape getOutline(GraphicsNodeRenderContext rc);
   
       /**
  +     * Returns a deep clone of this graphics node.
        *
  +     * <b>Warning</b>: All attributes of this graphics node are shared
  +     * between the original node and its copy. This method does not
  +     * perform any synchronization.
        */
       GraphicsNode renderingClone();